Laterally Offsetted Terrain - Tops undisplaceble on small scale

Started by WAS, September 20, 2018, 10:37:57 PM

Previous topic - Next topic

WAS

I'm trying to do some low level surface detail on my outcrops scene, however, I notice some strange behavior. When you offset terrain, and than try to compute normal/terrain/texture coordinates the parts that are extremely offset on lateral, but become flat, can't really be effected by surface layers or fractal warp. Even though they're pretty "Normal" once offseted (the tops). Some of the sides of the offsetted laterals also won't take these small surface details but most will. Though I can warp the overall shape with large scales and warp shader, though again, smaller scales don't effect the tops, only the terrain which was never effected by lateral displacement.

Any ideas what this might be? What I was thinking is the displacement I "want" is offsetted "below" what is present in the render, which is why larger scales do effect it.

WAS

Was able to defeat this by giving my base displacement and lateral a much smaller (0.001) smallest scale which gave the tops some base displacement that blends with the fictionalization, but than gives more detail to the fractalized zones on the sides.  Still interesting behavior, you'd think the tops would be the easiest for TG to displace with surface shaders.

Matt

Fractal warp isn't displacement, and it doesn't know about the flat tops. It distorts the texture coordinates used by the input shaders, and this changes what the input shaders produce. Now, the flat tops are flat because they are stretched out from a much smaller area of the original surface. The fractal warp is affecting the surface that would have been before it was stretched out. The stretch is the dominant effect, and the effect of the warp is barely perceptible.
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Fractal warp doesn't even know after having added a compute terrain/normal and/or XYZ shader?

WAS

Quote from: Matt on September 21, 2018, 01:06:40 AM
Fractal warp isn't displacement, and it doesn't know about the flat tops. It distorts the texture coordinates used by the input shaders, and this changes what the input shaders produce. Now, the flat tops are flat because they are stretched out from a much smaller area of the original surface. The fractal warp is affecting the surface that would have been before it was stretched out. The stretch is the dominant effect, and the effect of the warp is barely perceptible.

You'd think the compute terrain / normal, would do as it's name indicates and normalize this geometry in the eyes of other shaders for further refining.

And I hope you understand by displacement I mean the detail in displacement already there. That being said though, you'll notice Fractal Warp on smooth displaced terrain does add to it's displacement peaks. Especially stepping in smooth hills. I also often use the fractal warp to warp noise for Displacement Shaders (which was my initial setup for surface displacement, now changed, trying to remedy this problem)

Quote from: Dune on September 21, 2018, 01:45:03 AM
Fractal warp doesn't even know after having added a compute terrain/normal and/or XYZ shader?

Nope, they have no effect (even if I don't use them altogether) besides patch zoning.

----

Update: This may be related to the orientation of the geometry behind the scenes. I tried to add some voronoi based cracks, and I limited them to only the lateral faces of the rocks, and it was mainly showing up on the tops of the rocks, and being cut off on the sides. So maybe the surface shader, and I guess displacement through it, is not reading it's orientation correctly.

I'm going to refine this into a somewhat usable state and share the project so you'll all be able to take a look at it. Right now I'm just organizing stuff from a million random shaders in the main terrain group and applying good naming conventions to hopefully help understand it.

Dune

My question was actually directed at Matt, so I hope he'll chime in again. I find that strange that the computes don't affect the fractal warper.

Matt

The mathematical answer: Warp shaders work by changing the texture space used by the input. They do this before calling the input, therefore it's mathematically impossible for anything in the input chain (such as Compute Terrain) to influence the warp shader. I'm not sure what the non-mathematical or intuitive answer is but I'll think about it  ;D
Just because milk is white doesn't mean that clouds are made of milk.

Dune