transform nodes
3 node types in the transform category.
match_size#
aliases: matchsize fit align center
Align / fit the bounding box: e.g. sit on the ground (justify y=min), center, or scale to a target size.
Inputs
| # | name | description |
|---|---|---|
| 0 | geo | geometry to move |
| 1 | reference | optional geometry to match (its bbox becomes the target) (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
justify | json | ["center","min","center"] | per axis X,Y,Z: "min" | "center" | "max" | "none". Default sits the object centered on the ground. | |
target | vec3 | [0,0,0] | target position for the justified bbox points | |
scale_to_fit | bool | false | scale uniformly so the largest dimension equals target_size | |
target_size | float | 1 | size for scale_to_fit |
Example
{
"type": "match_size",
"params": {
"justify": ["center", "min", "center"],
"scale_to_fit": true,
"target_size": 2
}
}
Used in the examples asset_cleanup, growth, machined_bracket, rail_along_curve.
mirror#
Mirror across a plane; optionally keep the original and weld the seam.
Inputs
| # | name | description |
|---|---|---|
| 0 | geo | geometry |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
axis | enum | "x" | mirror plane normal axis options: x y z custom | |
normal | vec3 | [1,0,0] | custom plane normal | |
origin | vec3 | [0,0,0] | point on the mirror plane | |
keep_original | bool | true | output original + mirrored copy | |
fuse | float | 0.00001 | 0.. | weld points on the seam within this distance (0 = off) |
Example
{
"nodes": {
"box": { "type": "box", "params": { "divisions": [2, 2, 2] } },
"half": {
"type": "clip",
"in": ["box"],
"params": { "normal": [1, 0, 0], "keep": "below" }
},
"both": { "type": "mirror", "in": ["half"], "params": { "axis": "x" } }
},
"output": "both"
}
Used in the example blob_creature.
transform#
aliases: xform move rotate scale
Translate / rotate (degrees) / scale about a pivot. Also transforms N, v, up, orient, SDF volumes and packed instances.
Inputs
| # | name | description |
|---|---|---|
| 0 | geo | geometry to transform |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
translate | vec3 | [0,0,0] | translation aliases: t move offset position | |
rotate | vec3 | [0,0,0] | rotation in degrees about the world X, Y and Z axes, right-handed (counter-clockwise seen from the + end of the axis), X first, then Y, then Z (rotate_order xyz): [0, 0, 40] turns +Y to (-0.64, 0.77, 0), [0, 90, 0] turns +X to -Z aliases: r rot rotation | |
scale | vec3 | [1,1,1] | scale (a single number = uniform) aliases: s | |
uniform_scale | float | 1 | extra uniform scale multiplier aliases: uniformscale scale_uniform | |
pivot | vec3 | [0,0,0] | pivot for rotation and scale aliases: p | |
pivot_mode | enum | "param" | where the pivot comes from options: param centroid bbox_min bbox_center_bottom | |
order | enum | "srt" | transform order (srt = scale, then rotate, then translate) options: srt str rst rts tsr trsaliases: xord | |
rotate_order | enum | "xyz" | order the three rotations apply in, each about a world axis: xyz = X first, then Y, then Z options: xyz xzy yxz yzx zxy zyxaliases: rord | |
group | group (point) | "" | point group to transform ("" = all) |
Example
{
"type": "transform",
"params": { "translate": [0, 1, 0], "rotate": [0, 45, 0], "uniform_scale": 2 }
}
Used in the examples asset_cleanup, blob_creature, cloth_drape, eroded_valley, image_cutouts, lsystem_tree, machined_bracket, market_street, material_set, ocean_surface, rail_along_curve, scifi_panel, terrain_tiles, weathered_cabinet, worn_machine.