coverage area using depthmap shadow

   4451   7   2
User Avatar
Member
122 posts
Joined: May 2006
Offline
i use a spotlight with depthmap shadow to cover wide area in my scene, in fact i just want a small obj in the centre of my scene that will cast a shadow.

it's like a waste … the result shadow looks very low quality. of cource because the depth map file (res. 512x512) have to cover the whole scene (look through the spotlight view) where no shadow is applied except for the small obj in the centre.
anyone know how to set the depthmap to focus only to this shadow casting obj only so i will get better shadow quality without changing the light coverage area?

thanx
User Avatar
Member
7025 posts
Joined: July 2005
Offline
Look through the light and adjust the Focal Length of the light, essentially zooming in.

Cheers,

Peter B
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
If you use the light handle, you can also RMB the handle and lock the frustrum to the view. That ensures that your depth map is the same size as the fov.
There's at least one school like the old school!
User Avatar
Member
122 posts
Joined: May 2006
Offline
thanx a lot guys,
i tried it, and now i have another question…
this way i can focus to just my small obj in the center of the scene,
so the shadow quality is better now. but what if this object is not in the center? let say it's moved to the corner - near the edge of my scene… which mean i have to increase the focal length to cover this obj, which will create a low qualtiy shadow.
so there's nothing i can do about it, right?

tx.
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
You can do a lot. You can track the object while looking through the light in question frame by frame if necessary and adjust the Crop values. Keyframe if you have to.

The values you can adjust are the center Window X/Y location, the Window Size and the Window Roll. It is obvious what they are doing when you are looking through the light.

Now these change the frustrum of the light which has nothing to do with the illumination cone direction of the light. No lighting values will change by adjusting the crop folder values.

The shadow map generated will use these Crop folder values though and that is what you want. Nice fat zdepth map with the objects in the scene using close to the full resolution available.

Make sure to turn off link camera cone to frustrum on the handle.
By switching between the cone handle and the frustrum handle with off-default values in the Crop folder, you should see the direction change between the two.

Note: Now you can't look throug the light and just see the cone angle direction but the cone angle modified by the Crop values.

This is one of the reasons why many users/facilities create their own Light HDA and place at a minimum two lights where one light would be dedicated to generate the depth map parented to the first light. Gives you control plus artist feedback. You don't need to do that given that you know what is the issue now. Just work around it.


Have you tried deep shadow maps as well? You get much more quality for the same resolution with the caveat that it takes more time to generate the deep shadow map and that it is larger on disk.
There's at least one school like the old school!
User Avatar
Member
122 posts
Joined: May 2006
Offline
thanx a lot Jeff,

i'm working on it and waiting for another issue to come up
btw in maya the point light can use depthmap shadow by creating 6 dmap files for each direction : +x-x +y-y +z-z. But in houdini the depthmap shadow doesn't work with point light. is it right?
anyway thanx a lot.
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
You can accomplish the identical thing in Houdini. You just need six lights parented up to the master point light. These six additional lights are rigged up to render the deep shadow maps and have their dimmer value set to zero.

Should be straigthforward to rig up yourself in to an HDA.

I bet you that is what Maya/Mtor is doing.
There's at least one school like the old school!
User Avatar
Member
122 posts
Joined: May 2006
Offline
i tried to use the window crop x/y, but if i set this value, the shadow is always shifted from the object. why is it?

tx.
  • Quick Links