Skip to main content

vScriptValScatterInstOnMesh

Stamps a template point cloud at every mesh vertex or given position, tilted to the normal.

AdvancedMograph / ScriptValScriptValArrayJSON
vScriptValScatterInstOnMesh node

vScriptValScatterInstOnMesh takes a Template point cloud and places a copy at each mesh vertex, or at each point of Surface Positions. Each copy can be turned to the surface normal, scaled and yawed with seeded variation.

Parameters​

ParameterTypeDefaultDescription
ScaleFloat1Scale of each copy. Minimum 0, slider 0 to 10, default 1.
Align To NormalsFloat1Tilts the copies to the normal when on (default). When off, they are not tilted.
Normal BlendFloat1Mix from the up axis (0) to the normal (1). Range 0 to 1, default 1.
Yaw OffsetFloat0Rotation of each copy around its Y axis in degrees. Slider -180 to 180, default 0.
Random YawFloat0Random extra yaw in degrees, between minus and plus this value. Minimum 0, slider 0 to 180, default 0.
+9 more parameters
ParameterTypeDefaultDescription
Scale RandomnessFloat0Random scale variation, up to this share of the scale in either direction. Range 0 to 1, default 0.
SeedInteger0Integer, range 0 to 1000000, default 0.
Preview DecimateInteger0Keeps only every Decimate Step position when on. Default off.
Decimate StepInteger2Step for Preview Decimate. Range 1 to 1024, slider 1 to 32, default 2.
Max Output PointsInteger0Limits the number of output points. 0 means no limit. Default 0.
Surface PositionsDATATYPE—Positions for the copies. Used when Mesh Points is empty.
TemplateDATATYPE—The point cloud to copy, with Y as its up axis.
Surface NormalsDATATYPE—Normals for the positions. Used when Mesh Points is empty. Optional.
Mesh PointsDATATYPE—Mesh vertices. When connected, they give the positions and the estimated normals.
Read the full description

With Mesh Points connected, the positions are the mesh vertices and the normals are estimated at them. Otherwise the positions come from Surface Positions and the normals from Surface Normals. For each position the template is turned around its Y axis by Yaw Offset (degrees) plus a random amount up to Random Yaw, rotated so that its Y axis follows the normal, scaled by Scale (times a random factor up to Scale Randomness), and moved to the position.

Align To Normals (on) and Normal Blend (0 to 1, default 1) decide how far the Y axis follows the normal; with Align off it stays at 0, 1, 0. Preview Decimate keeps every Decimate Step position, and Max Output Points stops the output at that number of points (0 means no limit). The random values come from Seed and the position number. Without positions or template the output is empty.

Example Connections​

vScriptValFromOBJ.Points -> vScriptValScatterInstOnMesh.MeshPoints
vScriptValLine.Output -> vScriptValScatterInstOnMesh.Template
vScriptValScatterInstOnMesh.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input