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.
Historically, this node was first written to compute texture coordinates, and later as the need for surface normals became apparent the Compute Normal node was written. Finally, the Compute Terrain node combines the functionality of the Tex Coords from XYZ node and the Compute Normal node into one node.
It’s important to understand that in order for displacements and textures to be in sync and aligned, there should only exist one calculated solution within a given branch of the node network. This is why the Terrain Group ends with a Compute Terrain node in the default Terragen project before moving onto the Shaders Group. This workflow ensures that every shader will have consistent knowledge of the texture coordinates to work with. However, if your workflow doesn’t require normals to be known, such as using Redirect shaders and Vector displacement, then the Texture Coords from XYZ may be a faster solution than the Compute Terrain node because it only calculates texture coordinates.
Therefore, having a Tex Coords from XYZ and a Compute Terrain node in the same branch of a pipeline is not recommended. Multiple Tex Coordinates from XYZ and/or Compute Terrain nodes can exist in a project provided they’re not being used by the same node network branch. For example, a Compute terrain node with a Patch Size of 200 could exist and be used for populations only, while another Compute terrain node with a Patch Size of 20 is connected from the Terrain group (displacements) to the Shader group (texturing).
Certain workflows may also benefit by having the major surface displacement nodes positioned prior to the Compute Terrain node, and having the smaller, secondary displacements, such as a Strata and Outcrop shader occur after the Compute Terrain node.
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.
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 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.
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.