tex/PolyNode tex/Solver tex/Builder code/TextureLaplacian mat/Volume mat/VolumeSurface
Documentation / Node reference / mat nodes
Renders a VOLUME object as the surface of its distance field.
Volume
Shows a volume as the solid it describes rather than as smoke. The ray stops where the field crosses the iso value, and the surface there is shaded like a mesh: lit, shadowed and depth sorted with the rest of the scene. Nothing is meshed on the way, so editing what feeds the volume redraws at once, at any grid size.
The field can instead come from a 3D texture made in TEX, such as a simulation, read where the GPU wrote it: the volume then only says where the box is, and a density simulation is seen as the solid it grows.
A volume from geo/VolumeCreate in DISTANCE mode is drawn this way already, with no node, because it carries distances and no density. This node is there to tune how it looks, and to choose this reading for a volume that also carries a density.
What you see is what geo/VolumeTriangulate would mesh at the same iso value, so this is the quick way to judge a shape before meshing it for export.
The colour attribute, when the volume has one, multiplies the colour param, the way a vertex colour multiplies a mesh's.
There is no surface to see in a browser running on WebGL, which cannot bind the voxels. Mesh the volume with geo/VolumeTriangulate there.
| Name | Type | What it does |
|---|---|---|
| fieldSource | UInt8 ATTRIBUTE · TEXTURE | Where the field comes from. ATTRIBUTE reads it from the volume's own POINT attribute. TEXTURE reads it from a 3D texture made in TEX, such as a tex/Solver simulation, without bringing it back to the CPU, so a large simulation can be watched live as a solid. With TEXTURE the volume only gives the box the texture fills, whatever its own resolution, and the ray steps by the texture's texels. |
| texture | NodePath | The TEX node whose 3D texture holds the field, used when fieldSource is TEXTURE. The texture is stretched over the volume's box, and that node cooks whenever the material is drawn, so a simulation steps with nothing else pulling it. |
| channel | UInt8 R · G · B · A | Which channel of the texture is the field, used when fieldSource is TEXTURE. A simulation often keeps several values in one texture: pick the one whose level is the surface. |
| attribute | AttributeName | Used when fieldSource is ATTRIBUTE. Which FLOAT POINT attribute holds the field. Distance for a signed distance field, which is what geo/VolumeCreate writes in DISTANCE mode, or any float attribute geo/VolumeBuilder wrote. |
| inside | UInt8 ABOVE · BELOW | Which side of the iso value is solid. BELOW for a signed distance, which is negative inside. ABOVE for a density, which is high inside. BELOW also lets the ray take each reading as a distance and move by it, which is much faster. Under ABOVE it moves half a voxel at a time, or half a texel with fieldSource TEXTURE. |
| isoValue | Float | The value of the field the surface sits at. On a distance field 0 is the shape it was made from, a positive value grows the shape by that distance and a negative one shrinks it. Same as geo/VolumeTriangulate's threshold, so the two agree. |
| colorAttribute | AttributeName | An optional VECTOR3 POINT attribute holding a colour per voxel. It is read where the ray hits and multiplies the colour param. A volume without it is drawn in the colour param alone. |
| color | Color | The surface colour. A colour attribute on the volume multiplies it. |
| roughness | Float | How rough the surface is. 0 is a mirror finish and 1 a broad matte sheen. |
| metallic | Float | Whether the surface behaves as metal. 0 keeps its own colour and adds a separate highlight. 1 tints the reflection itself with the colour. |
| stepScale | Float | How much of each distance reading the ray moves by. A distance grid read between its voxels slightly overstates the distance, so a full step can cross a thin part without seeing it. Lower is safer and slower. Only used when inside is BELOW. |
| maxSteps | UInt32 | The most steps one ray takes before it gives up. A ray that runs out shows the pixel as empty, which looks like holes at grazing angles on a large grid. Raise it there, and check with the STEP_COUNT debug view. |
| debugView | UInt8 NONE · NORMAL · STEP_COUNT | Replaces the shading with what you need to see when something looks wrong. NORMAL paints the surface normal, which shows faceting and noise in the field. STEP_COUNT paints how many steps each ray took, from blue for few to red for the most allowed, including the rays that missed. |
| environmentMode | UInt8 AUTO · GLOBAL · PARAM · NONE | Where the environment map comes from. AUTO uses the envMap below when it is set and the scene's geo/Environment otherwise, which is why dropping an environment node into a scene lights every untouched material at once while the ones already wired keep their own map. GLOBAL always uses the scene environment, even if envMap is set. PARAM always uses envMap, so this material ignores the scene. NONE switches environment lighting off for this material. When the scene environment is used, its intensity multiplies this material's envIntensity. |
| envMap | NodePath | An optional TEX node holding an environment map, which lights the surface from every direction. Prefilter it with tex/EnvironmentGGX so roughness can pick a blur level. |
| envIntensity | Float | How strongly the environment map lights the surface. 0 switches the environment contribution off entirely. |
| envColor | Color | A tint on the light the environment map contributes. White leaves the map as it is. |
| sides | UInt8 FRONT · BACK · BOTH | Which side of each triangle is drawn. FRONT draws the outward-facing side only, which is what a closed mesh wants: its inner surface is hidden anyway, so drawing it is wasted work. BACK draws the inward-facing side, for a surface seen from the inside such as a skydome or a box the camera sits in. BOTH draws either side, which is what an open single surface needs: a cutout leaf, a sheet of cloth, or a plane the camera can walk around, all of which disappear from one side under FRONT. The shadow pass follows BOTH so an open surface still casts a shadow whichever way it faces the light, and draws FRONT otherwise. |
Scenes you can open in the editor that teach this node.
tex/PolyNode tex/Solver tex/Builder code/TextureLaplacian mat/Volume mat/VolumeSurface
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.