Shader use on Heightfield nullifies heightfield

Started by jritchie777, October 09, 2009, 11:49:29 PM

Previous topic - Next topic

jritchie777

Hello all,

Not quite understanding what is going on, I am trying to assign a displacement shader (crater, twist & shear, strata & outcrops...) don't care which one.  The problem is when I assign a shader to the heightfield generate in the tab Use Shader I never get a heightfield.  When I use the same shaders in the shader section they work fine.  Problem is if you are using more than one heightfield the shader then effects all heightfields the same - not good if you want different results for each heightfield...

What am I doing wrong? 

Base goal is I want to be able to put different displacement shaders on different heightfields.
Thanks.
JR

rcallicotte

Hopefully I understand what you mean.  You should be able to use the Heightfield Operators on the Heightfield and use the Shaders on everything below the Compute Normal.  I'm sure there are so many things you can try, but this is the default way.
So this is Disney World.  Can we live here?

Henry Blewer

Post the tgd file. I'm curious. You may be making the same mistake I did early on in my Terragen 2 endeavors.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

jritchie777

I've attached a sample.  I've declared two Heightfields, which work fine when you hit generate now.  Then I place a different shader on each one and hit generate now, and the heightfield nullifies down to a flat surface.  I've made the file small so as to not take up much resources.

Thanks for your help!!!!
JR

Henry Blewer

The two shaders you have used are effect shaders. They will change the character of your terrain. The should be after the two heightfield shaders, not called from with in. They do not have 'color' data to produce displacement, rather they work similar to operators.
Take to two shaders out of the heightfield inputs where you have them. Click on the Terrain group in the node network. It's on the left side of the node network. You may have to move the shaders into the Terrain node group. From the second heightfield's output, connect this to the twist and shear shader. Do the same from the twist and shear shader to the strata shader's input. Connect the strata shaders output to the Compute Terrain. Now go back to each heightfield and click on compute. You should see your heightfields now have y axis data (There should be vertical displacement.)
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

jritchie777

Wicked Cool!  I had to read your comments slowly several times, but I see the difference now.  You can only notice when you are in the Node network, with the list the shader seems to be in the correct position.

Thanks for explaining that to me!!!
JR

Henry Blewer

http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T