- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Meshing >
- Sun Shadow questions
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Meshing >
- Sun Shadow questions
Posts: 80
Thanks: 1501 in 3 Posts
I’m toying with the idea of splitting the mesh into two or three, but I thought I’d explore other possible fixes first
Thanks for reading
Lois
Question:
-I don't know if I've missed something somewhere, but now the shadows are taking on the original object's shadow. I cloned the goth painting and then put my mesh over it. I've included the file if you need to take a look at it.
There was only 1 mlod and 1 modl. I edited both of those.
Answer from ? WesHowe?
Wall shadows like this one aren't generated by the game based on your mesh or anything like that.
In order to change the shadow you need to replace the texture image on your shadow mesh. Right now as far as I can tell you're using the original object's shadow.
The shadow mesh should be group00 in your LOD. To preview what the mapped/textured shadow looks like as it is, export dropShadow_object_a_0x937c71e144222c2c from your package. In Milkshape, make a new material using the exported dropShadow image, assign it to your shadow mesh, and view it in textured mode. (You'll probably have to do a Smooth All to make it show up)
If you then open the texture coordinate editor, you can see that the shadow mesh is mapped to a small part of the dropShadow image. I expect you'll need to replace that image with one of your own, fiddle with the mapping, etc.
Posts: 80
Thanks: 1501 in 3 Posts
Thank you for your reply
Lois
Posts: 80
Thanks: 1501 in 3 Posts
I'm working on altering the drop shadow in another clone, and though not what I hoped for it will certainly be better than no shadow at all, I'd still prefer to get the sun shadow working if I can
thanks
Lois
I went to open S3OC and while waiting for it to load, got called away and well, must have posted it but forgot to enter the info I was looking for.
I haven't mess around with the shadow meshes, so I'm not sure if this is even the right direction to look at, but worth trying, right?
Posts: 80
Thanks: 1501 in 3 Posts
From what I can see, the shadow mesh controls the shadows that appear inside the house, not out. The beach umbrella has no shadow mesh, and if you place one inside it has no shadow at all and I think that the drop shadow is entirely static. For this reason its not an ideal choice for a washing line which will be placed outside. But as I said a static shadow is likely better than no shadow at all.
Having said that I'm not having a lot of luck with changing the shadow mesh either, but I suspect that has more to do with me than any game weirdness, but I do wonder if it is even possible to see a drop shadow outside as I notice that the shadows seem to change the moment an object is moved from inside to out, which suggests to me that shadows are switched on or off depending on an object's position.
I'll try your suggestion next, thanks
Lois
Posts: 2,832
Thanks: 6608 in 20 Posts
I'm sorry, but we don't have very much known detail about the sun shadows. I don't know whether the footprint is a part of the algorithm, I never suspected it was, though, because cars and other objects that have no "footprint" and are not buyable have sun shadows.
All of them have the extra sunshadow meshes (the car has three), and I am assuming you put a copy of the whole mesh in the sunshadow groups. I am wondering about this, though, because neither post nor the towel have a sunshadow, just the one sheet.
If you like to say what you think, be sure you know which to do first.
Posts: 80
Thanks: 1501 in 3 Posts
Yes I definately did put a copy of the whole mesh into the sunshadow groups, I checked (repeatedly). The shadow for the post is there, hard to tell from the pic I know, but the towel is an oddity because it does seem that it should be showing, if my theory about it being related to the footprint has any truth at all, I admit I'm clutching at straws here but I'm up for some experimentation even if I don't really understand more than the basics.
Do you think this is a sunshadow issue, rather than a drop shadow issue? I just want to check that I have at least got that much right
thanks for your reply
Lois
Posts: 2,932
Thanks: 15563 in 28 Posts
In the game the shadow came out perfectly...it does have shadow where the slats would be assumed to block the sun and brighter areas which correspond to the spaces between the slats. I was quite pleased as I hadn't known what to expect from the shadow and was worried that since I had not changed it at all that my table wouldn't have the slatted shadow.
This impression has been reinforced by a clone I made of the gnome which I used to make a table umbrella for the slatted table. The gnome sun shadow is quite small. When I made the 2nd and 3rd MLODs of my umbrella I enlarged them quite a bit hoping that the shadow cast by my umbrella would be larger and it was. Not large enough...I need to make those MLOD meshes even larger...but there was a change in the shadow size. Interestingly though, the shape of the shadow does not correspond perfectly to the shadow I expected...that is...it isn't round...it is an almost half circle shape. I don't know why this should be. The table umbrella is still a work in progress and I plan to enlarge my 2nd and 3rd MLODs even more hoping that I can get the right shadows for the object in the game.
I think that the shape of the MLOD has some effect on sun shadows or else my slatted table would have had the same solid rectangular shadow the original EA table has when placed outdoors. I'm not sure what to make of the plane that shows up with the first MLOD...the MLOD that has an object mesh that is exactly like the MODL object. I know for indoor shadows it does have an effect but for outdoor objects the sun shadow seems to not be dependent on it.
OM
Posts: 2,832
Thanks: 6608 in 20 Posts
There is a variable in the MODL file that I think sets the angle for some aspect of the sunshadow generation, but I do not know enough about it... the recompiler carefully copies the original values into your new MODL file, so for not you are sort of stuck with the shadow characteristics of what you cloned. Not all bad, because EA used professional artists to make the game objects.
OrangeMitten's method of using scale and matching the original offset (think of just getting the center of the replacement where the center of the original was).
So I know no more without looking at the package you made, something is not working there, but I don't know what. How many groups are in this mesh?
If you like to say what you think, be sure you know which to do first.
Posts: 2,932
Thanks: 15563 in 28 Posts
You can see that the table shadow is fine. It is slatted and offset correctly.
The umbrella shadow not so much. It has a sort of half arc from the umbrella shadow on the ground and a rounded shadow...too small...on the table underneath.
Still a work in progress...
As far as the umbrella goes there is only one group to that mesh in MODL and MLOD. That group in MS is the umbrella itself...it has no plane making up a second group in the MLOD.
OM
Posts: 80
Thanks: 1501 in 3 Posts
orangemittens, thank you it is really interesting to hear your observations. I can't be sure that I got the scaling exactly right in the second and third MLODs as I was doing the scaling by eye and the two meshes are very different in shape, but I would hope that I got it close
Wes, Thank you for clarifying those points, there is just one group in the mesh, it was originally more groups but I regrouped it into one in Milkshape before importing the single group into the MLODs when I was cloning. I have attached the faulty packsge to this post, incase you want to have a look at it
Thanks
Lois
WashingLine_faulty shadow.zip (170.4 KB, 8 downloads) - View custom content | ||||||||||
633081 10-02-09 10:24 Lois99_SculptureLaundryShadow.package -------- ------- 633081 1 file |
Posts: 2,932
Thanks: 15563 in 28 Posts
But when I got the object into the game the sunshadow was still weird. I made the mesh as a clone of the Garden Gnome and the shadow is strangely angular...almost like the garden gnome's shadow. Below is a pic showing both in the game side by side.
Even in the shade the shadows on the table are a little off. The second pic shows the umbrella in place on a table set under a large tree. You can see that the groundshadow is gone...presumeably because of the tree. But the shadow cast by the umbrella onto the table remains and is quite small.
I'm not sure where to go from here with trying to fix this shadow issue. It isn't bad enough for me to not want the object in my game but I'm worried that others won't care too much for it this way.
OM
Posts: 80
Thanks: 1501 in 3 Posts
Though just for interests sake I recloned my model, squishing it into the space that is taken up by the beach umbrella to see what the shadows would do. Interestingly apart from being a bit small and not placed quite right (likely because I didn't take enough care when I was setting up the shadow meshes) it is showing pretty accurately (see attached pic)
orangemittens, I love the shadows that your table is making! (the pics weren't showing up when I posted this morning.) and I'm puzzled by the odd angular shadow you are getting, to me though it doesn't look so similar to the gnome shadow, but I can't think why it might be showing that way, it does seem very odd. And it is interesting that you are also getting a shadow that is too small relative to the model, as I did with my experiments today.
Like you ,I am not at all sure where to go from here
Lois
Posts: 2,932
Thanks: 15563 in 28 Posts
I'm puzzled by the shadow my umbrella is making too. My Rorschach ink blot sense is trying to make that shadow be a blown up version of the Gnome shadow and turned at a right angle to it but I'm not certain that it is. If it isn't I have no idea how to explain the strange shape of it. The more I look at it the more my umbrella shadow looks like the shadow of the Gnome's hat.
I'm hoping Wes or some other programmer guru can find where in the code the sunshadow is hiding so I can edit it. Otherwise we're kind of stuck with EA shadows on our custom content...it isn't that bad...but it's a lot less than perfect.
OM
Posts: 2,832
Thanks: 6608 in 20 Posts
The fields that specify the TGI for each lod and shadow mesh are in the MODL file, and the decompiler/recompiler copies that data unaltered from the cloned object. S3OC should be renumbering these in the MODL when it does your 'fix', and at least in the past it did that properly. There is no simple user check for these fields, however, it requires some hex sleuthing to see them.
If you like to say what you think, be sure you know which to do first.
Posts: 2,932
Thanks: 15563 in 28 Posts
So what do you think? Does the shadow of my umbrella look like the gnome's hat shadow turned 90 degrees? If so, it would appear that the object is linking to some game memory of the original object that I used as a clone for this umbrella.
And if you look at the pictures, it isn't just the sun shadow that is wrong...in the shade the shadow the umbrella casts over the table is very small...nowhere near what I would have expected given the scaling I gave the MLOD in MS.
Some of the changes I made are "taking" insofar as the sunshadow the umbrella casts is much larger than the shadow the Gnome casts...but it isn't the right shape. Is it possible that there are two shadow modes? The sunshadow and a shade shadow? For this object clearly there are two different shadows depending on the light source.
Here is the package...maybe it will help if you have time to look into the issue:
http://jaue.com/om/OM_umbrella_tablehop.rar
Thanks for any information you can sleuth out about this issue.
OM
Posts: 2,832
Thanks: 6608 in 20 Posts
The sunshadow seems to have a height it is "focused" at, and that seems to be related to the distance between the mesh and the sunshadow mesh.
I moved the sunshadow down (umbrella bottom level with ground) and placed the mesh in the game. In the photo below, when the umbrella is on the ground, the shadow casts pointy and square. When I moved it onto a table (not quite the right height, but closer), the shadow is rounder, but not large enough.
I think with the sunshadow mesh moved down, perhaps there is a better height than my guess, and maybe scaled larger along X and Y, you would have a suitable shadow.
I don't know if moving the groundshadow mesh group (group00) down to the base works, but having a groundshadow of what should be the base up on the tabletop is not right, either.
Anyway, it is not anything really wrong, except we are feeling out way along in the dark here... and perhaps a bit like the story of the blind men and the elephant, we are not "seeing" the whole thing.
I don't know ultimately that placing the umbrella on a tabletop will be suitable, as you can see, it is sensitive to the table height (the base is invisible under the coffee table, because it is below-ground). Perhaps the best design is having the table and umbrella in one mesh.
Anyway, it is a nice umbrella.
If you like to say what you think, be sure you know which to do first.
Posts: 2,932
Thanks: 15563 in 28 Posts
What I don't understand from your explanation is why the shadow keeps turning out pointed like that even though this isn't a pointed object. Why is it so pointy?
Anyway, sigh..., I suppose you're right about needing to make this umbrella table as a single object instead of an umbrella that can hop onto any table of the user's choice.
Which brings me to another question...my table and the umbrella both take up quite a bit of space on a texture map. Is there a downside to making a really big texture map so they both fit on it as-is? Or will doing something like that slow the game?
Or...wait...does the MLOD have anything at all to do with the sunshadow? And if not, how do we get at the sunshadow? If I could edit that thing so that an adjustment was made for the table hopping the umbrella is doing maybe that would work?...if I could only get the shape so that it wasn't so pointy that is. (My first version of this umbrella didn't have a base below ground and it had the same pointy shadow...I don't think the hopping part of this umbrella is the issue with the shadow.)
I am firmly resisting commenting on your statement that we are feeling our way along in the dark...
OM
Posts: 2,832
Thanks: 6608 in 20 Posts
The opposite edge, which is on the ground and thus lower, has the pointier parts. This is the same shadow, from the same shadow mesh, seen at two different levels.
I think distorting the shadow mesh to be wider (X+Y scaling) and moving it down will help somewhat, the pointiest part is from the peak of the umbrella. It will allow you to get the dropshadow in the right place, and shape it better.
As for mapping... in 3D meshes, you get one map per group. Each map can be tied to a different texture map, or the same one. If you are texturing with the same material attributes, i.e. same shininess, same roughness, same transparency, then you can share a texture image.
Since you have just a single group mesh (plus dropshadow) you could take your table and raise it up to be on top of the groundplane in MilkShape, add in a table, move the uv mapping for each so they do not overlap, regroup, and make the dropshadow mesh the right size for the table legs. When you regrouped, you made the separate uv mappings be merged together, and now they will HAVE to be textured with the same texture image.
Mostly, you will find game items that (excepting dropshadows) have one group, or if they have two, one is solid and one is glass, or one is wood and one is metal, and a few that have three groups, like the CarPolice, where one is the body, one is the window glass and the third one is the lights. So each material there has different properties. Once cloned, you can change material properties in the .mtlsrc files. But you cannot make two different shininess or transparency levels for the same material (except using alpha transparency), you need different sets of materials, and each will need a different uv map, and be in a different group.
Yes, the MLOD files have everything to do with sunshadows. The MODL is usually group "00000001" (lod1) and it pairs with "00010001" for it's sun shadow. The other lod0 (main) file will be group "00000000" and it pairs with "00010000" for its sunshadow. But the sunshadow mesh is not the shadow, it is the other half of some sort of template the game uses to make a sunshadow by calculation... as the sun moves, the shadow changes, whereas the dropshadow stays the same.
If you like to say what you think, be sure you know which to do first.
Posts: 2,932
Thanks: 15563 in 28 Posts
Thank you for the tips on rescaling my shadow MLOD...I'll give it a try and see what comes of that. It sounds like what you're saying is that my umbrella shadow is getting sort of truncated by the table mesh...that is, the table is cutting off the shadow so that the shadow is now being seen on two levels instead of only one...briefly...the shadow is too small right now.
When you say the sunshadow mesh is the other half of a template the game is using...is there some way of seeing the template the game is using? Where is that template? Is it something we can get at?
I'm glad you find my sunshadow nice and rounded...so no, not another "no comment"...(edited by OM)
OM
Posts: 80
Thanks: 1501 in 3 Posts
Oh and orangemittens you were absolutely right about the orientation of my model, changing it to the same orientation as the umbrella has helped considerably though there are still random parts of the shadow missing.
Just to clarify, on the picture I have attached, in all cases the first MLOD mesh remains the same size and orientation, I have only altered the second and third shadow mesh MLODs.
I hope this is helpful/ or interesting
Lois
Posts: 2,932
Thanks: 15563 in 28 Posts
In your pics were each of the washlines placed in the same spot in the game and at the same time of the Sim day? If so, it would appear that the orientation of the shadow mesh alters the position of the far edge of the shadow in relation to the object.
Looking at your pics helps me to get some idea of how I should try to manipulate my object's sunshadow...thanks for posting them.
OM
Posts: 80
Thanks: 1501 in 3 Posts
look forward to hearing how your experiments go
Lois
Who Posted
|