triPlanarTextureField

triPlanarTextureField

field
triPlanarTextureField
RayTK
v0.42

Texture field that uses surface normals (or other blending techniques) to apply a texture facing each axis.

On a cube centered at the origin, this has the effect of placing the texture on each side of the cube. For a sphere, when using normal blending, the texture for each axis will smoothly blend as the surface normal shifts from one axis to another.

Textures are centered at 0,0 with coordinates ranging from -0.5 to 0.5.

Parameters

Name Description Regular Handling Read-Only Handling
Enable
Return Type

Type of value to produce.

  • Float: Single float value (from the R channel).
  • Vector: RGBA values.
Translate Runtime Baked
Scale Runtime Baked
Use Separate Textures

Whether to use a single texture for all axes, or a separate texture for each axis.

Baked Baked
Texture
Texture X
Texture Y
Texture Z
Extend Mode

How to handle coordinates outside the texture’s bounds.

Semi-Baked Semi-Baked
  • Hold: Clamp the coordinates so that the last pixel on each side is extended out infinitely.
  • Zero: Produces values of 0 outside the bounds.
  • Repeat: Tiles the texture.
  • Mirror: Tiles the texture, but flips alternating copies of it.
Blend Mode

How to combine the colors from each axis.

Semi-Baked Semi-Baked
  • Normal Blend: Use surface normals to blend the colors. Note that this can cause issues with material local positioning.
  • Add Axes: Add the colors from each axis.
  • Axis Maximum: Maximum for each channel from each axis.
  • Axis Average: Average the colors from each axis.

Inputs

  • UV Map Field: (optional)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: MaterialContext
    • Return Types: vec4