- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Tutorials >
- Objects - How to create correct shadows for custom objects
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Tutorials >
- Objects - How to create correct shadows for custom objects
Replies: 17 (Who?), Viewed: 55952 times.
#1
17th Nov 2005 at 1:46 AM
Last edited by Echo : 11th Sep 2008 at 12:41 PM.
How to create correct shadows for custom objects
This not really a tutorial: it's an excerpt from the oldArchived Object Workshop forum, where Boblishman explained how to create a new groudshadow for a custom object.Since there are no tutorials about this subject, I've copied the relevand posts here.
NOTE: though Boblishman only talks about the groudshadow, the same method can be applied to create the wallshadows, too.
----------
Tutorials:How_to_create_correct_shadows_for_custom_objectswiki
Advertisement
#2
28th Dec 2005 at 10:29 PM
Last edited by Numenor : 21st Feb 2006 at 7:56 AM.
Posts: 548
Thanks: 104501 in 102 Posts
If you've deleted the groundshadow subset from your clone object, your object will not have a shadow. If you want one, you need to add it back into the package (or reclone and start again, which will probaly be easier)
You need also to change your groundshadow texture. The way to get a correct groundshadow is:
Open your 3D editor,
take a screed dump of the 4 view windows
paste it into your graphics editor
crop the image leaving the overhead view only
crop to the object (but not too close)
reduce the colours to 2 (black/white)
erase unneccsary lines, (leaving the outline shape)
increase the colour depth to 16 million colours
magic wand the outline
invert it
delete the contents
fill with grey (128)
deselect
blur several times
resize it to 64 x64 pixels (dont worry if it looks disorted, it will look ok when mapped properly)
save as png
Import into your 3D editor
assign to the groundshadw subset
remap (if necessary)
export as .obj file
import into SimPE (doing NOTHING to the other subsets, and REPLACE the goundshadw)
CLEAR the bounding mesh
select the subsets you want to be selectable and click Add to bounding Mesh
go to the groundshadow texture....then Build DTX the new texture,
change the file type to ExtRaw8bit
update all sizes, commit
save your package.......phew!
You need also to change your groundshadow texture. The way to get a correct groundshadow is:
Open your 3D editor,
take a screed dump of the 4 view windows
paste it into your graphics editor
crop the image leaving the overhead view only
crop to the object (but not too close)
reduce the colours to 2 (black/white)
erase unneccsary lines, (leaving the outline shape)
increase the colour depth to 16 million colours
magic wand the outline
invert it
delete the contents
fill with grey (128)
deselect
blur several times
resize it to 64 x64 pixels (dont worry if it looks disorted, it will look ok when mapped properly)
save as png
Import into your 3D editor
assign to the groundshadw subset
remap (if necessary)
export as .obj file
import into SimPE (doing NOTHING to the other subsets, and REPLACE the goundshadw)
CLEAR the bounding mesh
select the subsets you want to be selectable and click Add to bounding Mesh
go to the groundshadow texture....then Build DTX the new texture,
change the file type to ExtRaw8bit
update all sizes, commit
save your package.......phew!
#3
29th Dec 2005 at 4:33 PM
Last edited by Numenor : 21st Feb 2006 at 7:58 AM.
Posts: 304
And I am stumped (again) with the more mundane project I'm working on. It's cupboards to hang on the wall over the kitchen counters. The shadow is white and I didn't change aything but its size.
It is cloned from The Meaning of Fruit painting, which I chose for its number of groups and also its high room rating. I tried another clone from the same object with the same result. The shadow was ok until I changed its size. Which is odd because I have made other pictures from clones of the same painting and chaged the size of their shadows and they came out right.
I noticed the shadow for this object doesn't have a texture so I tried adding one following that part of IgnorantBliss' tutorial for adding a subset, but the shadow still shows up white.
It is cloned from The Meaning of Fruit painting, which I chose for its number of groups and also its high room rating. I tried another clone from the same object with the same result. The shadow was ok until I changed its size. Which is odd because I have made other pictures from clones of the same painting and chaged the size of their shadows and they came out right.
I noticed the shadow for this object doesn't have a texture so I tried adding one following that part of IgnorantBliss' tutorial for adding a subset, but the shadow still shows up white.
#4
29th Dec 2005 at 5:35 PM
The shadow textures must be greyscale images (shades of grey on a black background), with no alpha channel, and must be in ExtRaw8bit format; the one in the cupboard #1 is in format DXT5, which happens when you import the image using the DDS utilities.
In order to fix it, display the texture in SimPE, select the ExtRaw8bit format, right-click on the image and choose Update all sizes; then Commit and save.
This procedure is needed every time you need to resize the shadow texture (which actually is quite infrequent: if you resize the shadow mesh to fit your new object, the image gets correctly stretched over the new mesh, without the need to change the size of the texture).
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
In order to fix it, display the texture in SimPE, select the ExtRaw8bit format, right-click on the image and choose Update all sizes; then Commit and save.
This procedure is needed every time you need to resize the shadow texture (which actually is quite infrequent: if you resize the shadow mesh to fit your new object, the image gets correctly stretched over the new mesh, without the need to change the size of the texture).
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
I *DON'T* accept requests, sorry.
#5
29th Dec 2005 at 5:40 PM
Last edited by Numenor : 21st Feb 2006 at 7:59 AM.
Posts: 304
Thanks. I'll try that. But I'd like to understand better why do I need to add a texture at all?
#6
29th Dec 2005 at 5:47 PM
Posts: 4,502
Thanks: 13196 in 63 Posts
Besides the texture image format, the texture reference on the Material Definition of the shadow on the main (number 1) cupboard is pointing to a wrong one that's not included in the package. When I fixed that, the shadow did show up dark. On the other two cupboards, there is no texture reference in the Material Definition at all. If you add a texture, do like with the first cupboard but make sure the texture references and texture formats are right.
#7
29th Dec 2005 at 6:03 PM
Last edited by Numenor : 21st Feb 2006 at 8:00 AM.
Posts: 304
It actually seemed to work for me after I changed to format ExtRaw8Bit, without fixing the name of the texture in the material definition. I guess that's because the texture I used does exist in another object in my downloads folder?
And I have another question if there is no alpha channel how do I avoid a solid black shadow? When I added this texture to the package I did also import an alpha channel. And when I opened the package up again the texture looked translucent. So how do I go about it with the othe two cupboards when I add the shadow texture?
And I have another question if there is no alpha channel how do I avoid a solid black shadow? When I added this texture to the package I did also import an alpha channel. And when I opened the package up again the texture looked translucent. So how do I go about it with the othe two cupboards when I add the shadow texture?
#8
29th Dec 2005 at 6:08 PM
Last edited by Numenor : 21st Feb 2006 at 8:00 AM.
Posts: 4,502
Thanks: 13196 in 63 Posts
There is no need for an alpha channel when you use the ExtRaw8Bit format. The white parts of the image are going to be solid and black parts transparent, and shades of grey will be partially transparent. When you add the shadow to the two other cupboards, do as with the first one, but just make sure to import the texture in the right format. And maybe copy the information of the shadow material from another object that has a "normal" shadow with a texture to begin with.
Yes, the shadow worked for you because you had that other object in your downloads folder. I've made the same mistake sometimes when adding Material Definitions, forgetting to change the texture reference but not noticing it since I had the other object in my downloads, as well.
Yes, the shadow worked for you because you had that other object in your downloads folder. I've made the same mistake sometimes when adding Material Definitions, forgetting to change the texture reference but not noticing it since I had the other object in my downloads, as well.
#9
29th Dec 2005 at 7:38 PM
Posts: 304
Me again. I think I did the same thing on all 3 cupboards. In fact I did it all over 3 or 4 times but always with the same result. The first cupboard has a pretty good shadow, but I'd like it to be a bit lighter. The shadows on 2 and 3 are way too dark. Could you look at it again?
Also I've realized that for the corner piece to look right I'll need to add another shadow for the other wall. How hard is that?
How bad do you think it would be if there just weren't any shadows?
Thanks.
Also I've realized that for the corner piece to look right I'll need to add another shadow for the other wall. How hard is that?
How bad do you think it would be if there just weren't any shadows?
Thanks.
#10
29th Dec 2005 at 7:56 PM
Last edited by Numenor : 21st Feb 2006 at 8:01 AM.
Posts: 4,502
Thanks: 13196 in 63 Posts
- It may be that since that original shadow has no texture, it hasn't been uv-mapped. You may want to try to map it.
- To make the shadow more transparent, make the shadow texture darker.
- You have to perform fix integrity on cupboards 2 and 3, without that the new shadow textures aren't correctly linked.
- The shadow texture on cupboard 3 is just a black square, unlike on the two other ones.
- I've never done it, but it's probably possible to make a shadow for the other wall, too. A shadow mesh is just a mesh like any other, you'll just have to place it exactly in the right place so that it appears to be against the wall and not floating, or sunken in the wall. Your shadow mesh would be like an L shape when looking from above, instead of just a flat I shape.
- To make the shadow more transparent, make the shadow texture darker.
- You have to perform fix integrity on cupboards 2 and 3, without that the new shadow textures aren't correctly linked.
- The shadow texture on cupboard 3 is just a black square, unlike on the two other ones.
- I've never done it, but it's probably possible to make a shadow for the other wall, too. A shadow mesh is just a mesh like any other, you'll just have to place it exactly in the right place so that it appears to be against the wall and not floating, or sunken in the wall. Your shadow mesh would be like an L shape when looking from above, instead of just a flat I shape.
#11
29th Dec 2005 at 11:05 PM
In any case, for objects that are mounted directly against the wall, the shadow is barely visible; it adds a sense of "reality" when in hi-res mode and in close-up view, but again, it's barely visible during normal play.
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
I *DON'T* accept requests, sorry.
#12
29th Dec 2005 at 11:32 PM
Posts: 304
UV Mapping! You're brilliant! (And/or I'm a bit dim.) And perhaps the other part of the corner shadow wasn't showing up at all because I'd neglected to fix the integrity since I added it. Now it all looks pretty good. Whew. Thanks, thanks, and thanks.
Lab Assistant
#13
30th Sep 2006 at 10:03 AM
Posts: 159
Thanks: 35744 in 30 Posts
I'm pretty much new at making stuff, and bare with me if I might sound stupid But my question is, can I change the (mesh) size of the groundshadow or shape ?
#14
29th Jun 2007 at 2:27 PM
Last edited by angieb : 29th Jun 2007 at 4:30 PM.
I've made an object cloned from the 12th dynasty vase but this has'nt got an original groundshadow. In your shadow tutorial you say to create one if you don't have one. How do I make one? I've drawn a groundshadow mesh underneath the object but I don't know what to do from there. I have taken the pictures of all three angles of the object and prepared them. The object is a candlestick. Your help would really be appreciated.
Thank you very much
angieb
It's okay I think I've worked it out. I get a mental block sometimes when I'm trying to hard.
Thanks for the turorial.
angieb
Thank you very much
angieb
It's okay I think I've worked it out. I get a mental block sometimes when I'm trying to hard.
Thanks for the turorial.
angieb
#15
30th Jun 2007 at 2:12 PM
groundshadow mesh
hi it's me again I just wanted to check with you about the groundshadow mesh.As the 12th dynasty vase does'nt have a groundshadow do I need to import the groundshadow mesh as a subset? I've imported it as a second texture and also added it to the material definition. I've gone into the game and I'm not sure if its working i've looked at it with the walls up.
Also if I wanted to add the left shadow and the front shadow would they need to be imported as a subset or just added to the txtr and mat def as I have done with the groundshadow?
This is my first mesh object so forgive me if I appear to be stupid.
Thanks
angieb
#16
30th Jun 2007 at 6:26 PM
Posts: 4,502
Thanks: 13196 in 63 Posts
For the shadows to work correctly, you should have them as their own subsets, just like existing shadows in the game are. So, import each shadow as a separate subset. However, I'm not sure if they are automatically going to work as shadows do when the object previously has no shadows and may not have the necessary built in functionality for them. If you can't get them to work by importing but you really want a shadow, then I'd recommend cloning some other sculpture that does come with a shadow already.
#17
30th Jun 2007 at 6:47 PM
Quote: Originally posted by IgnorantBliss
For the shadows to work correctly, you should have them as their own subsets, just like existing shadows in the game are. So, import each shadow as a separate subset. However, I'm not sure if they are automatically going to work as shadows do when the object previously has no shadows and may not have the necessary built in functionality for them. If you can't get them to work by importing but you really want a shadow, then I'd recommend cloning some other sculpture that does come with a shadow already. |
Thankyou. I thought that might be the case I don't think that importing them will help. I did try importing the groundshadow mesh as a subset but it did'nt work and I got the flashing blue again. I think its best if I do as you say and clone a different object. I would like to give the object shadows as I would like to know how to do it successfully I would also like to upload it and even though I have my shadows turned off most of the time not everybody does.
Thankyou again for your help.
angieb
#18
30th Jun 2007 at 10:19 PM
Quote: Originally posted by angieb
Thankyou. I thought that might be the case I don't think that importing them will help. I did try importing the groundshadow mesh as a subset but it did'nt work and I got the flashing blue again. I think its best if I do as you say and clone a different object. I would like to give the object shadows as I would like to know how to do it successfully I would also like to upload it and even though I have my shadows turned off most of the time not everybody does. Thankyou again for your help. angieb |
Decided to keep it how it is as I want to be able to place the objects on the fire mantle and I'm not ready to start changing the placements of objects yet.
Its's not so easy finding suitable objects to clone. At least I know how to do the shadows now.
Thankyou
angieb
Who Posted
|