A Question About the Redirect Shader

Started by RichTwo, July 09, 2011, 10:16:08 pm

Previous topic - Next topic

RichTwo

I have been a bit off-and-on about my use of the redirect shader.  I know that displacements must be applied with prudence.  I know also which the directions, i.e. X-Y-Z do.  But one thing I noticed:  The X and Z axes displace 180 degrees from each other when they should (geometrically speaking) be 90 degrees apart, just as they are with Y.  I found this when my structures were roughly polygonal and the effect was pronounced on one side, but not so much, or at all on another.

Just wondering if there is a setting to make the displacement be truly 3-D as viewed from the camera, or it's just how the shader is?  Thanks for any insight!
They're all wasted!

Henry Blewer

You can use a Displacement shader with an Image map to drive the displacement. Use a seperate/new camera for mapping in x or z. y is vertical in Terragen 2.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

RichTwo

Thanks for the reply, nj but you may as well have been speaking Swahili to me... what type of image map (?) and I have no idea on what to do with a camera projection to make a displacement to make it do what I want.  Sorry but  I am obviously quite inept at all this.
They're all wasted!

Henry Blewer

Not inept. That's me trying to play basketball. ::)

Let me see if I can set up a scene for you. I thought it would be simple, but I'm getting weird results trying to set it up quickly right now.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Henry Blewer

Here is the file for the displacement shader set up. http://forums.planetside.co.uk/index.php?topic=12745.msg126687#msg126687

You'll need to add a redirect shader into the Terrain nodes. This can be done in the window to the left of the preview window. Just Add Terrain/Displacement Shader/Redirect Shader.

Now go to the Terrain nodes. Connect the 1st Compute Terrain to the input of the redirect shader. Last connect the power fractal to the x and z inputs of the redirect shader. The preview window should refresh quickly, showing the effect of the power fractal. The power fractal is driven by the displacement shader/image map set up.

You can disconnect the power fractal and connect the displacement shader directly to the redirect shader. I added the power fractal to 'clean up' the low quality imagemap 'paths' jpeg.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T