Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Lab Assistant
Original Poster
#1 Old 12th Sep 2011 at 12:19 PM Last edited by zano972 : 12th Sep 2011 at 4:34 PM.
Default Question about the shadow meshes in TS3
Hi all,

As you've already expected it (during the reading of my previous posts), I dont master the english language, but be sure I shall do my best with this one to be as well precise as possible!

For peoples who has to do with TS3 meshing, they know that most of the time an TS3 object is built from: 1 x MODL and 1 or more MLOD(s) ... Right... We all know the function / purpose of these MODL/MLOD... ALL ? no !... Apparently at this time I must be the only one who doesn't understand!!!

...But let's go, if you please it, in the heart of the subject...

For example, a TS3 dining chair / table or anything else is made of 3 x MLOD and 1 x MODL... In S3PE (if I refer to the TGI) the 3 MLODs (the high level details mesh and the sadow meshes - low details meshes) are (for exemple):

- MLOD (1) / 0x01D10F34-00000000-XXXXXXXX....
- MLOD (2) / 0x01D10F34-00000001-XXXXXXXX....
- MLOD (3) / 0x01D10F34-00010001-XXXXXXXX....

Well, let us leave on the side the first MLOD (0000000) to inspect closer the shadow meshes (0000001 and 00010001).

MilkShape 3D show us that these 2 meshes (the shadows) are always bigger, unrefined and always placed under the ground... Ok I can understanding it, they are only shadows! But what I really dont understand is the existing relation between the scale of the MLOD-1 (high level details mesh - 00000000 -) and the MLOD-2 / 3 (shadows - 00000001 and 00010001) !!!

I made a big column and I've scaled / sized my new column to be 5 or 6 x higher as a normal TS3 column. No matter this new simple object works fine but this new object has no shadow in the game! I've already tried hundred of time to modify the position (under the ground) and the size of these shadows meshes with no... result!... In the game the column don't want to show me his shadow! The column is of course an outside object.

Now my question:

What is the relation between a normal object mesh and these shadows meshes ???

Is it a question of shadow mesh position, size or both and why not, something else I don't expect ?

I've, if necessary, some pictures to illustrate what I'm meaning, but I think that everybody understood the main part of my problem.

Thanks a lot in advance for some answers and some lights in my dark brain.

nice day to all.

If you want to know your future...create it!
Advertisement
Alchemist
#2 Old 12th Sep 2011 at 12:31 PM
The shadow lods are numbers 10000 and 10001. Having them appear correctly in-game is a function of both their size and their position.

What tools are you using to create your mesh and which versions are you using? It's a known issue in the development process that some test versions of S3PE were removing the outdoor shadow in-game. If you're using a test version of S3PE try creating your object again using the stable version.
Lab Assistant
Original Poster
#3 Old 12th Sep 2011 at 4:24 PM
Thanks for reply orangemitems... I'm using the latest stable S3OC, S3PE version (11-0809-1034), MilkShape 3D or Blender 2.59 to import / export meshes, but with MS 3D or Blender the problem is the same, I can't find the right size and position for the shadows meshes.

PS:

Quote:
The shadow lods are numbers 10000 and 10001


No matter I've just put a 1 in a wrong position when I'm writting the post but isn't the problem's heart

If you want to know your future...create it!
Sockpuppet
#4 Old 12th Sep 2011 at 5:13 PM
Shadow meshes usually are lower in polygon count and dont have their normals fixed.(They are completly black)
To make em black you can use the direct x tool and pull its slider back and forth, it will kill the normals after saving.

But i dont think that is the cause of your problem.
I would clone the original again, load the scaled meshes in it(exept the shadow meshes) and see ingame if the original shadow mesh still works.
If they show its prolly due your custom shadow mesh, if not, the file might get corrupt during cloning.
Lab Assistant
Original Poster
#5 Old 12th Sep 2011 at 6:02 PM
hi BloomBase

Quote:
Shadow meshes usually are lower in polygon count and dont have their normals fixed.(They are completly black)
To make em black you can use the direct x tool and pull its slider back and forth, it will kill the normals after saving.


Thanks! This is a really usefull and interessant information

Quote:
I would clone the original again, load the scaled meshes in it(exept the shadow meshes) and see ingame if the original shadow mesh still works....


Good idea..I'm going to try it as soon as possible...

Thx.

If you want to know your future...create it!
Alchemist
#6 Old 12th Sep 2011 at 11:54 PM
Quote: Originally posted by BloomsBase
Shadow meshes usually are lower in polygon count and dont have their normals fixed.(They are completly black)
To make em black you can use the direct x tool and pull its slider back and forth, it will kill the normals after saving.

