Tex Coords From XYZ

From Terragen Documentation from Planetside Software
Revision as of 01:27, 15 June 2021 by Redmaw (talk | contribs) (Enhanced description for node and added example image.)
Jump to: navigation, search
Tex Coords From XYZ


Overview[edit]

The Tex Coords from XYZ node generates world space texture coordinates for the shader or function nodes assigned its Main Input.

That is, it returns the current altitude of a given sample point which more than likely has been modified by displacements, such as a Power fractal shader, from its original position on the planet’s smooth surface.

Without this information, certain shaders within Terragen such as the Surface Layer shader, might not have the correct altitude values at render time. Click here for more information about an item’s render state.

Taking the default Terragen project for example, if displacements occur after the Compute terrain node in the Terrain group then it’s possible that a Surface Layer shader providing colour information for the terrain might not have the correct altitudes to apply colour or constraints.


Settings:

    • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Tex Coords from XYZ shader nodes in a project.
    • Enable: When checked, the node is active and the current world space texture coordinates will be calculated for the shader or function nodes assigned to the Main input. This includes all nodes upstream from the assigned shader node.


Workflow showing a displaced terrain with and without using a Tex Coord From XYZ 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 sample refers to a value or set of values at a point in time and/or space. The defining point of a sample is that it is a chosen value out of a continuous signal. In Terragen 2 it is usually a mathematical (procedural) function that is being sampled.

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.