Lateral Displacement Artifacts

Started by WAS, October 18, 2015, 11:19:55 PM

Previous topic - Next topic

WAS

Is there anyway to remove/minimize the broken terrain artifacts in lateral displacement? Both only, and normalize create some weird black lines that are not apparent in vertical only.

I've been finally starting to somewhat... slightly... understand functions and trying to come up with some cool rock formations.

It seems even with just a PF on a displacement layer on lateral only or normal will both create this anomaly. Is there just no using this without broken artifacts?



Normal PF on lateral



Matt

#1
The renderer is struggling with so much overlapping and intersecting polygons created by the displacement you have. In the 3D Preview you can see some telltale signs that this is happening. The polygon sizes and shapes are very irregular. While this isn't always a problem, it can be a warning that the renderer is dealing with some extreme displacement.

The main thing that's causing this is the small patch size on the compute normal (1) combined with rocky displacements that have a much higher amplitude (5). Increasing that patch size to 5 gives a much more well-behaved surface. I don't know if you'd be happy with the resulting shape because it's less dramatic (but in a good way for the renderer).

Looking at the overall shader network, I think you could probably put all of these displacements after the Compute Terrain. Compute Terrain also computes normal, so if you have something that requires a computed normal (such as this lateral displacement) then as long as it comes after the Compute Terrain it will work. By only computing the normal in one place you will greatly reduce the render time as well. However, using a shader after the Compute Terrain will mean it works with different texture coordinates. But depending on what you want, this might actually be better at producing a realistic rock face.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

WAS

Quote from: Matt on October 19, 2015, 06:26:52 PM
The renderer is struggling with so much overlapping and intersecting polygons created by the displacement you have. In the 3D Preview you can see some telltale signs that this is happening. The polygon sizes and shapes are very irregular. While this isn't always a problem, it can be a warning that the renderer is dealing with some extreme displacement.

The main thing that's causing this is the small patch size on the compute normal (1) combined with rocky displacements that have a much higher amplitude (5). Increasing that patch size to 5 gives a much more well-behaved surface. I don't know if you'd be happy with the resulting shape because it's less dramatic (but in a good way for the renderer).

Looking at the overall shader network, I think you could probably put all of these displacements after the Compute Terrain. Compute Terrain also computes normal, so if you have something that requires a computed normal (such as this lateral displacement) then as long as it comes after the Compute Terrain it will work. By only computing the normal in one place you will greatly reduce the render time as well. However, using a shader after the Compute Terrain will mean it works with different texture coordinates. But depending on what you want, this might actually be better at producing a realistic rock face.

Matt

Truly insightful on the displacement function. Thanks for the tips Matt.