But i dont think that is the cause of your problem.
I would clone the original again, load the scaled meshes in it(exept the shadow meshes) and see ingame if the original shadow mesh still works.
If they show its prolly due your custom shadow mesh, if not, the file might get corrupt during cloning.
You don't have to "kill normals" to get the shadow lods to work...at least I've never done this and mine work

Also, if you use direct X on any of the lods you'll strip the joint(s) off of it and it won't export right.

Quote: Originally posted by zano972
I'm using the latest stable S3OC, S3PE version (11-0809-1034)
11-809-1034 is an outdated test version and it's posted in the test section. The most current stable version of S3PE is from April 2011. It's located here: http://dino.drealm.info/den/denforu...php?topic=189.0
Sockpuppet
#7 Old 13th Sep 2011 at 9:42 AM
Quote: Originally posted by orangemittens
You don't have to "kill normals" to get the shadow lods to work...at least I've never done this and mine work

Also, if you use direct X on any of the lods you'll strip the joint(s) off of it and it won't export right.


True
It is something i did when i just started creating and as i said prolly not the cause of his problem.

These days i use TSRW wich auto generates the shadow lods from the detail lods.
One horse disagreer of the Apocalypse
#8 Old 13th Sep 2011 at 12:17 PM
I wish it would do it for my objects without crashing

