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!
Lab Assistant
Original Poster
#1 Old 2nd Oct 2009 at 12:06 PM
Default Sun Shadow questions
I’ve created a new mesh, and cloned the beach umbrella to make it, however my new mesh is significantly longer than the original umbrella mesh. I assumed (perhaps wrongly) that in replacing the mesh in the two LODs that create the sun shadow that this would ensure that the sun shadow appears correctly on my new object. This does not seem to be the case (see attached image) As you can see the shadow is appearing correctly on my new mesh but it is only displaying part of the shadow. From the looks of things, it seems that the sun shadow is somehow attached to the object footprint. Is this truly the case? And if it is, is there any work around?

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
Screenshots
Advertisement
Inventor
#2 Old 2nd Oct 2009 at 12:38 PM
Maybe this will answer your question, sorry, I don't know anymore in which thread I found it, but it is somewhere here in the meshing forum.

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.
Lab Assistant
Original Poster
#3 Old 2nd Oct 2009 at 2:15 PM
Thank you for all this information, it had crossed my mind that it might have something to do with a shadow mesh object, the thing is the umbrella doesn't appear to have a seperate mesh group for the shadow or a drop shadow image. I will try using a different clone that does have these parts so that I can mess around with them (I really wanted to have the three recolourable parts) but I'll investigate some more and see if I can work it out.

Thank you for your reply
Lois
In the Arena
retired moderator
#4 Old 2nd Oct 2009 at 3:55 PM
You might need to check (or uncheck, I can't recall which but one or the other will result in more resources) - ie the opposite of when you create it the first round - maybe not all the shadow meshes that you need get cloned over when you created the package.
Lab Assistant
Original Poster
#5 Old 2nd Oct 2009 at 4:19 PM
I'm sorry I'm not sure I understand what you mean (check/uncheck what?). But I like your thinking, it makes sense that there is something missing from the package file that controls this, but it's still odd that it is half appearing like it is.

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
In the Arena
retired moderator
#6 Old 2nd Oct 2009 at 5:14 PM
oh sorry! at the S3OC stage, when you first cloned it, there's a "Default resources only" option - one will copy more resources than the other.

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?
Lab Assistant
Original Poster
#7 Old 2nd Oct 2009 at 6:00 PM
ah thank you, I'll give that a go.

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
Alchemist
#8 Old 2nd Oct 2009 at 8:52 PM
Lois:

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.
Lab Assistant
Original Poster
#9 Old 2nd Oct 2009 at 10:53 PM
Hi,

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
Alchemist
#10 Old 3rd Oct 2009 at 12:37 AM
I don't know if this will help the general sun shadow discussion at all but here goes...I created a slatted dining table for the outdoors. I did not change the shadow portion of the MLOD at all. I did change my table mesh's dimensions to perfectly match the dimensions of the EA table in all MLODs and the MODL. The 2nd and 3rd MLODs listed in the S3PE list have strange dimensions and are offset in MS from where the first MODL and the MODL are when imported. In MS I used the scale function to make my table mesh perfectly match these strange dimensions and moved my table mesh to sit right where the EA table mesh sat until I deleted it.

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
Alchemist
#11 Old 3rd Oct 2009 at 1:03 AM
I do not know the details of the code EA used, but the sun shadows are dependent on the location differences of the paired meshes ("00000000" pairs with "00010000", "00000001" pairs with "00010001"). You will note that the offset is often left, back and down from the base mesh to the shadow mesh, and sometimes the shadow mesh is identical, sometimes it is "squashed".

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.
Alchemist
#12 Old 3rd Oct 2009 at 1:15 AM
Here is a pic of what I mean about the umbrella and the table.
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
Lab Assistant
Original Poster
#13 Old 3rd Oct 2009 at 11:09 AM
Thank you for your comments, looking at this project fresh this morning I decided to start from scratch just to make sure I didn't make a simple error in the compilation yesterday, but I'm getting the same results in the new package.

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
Attached files:
File Type: zip  WashingLine_faulty shadow.zip (170.4 KB, 8 downloads) - View custom content
Alchemist
#14 Old 3rd Oct 2009 at 9:00 PM
Well, there is definitely something up with the sunshadow I think. I remade my table umbrella so that it has a base to it now and during that I also rescaled my MLOD2 and MLOD3 (the weird shaped ones) so that they were the right proportion. I also changed the size of the plane in the MLOD1.

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
Lab Assistant
Original Poster
#15 Old 4th Oct 2009 at 1:00 AM
Unfortunately I don't have much to report,

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
Screenshots
Alchemist
#16 Old 4th Oct 2009 at 2:07 AM
I love the little wash line Lois...it's really cute. Have you tried turning it so that it is oriented in the same direction as the umbrella is in MS? Your pics show it at right angles so I'm wondering if that is how it is in MS. Perhaps this might help?

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
Alchemist
#17 Old 4th Oct 2009 at 3:56 AM Last edited by WesHowe : 4th Oct 2009 at 3:57 AM. Reason: teh edit
I am wondering if the clone has the proper links to your shadow meshes, or if it is continuing to link to the original shadow meshes (in the game archive). This could explain why changing the mesh in the package does not properly change the sun shadow, if the game is using the original (EA) mesh instead of the mesh you made.

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.
Alchemist
#18 Old 4th Oct 2009 at 4:42 AM
Thanks for your reply Wes...I was hoping you would be back to view this thread.

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
Alchemist
#19 Old 5th Oct 2009 at 1:28 AM Last edited by WesHowe : 5th Oct 2009 at 1:29 AM. Reason: teh edit
I tried to fix this, and I believe I know what is happening.

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.
Screenshots

If you like to say what you think, be sure you know which to do first.
Alchemist
#20 Old 5th Oct 2009 at 5:19 AM
Thank you for giving it a try Wes. It *is* a nice umbrella...it is the EA Sims 3 umbrella cloned onto the Gnome, resized, remapped, and given a base...credit where credit is due...lol.

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
Alchemist
#21 Old 5th Oct 2009 at 2:48 PM
If you look at the coffee table top, you will see the sunshadow of the pole, and one edge of the sunshadow are nice and rounded. (another no comment)?

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.
Alchemist
#22 Old 6th Oct 2009 at 3:07 AM
It's ok that these would all be textured with the same shininess etc. But is there an issue with a really large texture map...a map that contains 1024 dimension in it? Will it slow down the game? Does size matter here?

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
Lab Assistant
Original Poster
#23 Old 6th Oct 2009 at 11:53 AM
on rescaling the shadow mesh, I have done a little experimentation on that which may or may not be helpful. I haven't drawn any conclusions yet as the results seem surprising to me and I can't be sure I am concentrating on making the right changes, but perhaps you can deduce more from my tests than I can.

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
Screenshots
Alchemist
#24 Old 6th Oct 2009 at 12:13 PM
I'm glad that changing the orientation helped a little bit Lois.

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
Lab Assistant
Original Poster
#25 Old 6th Oct 2009 at 12:33 PM
This is not a composited pic, they are placed next to each other in the game at the same time of day, rather than in the same exact spot.

look forward to hearing how your experiments go

Lois
Page 1 of 2
Back to top