Skip to main content

vScriptValPointsOnCube

Generate a 3D lattice of points with a set count per axis and one spacing value, 10 points per axis by default.

BeginnerMograph / ScriptValScriptValArrayJSON
vScriptValPointsOnCube node

vScriptValPointsOnCube has no input and outputs an array of XYZ points on a regular lattice centered on the origin. Number X, Y and Z set the count on each axis, and Multiplier sets the spacing.

Parameters​

ParameterTypeDefaultDescription
Number XInteger10Number of points along X. Range 1 to 100, default 10.
Number YInteger10Number of points along Y. Range 1 to 100, default 10.
Number ZInteger10Number of points along Z. Range 1 to 100, default 10.
MultiplierFloat0.05Distance between neighboring points on every axis. Range -1 to 1, default 0.05.
Read the full description

The node writes Number X * Number Y * Number Z points. Point (x, y, z) is placed at X = x * Multiplier - offset X, Y = y * Multiplier - offset Y and Z = z * Multiplier - offset Z, where each offset is (count - 1) * Multiplier / 2. The lattice is centered on the origin and Multiplier is both the spacing between neighbors and the scale of the whole block.

The points fill the whole volume, not only its surface. They are written with X changing fastest, then Y, then Z. With the defaults (10 points on each axis, Multiplier 0.05) the node outputs 1000 points in a cube that spans 0.45 units on each axis.

The node uses the same code as vScriptValPointsOnGrid. The two differ only in their default counts.

A negative Multiplier mirrors the lattice. Each count is limited to 100 by the control, which allows up to 1,000,000 points.

Example Connections​

vScriptValPointsOnCube.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input