Difference between revisions of "Heightfield Generate - Use Shader Tab"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
 
Line 1: Line 1:
[[Image:drex_module_178_2_image_0.png|465pxpx|Heightfield Generate - Use Shader Tab]]
+
[[Image:drex_module_178_2_image_0.png|center|Heightfield Generate - Use Shader Tab]]
  
 
'''Description:'''<br />
 
'''Description:'''<br />
Line 5: Line 5:
  
 
Using a shader to generate the heightfield data could be useful in several ways. A heightfield might be quicker to render than a complex shader network. You can use it to &quot;capture&quot; the shader displacement so you can export a heightfield to use in another application. The heightfield won't have the same detail as the shader but it could be sufficient. It might be useful as a low resolution stand-in for animating objects in another application for example. You could also load the heightfield for further processing in a heightfield editing appplication.
 
Using a shader to generate the heightfield data could be useful in several ways. A heightfield might be quicker to render than a complex shader network. You can use it to &quot;capture&quot; the shader displacement so you can export a heightfield to use in another application. The heightfield won't have the same detail as the shader but it could be sufficient. It might be useful as a low resolution stand-in for animating objects in another application for example. You could also load the heightfield for further processing in a heightfield editing appplication.
 +
  
 
'''Settings:'''<br />
 
'''Settings:'''<br />
Line 28: Line 29:
  
 
</ul>
 
</ul>
 +
  
 
Back to: [[Heightfield Generate]]
 
Back to: [[Heightfield Generate]]

Latest revision as of 08:34, 11 April 2012

Heightfield Generate - Use Shader Tab

Description:
This tab has parameters which let you use a displacement shader to generate height information for the heightfield. You assign a shader and then use the Generate Node button to generate the heightfield from the shader. You will need to regenerate the heightfield whenever you make changes to the assigned shaders.

Using a shader to generate the heightfield data could be useful in several ways. A heightfield might be quicker to render than a complex shader network. You can use it to "capture" the shader displacement so you can export a heightfield to use in another application. The heightfield won't have the same detail as the shader but it could be sufficient. It might be useful as a low resolution stand-in for animating objects in another application for example. You could also load the heightfield for further processing in a heightfield editing appplication.


Settings:

  • Shader: This lets you assign a shader to be used to generate height information.
  • Position center: If this is checked the origin of the shader assigned above is placed in the centre of the heightfield. The image below shows a heightfield generated Simple Shape Shader position in the centre. The origin of the Simple Shape Shader is at the centre of the shape.

    Hfgen shader centre.gif
  • Position lower left: If this is checked the origin of the shader assigned above is placed at the lower left of the heightfield. The image below shows the same Simple Shape Shader used in the image above, but this time it's placed at the lower left.

    Hfgen shader lowerleft.gif
  • Position: This setting can be used to change the area of the shader which is used to generate the heightfield data. It's an offset from the origin of the shader. For example if you set the X field of the parameter to 500 the area of the shader covered by the heightfield is moved 500 m to the right.

    The following image shows a Simple Shape Shader placed at the top left of the generated heightfield using the Position parameter. The heightfield is 10000 x 10000 and the shader is 5000 x 5000. The shader is positioned using its centre. The Position parameter was set to 2500, -2500 to put the shader in that location.

    Hfgen shader offset.gif


Back to: Heightfield Generate

Literally, to change the position of something. In graphics terminology to displace a surface is to modify its geometric (3D) structure using reference data of some kind. For example, a grayscale image might be taken as input, with black areas indicating no displacement of the surface, and white indicating maximum displacement. In Terragen 2 displacement is used to create all terrain by taking heightfield or procedural data as input and using it to displace the normally flat sphere of the planet.

A shader is a program or set of instructions used in 3D computer graphics to determine the final surface properties of an object or image. This can include arbitrarily complex descriptions of light absorption and diffusion, texture mapping, reflection and refraction, shadowing, surface displacement and post-processing effects. In Terragen 2 shaders are used to construct and modify almost every element of a scene.

A heightmap or heightfield is an array of height values, usually in a grid which describe the height at specific points in a defined area. Heightfields are used to represent real-world and virtual terrain in a specific, easily converted format. Most heightfields can be represented as simple image data in grayscale, with black being minimum height and white being maximum height.

A parameter is an individual setting in a node parameter view which controls some aspect of the node.