Planetside Software Forums

General => Terragen Discussion => Topic started by: jritchie777 on October 09, 2009, 11:49:29 PM

Title: Shader use on Heightfield nullifies heightfield
Post by: jritchie777 on October 09, 2009, 11:49:29 PM
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
Title: Re: Shader use on Heightfield nullifies heightfield
Post by: rcallicotte on October 10, 2009, 08:12:25 AM
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.
Title: Re: Shader use on Heightfield nullifies heightfield
Post by: Henry Blewer on October 10, 2009, 08:49:42 AM
Post the tgd file. I'm curious. You may be making the same mistake I did early on in my Terragen 2 endeavors.
Title: Re: Shader use on Heightfield nullifies heightfield
Post by: jritchie777 on October 10, 2009, 10:46:38 PM
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
Title: Re: Shader use on Heightfield nullifies heightfield
Post by: Henry Blewer on October 10, 2009, 11:39:48 PM
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.)
Title: Re: Shader use on Heightfield nullifies heightfield
Post by: jritchie777 on October 10, 2009, 11:56:52 PM
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
Title: Re: Shader use on Heightfield nullifies heightfield
Post by: Henry Blewer on October 11, 2009, 08:25:30 AM
Very glad to help.