Instancing Output
Use MultiMeshInstance3D output to efficiently render many instances of the same mesh with different transforms and colors. This is ideal for trees, rocks, and other repeated elements.
Point Attributes
Transform and color data is specified via point attributes:
Attribute Name |
Attribute Type |
Attribute Owner |
Description |
|---|---|---|---|
|
Vector |
Point |
Forward direction (positive Z) |
|
Vector |
Point |
Per-instance color (enables MultiMesh colors) |
|
Vector |
Point |
Up vector (Copy to Points style) |
|
Float |
Point |
Uniform scale |
|
Vector |
Point |
Non-uniform scale, multiplied by pscale |
|
Int |
Point |
Required. Set to 1 to enable MultiMesh output |
|
String |
Point |
Target node path under HEGoNode3D/Outputs |
|
String |
Point |
Mesh resource path to instance |
Example
A point wrangle over scattered points, instancing a rock scene with random scale and orientation:
// Point wrangle on the scatter output
i@hego_use_multimesh = 1; // required
s@hego_multimesh = "Rocks"; // node name under Outputs
s@hego_mesh_resource = "res://meshes/rock_01.res"; // the mesh to instance
f@pscale = fit01(rand(@ptnum), 0.6, 1.4);
v@up = {0, 1, 0};
v@N = normalize(set(rand(@ptnum + 11) - 0.5, 0, rand(@ptnum + 27) - 0.5));
Every attribute except hego_use_multimesh and hego_mesh_resource is optional:
without N and up the instances keep the default orientation, without
pscale or scale they stay at unit size, and Cd only needs to be there if
you want per-instance colour.
Splitting into Multiple Instancers
You can split one output into multiple MultiMesh instancers by assigning different
hego_multimesh paths across points. This allows you to create separate instancer
groups with different meshes or configurations.