rock
Create a closed stone mesh with adjustable roughness, flatness, and detail, deterministic via seed. Position it in world space for 3D scenes.
Instructions
Make a closed rock mesh: an icosphere roughened by noise and squashed. Same seed, same rock.
radius is the half width in metres: the wider of the X and Y extents is 2 x radius.
roughness 0 to 1 is how far the shape departs from a ball. flatness 0 to below 1 squashes it down (0.5 is a flat boulder).
detail 1 to 5 is the subdivision: 1 gives 20 triangles, 2 gives 80, 3 gives 320, 4 gives 1280.
For a low-poly game use detail 1 or 2 with facets=true. facets=true shades each face flat (hard crystal look);
false shades smooth.
at is where the bottom centre of the rock sits in world space; the object origin is there, so the rock stands on the ground.
Vary seed, radius and flatness to make a set of different stones. The mesh passes check_mesh.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | ||
| name | Yes | ||
| seed | No | ||
| detail | No | ||
| facets | No | ||
| radius | No | ||
| flatness | No | ||
| roughness | No |