Jump to content

Depth map shadow artifacts and scene scale size


Recommended Posts

When I have a scene with a big size the shadows are rendered with a lot artifacts, Even if I increase the samples and the resolution a lot I still got some.

So is that how it works? big scene must have big parameters or there is another to fix it?

Thanks

Edited by tomhanks
Link to comment
Share on other sites

When I have a scene with a big size the shadows are rendered with a lot artifacts, Even if I increase the samples and the resolution a lot I still got some.

So is that how it works? big scene must have big parameters or there is another to fix it?

Thanks

You just need to play with bias. If you have a large scene you probably need to increase bias. So you prevent the face to shadow itself.

Cheers

Link to comment
Share on other sites

Thanks for the feedback

It really does, but in my case I have to put up a higher number then my shadow floats on the surface.

I did noticed that the scale of the scene really interferes on the shadow map results, but sometimes in simple scenes I got the artifacts anyway, I'll send an example soon as I can.

Link to comment
Share on other sites

Shadow bias is all about the lack of precision present in a shadow file at render time. The problem is that when Mantra is determinig if a surface is in shadow or not, it takes a 32 bit floating point position value for the surface being rendered and compares it to a very low 8 or 16 bit precision shadow map file transforming it from the space of the light. Shadow Bias will lift the shadow value to cheat the shadow test towards the light in the current Scene units.

There are two ways to increase the success of depth map shadows. Increase the precision in the actual shadow map file or set the shadow bias correctly to slightly "lift" the shadow off the various surfaces.

To increase the precison of the shadow map file, you can set the near and far clipping planes of the light to more tightly wrap up your scene.

If you are using light masks and the light generating the shadow map is only illuminating one or a few objects in the scene, you can use the Crop channels to focus the shadow map on a part of the view. Just look through your camera and using the Crop channels, tighten the left, right, top and bottom view to just envelop the object. If the object is animated it may or may not be worth tracking the crop channels.

You will have to add the Crop channels to the light using the Edit Render Parameters... I just move the entire View folder over to the Light if I want to access the crop channels.

To set shadow bias, you need to know that this parameter lifts or moves the shadow position towards the light in the current scene units. The current value of 0.05 works ok for scenes that sit in the space of the construction plane. Your typical 1-10 Houdini default scene. If your scene was 100 units, then move the value of 0.05 houdini units toward the light to 0.5 units toward the light and see how that works out.

Dialing in shadow bias is mostly scene size dependent so once it is dialed in, it is dialed in.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...