View Full Version : Problem with depthmap shadow

04 April 2010, 03:28 PM
Hi Everybody ....
i have this problem when i using depthmapShadow .
the scene is sooo big and for the sake of the rendering time i can't use ray trace shadow for rendering.i cant just simply scale down the scene cause its part of the other scene.
somebody help me the only thing i can do is bake the shadow with spot light near the scene not too far from the objects and assign it in layered texture with blending mode set to illuminate but its not what i want .
in this image i using directional light and its in maya.
please help me there must be some attr some where for situations like this....

04 April 2010, 03:39 PM
There are two options that I would suggest:

1. Instead of using a directional light use a spot light and place it very far away from the scene. Adjust the spots cone to be as small as possible yet still illuminates the scene as you like. Then enable depth mapped shadows on that light. Since using a spot light limits the illumination to a cone it also limits the depth map to a cone. Now your depth map will not need to be as high resolution.


2. You could always disable the directional lights shadows and then use a shadows only spot light to subtract the shadows. To do this, place the spot light as in the above example and then set the lights color to 0,0,0 and the shadow color to -1,-1,-1. This will pull shadows out of the directional lights illumination. With this situation you may even be able to have an even smaller depth map than the previous option because the shadows are independent of the illumination. You can make the cone angle of the spot light as tight as you need around the shadow casting objects or even have a different shadow light for each object.

04 April 2010, 05:30 PM
woaw thanks the second option is truly nice trick to do dude i did the first one i didn't get nice result using black color light and superblack shadowcolor for depthmap shadow is great it gives nice shadow in every area we want and no extra lighting in areas
that's what i needed dude thanks
and thanks for your reply

04 April 2010, 08:12 PM
"Shadow-only lights" are sometimes the greatest invention since sliced bread. (Since sliced raisin bread!) :applause:

CGTalk Moderation
04 April 2010, 08:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.