Download

Contact Shadows: bug?

I’ve run into a problem with the new contact shadows. They look great up close, but have unwanted side effects at a distance. Note in the example the tree trunks and people - they get an offset silhouette.

It’s a screen space effect (like SSAO or SSR), so there’s plenty of artifacts. Hopefully it’ll get better over time, since this is the first versions/implementation of this. I’ve had the best results from .01-.1, but there’s always issues somewhere. To me, it doesn’t seem like it’s in a shippable state currently, but maybe someone will find scenarios where it’s acceptable.

Are the people just planar meshes with a cutout texture or are they proper 3d models?

If you plan to have a single mesh in your scene which happens to be ideally suited to demo the new Contact Shadows, go have a blast. If not, just consider it a completely useless feature that never should have made it into the engine in its current state.

The contact shadows should be where you get close to the object, but I’m not sure they can be controlled that way. Since it’s a screen-space effect then it will have issues in scenes with a large amount of depth

They’re 3d models.

Well from the responses, i’m going to go ahead and not use them. Maybe parallax shadows with the new Atmospheric Light Vector will serve me better (for parallax materials anyway).

Same problem here. It looks like the shader receives not the position/vector of the light, but that of camera. So it looks strange. Like a flash light cut by some distance.

They aren’t meant to be used for large-scale shadowing like that. They’re raytraced from the camera and based on the depth buffer(I think?), so they have limitations at longer distances(as the buffer loses precision) and various camera angles in relation to some objects(meshes overlapping + low precision depth buffer.)

Think of them as a means of filling in the gaps of low lightmap resolutions or disconnected shadows, particularly for up close shots. Another useful feature is using Pixel Depth Offset for height variation(like POM without self-shadowing), because the Contact Shadows will pick up PDO changes.

I would however like the ability to set the distance from camera that the Contact Shadows are visible, because in some cases even really low numbers do create noticeable shadow issues at farther distances. If they’re truly only meant to be used near the camera, we should be able to limit them as such.

I do understand all that. But in the example above, it’s obvious that it’ll not fill any gap, because they pointed in wrong direction even tough example constructed the way that it takes into account buffer discontinues and such everyone likes to point out. So, whatever situation it will be, they work incorrectly regardless of length option. And even more, the bug become more obvious with distance. So the feature become completely useless although the idea itself is great.

4.14.1 Hotfix going out soon should resolve the issues you’re seeing with Contact Shadows.

Glad to hear that. I just tested them myself and noticed they look significantly worse than they did in 4.13.