Heightfield from shader

Started by Blinkin, March 24, 2008, 02:36:01 PM

Previous topic - Next topic

Blinkin


I've been trying to get the "heightfield from shader" node to work in order to output a displacement map for use in other applications.  Is this feature working?  I have been searching the forums in order to find a recent post on this node and I can't seem to find much information.  Anyone have any luck with this and would you be able to give me a few pointers on how to hook it up properly?  Thanks.


Oshyan

It does work, but you may not understand exactly how to use it. Its functionality is also essentially encompassed in the normal Heightfield Generate.

The basic approach is the same with either the Heightfield From Shader or Heightfield Generate nodes. Simply hook your shader output to the Shader input of the node and then press the Generate button. This will create the heightfield version of your shader, however it does not automatically save it to an external file. You must right-click the node and choose Save File As, giving it a name with a .ter extension, and then a heightfield in Terragen's .ter file format will be created.

- Oshyan

Matt

#2
It is usually best to use Heightfield Generate, rather than Heightfield From Shader. Heightfield From Shader does not actually create new heightfield data, so it needs to have a pre-defined heightfield as its input. It is only included for backward compatibility.

Another important thing to know is that these generators read displacement information from the shader, not colour.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

jay88

I've been trying to use the Heightfield from Shader node in order to create a heightfield from the Alpine Fractal Shader.

I have Alpine Fractal Shader plugged into the Shader input of Heightfield from Shader which in turn goes into a Heightfield Resize and finally Heightfield Shader 01.

However, when I press the Generate button, I still don't see a heightfield appear. What am I doing wrong here? I'm still fairly new to Terragen and how the Node network works, so any input is greatly appreciated.

- John.

Oshyan

As Matt said, it's best to use Heightfield Generate instead of Heightfield From Shader. They should work similarly however. The generated heightfield will be in the same position as a portion of your terrain, so you may not even see any difference. If you turn off the fractal terrain after generating the heightfield, you should see only the heightfield remaining. If there is nothing, try it with a Heightfield Generate instead. If all else fails, post your TGD here and I can probably resolve the issue.

- Oshyan

jay88

Thanks Oshyan for the reply, but I'm not sure I understand correctly. Are you saying you can capture an Alpine Fractal with a Heightfield Generate on top, then turn off the fractal to leave just the heightfield?

The reason I wanted to use the Heightfield From Shader is that the Alpine Fractal Shader is much closer to the look of the mountains I wanted than the default Power Fractal v3, which, if if recall, is what powers the Heightfield Generate function?

Cheers,
john.

jay88

Ah - Success! I now see what was meant... you use the "Use Shader" tab in the Heightfield Generate settings to load the Alpine Fractal. So obvious now! Although strangely the first generate created a uniform noise pattern for some reason, but on the second generate I got my sweet mountains.  ;D

Oshyan

Glad to hear you got it sorted out. :)

- Oshyan