Wednesday, January 15, 2014

Shadows in ts3 objects

Most of objects in The Sims 3 have three kinds of shadows:  1) drop shadow, 2) sun shadow and 3) occlusion shadow.




I've already mentioned about how to edit dropshadow in this tutorial.  

2)  Sun shadow

Sun shadow is generated by sun light when the object is placed in outdoor.   I omitted the explanation of sun shadows in the tutorial, I'd like to do it here.

In TSRWS, after you imported high and medium meshes, go to mesh tab, and select "Shadow high level of detail".


And then click blue double arrows icon.



In the new window, check the box of high detail mesh (not drop shadow group) and click OK.
This means high sun shadow will be generated in game by calculating shadow image from high detail mesh.



For medium detail mesh, select "Shadow medium level of detail" from pulldown menu, and check the medium detail mesh.



In some cases, I use medium detail mesh for both high and medium sun shadows.  



3) Occlusion shadow

In the step-bey-step tutorial, I deleted all the occlusion shadow entries.   Here I'd like to show how to edit the shadows.


In Misc tab, if you click "Light 0", you can see gray box and planes in preview window.



These gray box define the shape of occlusion shadow.

This bar stool has four entries for the shadow.




I deleted entries 1 and 4 and edited entry 2.

I used a stool mesh without backrest as an example.  So I thought the plane of entry 2 is too high.


Click "Light 0" and click "..." button.  Lite Editor will open.
Select Entry 1 under "Occluder"and click "-" button.  Delete Entry 4 in same way and click OK.

After deleted entries 1 and 4, Entries 2 and 3 become entries 1 and 2, respectively.


In entry 1, you can see various parameters:



Origin is the coordinate of the origin position.  Normal indicates the direction of normal vector of the occluder plane.  x=0, y=0, z=-1 means that this plane is vertical to z axis.

The meaning of X-axis and Y-axis values had been mystery for me.  But recently I noticed that those values are inversely proportional to the size of the occlusion plane.  Pair Offset value is still mystery...


A bit confused?

In this case, I wanted to shorten the height of this plane to those of the seat.  First, I lowered the origin to y=0.7.




Looking this from below, you will see the plane goes underground.   



We have to adjust y value of Y-axis.  I wanted to change this height to about 0.7.   1 / 0.7 = 1.428.....  So I set the value to -1.4.




Click OK.  It's done.  Let's test it in game.

Indoor with light from a window.  (Top; before, Bottom; after)




Indoor with light from a ceiling lamp.








7 comments:

  1. Thank you for this tutorial, I never quite understood how to edit these shadows properly, now it is much clearer! :)
    I'd love to see a light editing-tutorial from you *hint hint* ;)
    Lighting is a mystery to me... and I always wondered how to create a display case with lighting inside.

    ReplyDelete
    Replies
    1. Hi! Thank you for reading! Okay, I'll try to write a tutorial about light editing with the display lighting in mind. :)

      Delete
  2. YAY! I've commented in everything LOL This is so clear, I will uupdate my things ♥ Thank you Pocci

    ReplyDelete
    Replies
    1. Thank you David! :D I wrote this tutorial in part for you. I'm happy this helps you. ♥

      Delete
  3. This is a lovely tutorial! It makes me want to fix a ton of CC objects that I didn't even make. And also HEY! :D

    ReplyDelete
    Replies
    1. Heeeey, Lovely Strange!! Your words always make me laugh. :D Thank you for dropping by. ♥

      Delete
  4. Great tutorial, this really helps to understand why there's always have a dark shadow in a small object! Thank you so much!

    ReplyDelete