Documentation / Node reference / code nodes

code/TextureSample3D

Reads a 3D texture at a point inside it, blending between voxels.

Sdf3d

mode VALUE reads the colour of a 3D texture at a uvw, a point given from 0 to 1 on each axis, through a code/Sampler, which blends the voxels around it. Connect the texture from a code/TextureInput (a 3D texture wired into a tex/Builder) or a code/Param set to a 3D NodePath. In a 3D tex/Builder, code/Globals' UVW is the centre of the voxel being written, so a texture of the builder's size reads back as it is there. With nothing connected to uvw, the uvw param is used.

mode DISTANCE and mode GRADIENT read a distance field placed in the world, as a tex/Volume of a geometry's distance makes: the point is a world position, which the node turns into a uvw from the texture's bounds. DISTANCE gives the distance there, GRADIENT the direction in which it grows. With nothing connected to uvw, the position of the point being shaded is used.

A 2D picture is read with code/TextureSample2D instead.

Parameters

Name Type What it does
mode UInt8 DISTANCE · GRADIENT · VALUE What is read. VALUE: the texture's colour at a uvw, 0 to 1 on each axis. DISTANCE: the distance of a distance field at a world position. GRADIENT: the direction in which that distance grows, at a world position.
uvw Vector3 Where to read when nothing is connected to uvw: a point from 0 to 1 on each axis in VALUE mode. DISTANCE and GRADIENT read at the point being shaded instead. Greyed out when uvw is connected.

See also

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.