Is there some thread about how to make shadows manually? Surely there is some standard squishing factor known now? (must be, or WS couldn't make them)

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#9 Old 13th Sep 2011 at 1:00 PM
Quote: Originally posted by Inge Jones
I wish it would do it for my objects without crashing

Is there some thread about how to make shadows manually? Surely there is some standard squishing factor known now? (must be, or WS couldn't make them)
To make them manually I use the EA one as a template...bring in the original EA item made into .obj, select it and my object .obj both at the same time, resize/position them both until the EA .obj matches the EA shadow lod model in size and position. Then use the resulting version of my .obj as the start of my shadow model. It's a little painful but usually works and I've never had S3PE crash when making them this way. If someone has developed an easier way using S3PE I'd really like to try it
Lab Assistant
Original Poster
#10 Old 13th Sep 2011 at 1:50 PM Last edited by zano972 : 13th Sep 2011 at 5:39 PM.
You're right orangemittens about stable and S3PE test version, I've and use the latest test version because I find very practical the functions 'Export To s3asc and Import From s3asc' instead the old Export and Import functions. And these 2 news functions even in the test version always worked well and fine for me.

I keep and work with this test version because I do not really believe that there is any close relation with the fact that I don't be able to set the right size and position of object's shadows and the fact that S3PE is a test version !!!

Right... I test and try further... Soon or later some lights will come to light my darkness...

nice day and so long.

If you want to know your future...create it!
Sockpuppet
#11 Old 13th Sep 2011 at 3:44 PM
Quote: Originally posted by Inge Jones
I wish it would do it for my objects without crashing

Is there some thread about how to make shadows manually? Surely there is some standard squishing factor known now? (must be, or WS couldn't make them)


I did compare a few meshes in the past and it seems that most objects have their X and Z increased with 200%(scale factor 2)
The height(Y) however varies alot.....from 80 to 95 %(exept with chairs, those stay the same and are also 200% scaled in height.)


The movement after scaling in height(Y) is always -1
But the movement(absolute or relative) on the X and Z is diffrent on every mesh so i suspect it is done by a angle(degrees) but im to lazy to calculate it(I dont have that option in MS anyway.....)

There are however objects that dont use these settings, cars for instance.......
One horse disagreer of the Apocalypse
#12 Old 13th Sep 2011 at 4:17 PM
Thanks, that is useful to start me off, anyway. Oh, what if the mesh starts off straddling the axis, so you have pos and neg vertices? Do they always increase (ie slope off to the front right? I mean a vertex at x=+1 and a vertex at x=-1 wouldn't end up at +2 and -2 - you don't mean that, do you?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Sockpuppet
#13 Old 13th Sep 2011 at 5:19 PM Last edited by BloomsBase : 14th Sep 2011 at 8:27 AM.
Always scale from origin(not center of mass, wich is set as default)

But to be honest, i dont think there is a squising factor(unless its done by quaternation?) because after importing a few more objects things only get more confusing.

With most objects i had the best results by:
1/Move the object to
X0
Y0
Z0
Move options set to ABSOLUTE
Then scale the object to:
See post 21
I am convinced it has to do with absolute movement and scaling since the shadow meshes got correctly positioned outside the center while i didn't use diffrent values(does this make sence?)
But when i had a look at the footballtable i got confused or maybe they use a diffrent setup on those(as with cars)
One horse disagreer of the Apocalypse
#14 Old 13th Sep 2011 at 5:23 PM
What do you mean by the origin? Where the x and z cross in Milkshape, or the front right of the footprint (or is is front left?)

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Sockpuppet
#15 Old 13th Sep 2011 at 6:23 PM Last edited by BloomsBase : 14th Sep 2011 at 7:53 AM.
When scaling a mesh you have a few scaling options:
You can tick the following boxes:
Center of mass(scales the mesh from the center of it)
Origin (scales the mesh from X0 Z0 Y0)
User point(click a spot and scale from there)

But before you scale you have moved the mesh with the move options set to ABSOLUTE
Even if you dont fill in any values(X0Y0Z0) the mesh already moves below X0Z0 and after scaling it comes close to the positions of the original shadow meshes)


I am curious how TSRW does create them and if they all are similar to the ones EA included.
One horse disagreer of the Apocalypse
#16 Old 13th Sep 2011 at 7:40 PM
When you say move the object to
X-0.15
Y0
Z-0.15, which part of the object? I can move the whole thing *by* that amount, of course, but *to* that location is tricky given that if the left hand side is at x = -0.15 the right hand side will be at 0.85. Do you mean the centre of the object?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#17 Old 13th Sep 2011 at 9:30 PM
You might find the location to place the sunshadow mesh at from these two fields in the MLOD (see the wiki entry for the source):
Code:
		FLOAT[3] MirrorPlaneNormal //  3d normal vector specifying the direction of a mirror's reflection
		FLOAT MirrorPlaneOffset   //offset along the normal vector	


<* Wes *>

If you like to say what you think, be sure you know which to do first.
One horse disagreer of the Apocalypse
#18 Old 13th Sep 2011 at 10:33 PM
I am afraid that's a bit obscure for me - mirrors?

Well I didn't have any problem understanding the "where" from Bloombase's post, just the what. *What* do I line up with that location? The centre of my mesh? One edge of it? I think I would also have the same question if I read an offset from the data you have just suggested. It suggests a "move by" relative rather than a "move to" absolute.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#19 Old 13th Sep 2011 at 11:41 PM
Quote: Originally posted by zano972
You're right orangemittens about stable and S3PE test version, I've and use the latest test version because I find very practical the functions 'Export To s3asc and Import From s3asc' instead the old Export and Import functions. And these 2 news functions even in the test version always worked well and fine for me.

I keep and work with this test version because I do not really believe that there is any close relation with the fact that I don't be able to set the right size and position of object's shadows and the fact that S3PE is a test version !!!

Right... I test and try further... Soon or later some lights will come to light my darkness...

nice day and so long.
As long as you're using the specific version of S3PE you're using no light is gonna come and make your sunshadow show up...that one has this known sunshadow problem...believe it or not as you wish

The current stable version of S3PE allows export and import from s3asc just as the test version does. I suggest you use that or get the latest test version which doesn't have the same sunshadow issue the old one you're using does.
Alchemist
#20 Old 14th Sep 2011 at 1:53 AM
Quote: Originally posted by Inge Jones
The centre of my mesh? One edge of it? I think I would also have the same question if I read an offset from the data you have just suggested. It suggests a "move by" relative rather than a "move to" absolute.


All positions are relative to something. In a 3D editor, that is relative to the "origin", at 0,0,0. When the mesh is placed in the game, that origin is repositioned to a new location, and each vertex now has a position equal to the world position + local position. You don't do anything different at the modeling stage, the transformation is done at run time.

The so-named "mirror position" (I think atavera documented that) look to me like a vector/distance to the sun shadow, and I suspect the impression that it is a mirror vector is the result of swapped Y and Z component values in the vector.

The sun shadow mesh itself is just a copy of the main mesh, reduced to a single group, repositioned and stored without normals, UVs, assignments, weights; and shaded with a semi-transparent gray shader instead of a texture. It is apparent that since TSRW can recreate sun shadow meshes that the proper angle and offset for the shadow mesh has to be accessible somewhere.

At any rate, I don't plan on researching this further, although that is the type of thing I always enjoy playing with in the past. However, I have too many other irons in the fire, so to speak, and will pass on this one.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Sockpuppet
#21 Old 14th Sep 2011 at 7:21 AM
Figured it out but no idea when to write a tutorial.....

I discovered that every EA shadow mesh is positioned on X-1, Y-1 and Z-1.


Ill try to explain how to create the height:

* first create a reference floor at Y-1(or use the bottom of a original EA shadow mesh as reference)
* Select your mesh and duplicate it
* The duplicate gets autoselected
* Go to Model/Move and choose ABSOLUTE at the move options(no need to fill in any values)
* Hit the move button(your mesh jumps with its centerpoint to X0, Y0 and Z0)
* Go to scale and choose Origin at the scale options
* Now Take a look at your mesh, when done scaling its bottom needs to fit the Z-1 floor.
Determine wether your mesh needs to be scaled bigger or smaller and fill in a correct scaling value in the Y box at the scaling options.(1.01 for bigger and 0.99 for smaller)
* Start scaling till the bottom of your mesh hits the Y-1 floor, then your done.

This is how you do the height

The scaling on the Z axis is pretty much the same, you create a reference wall at Z-1
After you have moved the mesh ABSOLUTE to 0,0,0(no need to do it when you just finished the height!!) you scale the side of the mesh till it hits the Z-1 reference wall
If you do this with a lamp or small object it becomes bigger but a car gets really small
Same story for the X axis, create a wall at X-1 and scale the object till it hits that wall.


The height and sides can be done in side view while the front/back can be done in top view
One horse disagreer of the Apocalypse
#22 Old 14th Sep 2011 at 7:49 AM Last edited by Inge Jones : 14th Sep 2011 at 8:00 AM.
I am afraid I still don't understand which bit of my mesh to move to that location. Assuming I have a huge cube. Corner A is at -2,0,-2, the opposite corner is at +2, +4, +2 - ie it's four tiles high by four tiles wide. Where is my cube? It's at 0,0,0, and it's at 1,1,1 and it's at 2,2,2 and so on - it is on all those places because it is large. If I move it so it is "positioned on X-1, Y-1 and Z-1" as per your guidance, where is Corner A now? See your instructions are actually very clear and seem logical while I am reading them, but when I come to apply them to my more-than-one-tile object, I don't know what to actually do! Are you actually saying I should get the bit of my object that is on 0,0,0 of Milkshape's grid onto -1,-1,-1 of Milkshape's grid? This is what I would call moving relative. If not, I am really stumped as to *what* exactly to move to -1,-1,-1

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Sockpuppet
#23 Old 14th Sep 2011 at 8:04 AM
you move the mesh absolute(with its own centerpoint) to X0, Y0 and Z0
But its good possible that a cube(box) is already positioned at that spot.

Origin is part of the scaling in MS, if you scale from Origin the scaling is done from X0, Y0 and Z0(instead of scaling from the mesh its centerpoint)

I try to write a tutorial with screenshots Inge, my english is very limited to give a proper explanation
One horse disagreer of the Apocalypse
#24 Old 14th Sep 2011 at 8:12 AM
So just to check I have understood you properly, in the the case of example cube above, moving it to 0,0,0 would mean it would stay where it is in X,Z space, since it was already centered on that intersection, but become lower in the Y direction?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Sockpuppet
#25 Old 14th Sep 2011 at 8:13 AM Last edited by BloomsBase : 14th Sep 2011 at 10:45 AM.
yes, it will only drop
Next step is to see were the bottom of your cube is located now.
Is it below Y-1 or above Y-1(or when it was 2x2x2 originally it is already at Y-1)


If its below -1 you scale your object smaller till it hits Y-1 or when the bottom of your object is above the Y-1 reference floor you need to scale it bigger till it hits Y-1
The scaling however is done from Origin(X0Y0 and Z0) NOT from the centerpoint of the mesh(wich is often the default setting)

I tried this with:
outdoor lamps
fuelpomp
cars
footballtable
All these meshes had diffrent shadowmeshes, bigger, taller or smaller as the original mesh but i was able to recreate(and position) new shadowmeshes from the original base mesh with the above methode


Edit,

I have to be honest here, i have it working for the height but still strugling how to scale them from scratch for a proper width.

Positioning your shadow mesh is pretty easy, i included a template that you can use.
Your new shadow mesh must be positioned at X-1, Y-1 and Z-1(against the reference walls and floor)
The template includes several gamemeshes(with its shadow)
All of them are positioned the same, just the scaling seems diffrent when it comes to the width(the heightscaling is the same for all meshes, explained in post 21)
Page 1 of 2
Back to top