Displacement shader question

Started by ruddiger52, November 10, 2010, 06:26:41 PM

Previous topic - Next topic

ruddiger52

Is there any difference to using a disp shader on the terrain list as opposed to the shaders list. I notice that it will place the node in different places on the graph but pretty much has the same effect.

Henry Blewer

I believe they are both the same. The Terrain Tab does not alter the landscape coloring; that is the main difference.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Goms

well, a shader with color on the terrain tab will also color the landscape.

the difference between terrain and surface comes from the compute terrain node.
All major displacements should happen before this, like the basic terrain shape, strata and so on.
this node computes then the slope, the normal and the altitude of the points in the terrain.
all displacements after this node should be minor, like a little bit of rock displacement etc.

hope that helped.


best regards,
Goms

Quote from: FrankB
you're never going to finish this image ;-)

Oshyan

To add to Goms' response, the reason it's important to do major displacement before adding color is so that when you do add color, if you use e.g. slope or altitude, then the system is able to use the properly measured values for these since the "Compute Normal" has taken care of calculating these values. If you add strong displacement after the Compute Normal, then these values are changed yet the altitude, slope, etc. functions are still referencing the old values since they haven't been recomputed for the later changes. You can add a Compute Normal to overcome this but it increases render times so is best avoided if possible.

- Oshyan

Tangled-Universe

I think he might get confused now Oshyan :)
The situation you describe is correct, except for the altitude-part of the story. Basically in your post you should replace the "compute normal" for "compute terrain", since:

Compute normal = compute terrain's normals -> gives you slope information
Compute terrain = compute terrain's normals + texture coordinates -> gives you slope AND height information
Tex coords from XYZ = compute texture coordinates only -> if you only need height information

Here's a link to Matt's "thesis" on this:
http://forums.planetside.co.uk/index.php?topic=1249.msg12539#msg12539

ruddiger52

Thanks for the info. Until Im more experienced it helps to follow a few "rules".  So displacement before compute terrain. 

Oshyan

Sorry yes, I spoke (wrote) too quickly and my information wasn't quite correct. Matt's post is the definitive reference. ;D

But yes, the basic rule is displacement before Compute Terrain, where possible.

- Oshyan

airflamesred

Well thats handy to know - and probably explains a lot of things not working for me. Makes sense now its been pointed out.