material
Procedural Voxels Base Texture
Get this materialThis is the base material texture that divides a 3D space into voxels with arbitrary number of voxels per cycle and assign different texture and/or materials to different output indices (see parameter description below).
Think of the material texture as it consists of small voxels of different colors stacked-up diagonally in a 3D space.
Input
Vector – A 3D vector.
Width – Width of one cycle.
Steps – Number of steps in a cycle.
dx, dy, dz – Offset in voxels.
Output
Index – All indices in range [0, Steps).
Please check this and this GIFs to better understand what this material texture does. Parameters used in that GIF are:
Vector = Object Vector
Width = 1
Steps = 5
dx = 0
dy = 0
dz = 0
The result consists of 5 colors that represent indices of the cubes: 0, 1, 2, 3, and 4 (see here).