Displacement Shader to Vector

From Terragen Documentation from Planetside Software
Revision as of 01:54, 27 December 2013 by Jo (talk | contribs)
Jump to: navigation, search

Node Description and Purpose:
The Displacement shader to vector node extracts the displacement generated by the connected shader and returns it as a vector.

In general, shaders may displace in any direction, so displacement is a vector. Note that if the output of this node connects to a function that expects a scalar input, a scalar will be generated from the length (magnitude) of the vector according to Terragen's conversion rules (see Node Input Type Conversion). Be aware that this may not give you the results you expect if the displacement is negative, because the resulting scalar will always be positive or 0. In some cases Displacement Shader to Scalar may be more suitable.

See also: Displacement Shader to Scalar


Node Type: Function


Settings:
This node has no other settings apart from the Input node.

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 vector is a set of three scalars, normally representing X, Y and Z coordinates. It also commonly represents rotation, where the values are pitch, heading and bank.

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.

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 scalar is a single number. 1, 200.45, -45, -0.2 are all examples of scalar values.

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.