Peter Panning Issue with Line Of Sight System for 3D Environments

Hi everyone,

I’ve misused a point light that cast shadows for a line of sight system for a 3d project:

This system unfortunately reveals some areas behind walls due to Peter Panning. I know that ray-traced screen space shadows in Unity’s High Definition Render Pipeline don’t have this problem but that would limit my audience to people with RTX graphics cards and is also quite expensive (performance-wise). Another approach (at least in theory) would be to cast rays into the scene and create a mesh based on their hit points but that’s no option for me for several other reasons.

Do you have any other suggestions on how I could achieve this line of sight system without the Peter Panning issues?

No one?

Is it an option to put the items where this is an issue slightly inside of the ground?
Otherwise in the shadow settings play with the depth and normal bias in the URP. Not sure if there is a similar setting for HDRP.
Looking at the project I see URP being more fit for it in general. Any reason why HDRP is used?

Recent versions also should have screen space shadows. These are not ray traced, but might be worth a shot. Probably not as good as regular real time shadows however

Peter panning is a fact of life for Unity’s point lights. One solution might be to look at implementing stencil shadows, or look at into doing shader based screen space raytracing via simplified shapes.

That does not work as Unity’s shadow mapping is based on the depth information from the perspective of the point light and this depth information does not change when lowering the walls into the ground.

I am using the built-in rendering pipeline in the video above, not HDRP. I just mentioned HDRP because I know that ray-traced screen space shadows in HDRP don’t have “Peter Panning” issues and URP does not support ray-traced screen space shadows out of the box.

Thank you for trying to help, though. :slight_smile:

Thanks bgolus. When you write “shader based screen space raytracing”, do you refer to a technique that requires RTX graphics card from nVidia (or AMD) or to a technique that is software" based, e.g. path-tracing? If the latter is true: Can you guide me to some literature/references with more information?

Neither.

Have a structured buffer filled with an array of transforms for boxes that represent the scene geometry, then do cheap ray intersection tests.
https://www.shadertoy.com/view/ld23DV

1 Like

Interesting! I will take a look at that. Thanks again. :slight_smile: