How it works
Instead of sending 200 separate posts to the GPU, one post is sent once together with a list of 200 transforms. In three.js the tool is InstancedMesh; according to the documentation it is meant for many objects with the same geometry and material but different world transforms, and it reduces the number of draw calls [1].
The file format supports it too: the glTF extension EXT_mesh_gpu_instancing describes rendering many copies of one mesh with a small number of draw calls, with its own position, rotation and scale per copy [2].
Typical candidates
- treads and balusters of a staircase;
- posts, boards and panels of a fence;
- louvres of a pergola or brise-soleil;
- screws, nuts and washers in technical assemblies;
- grandstand seats, wall panels.
Limits
All copies share geometry and material. If one part should look or be shaped differently, it has to leave the group or be driven by extra per-instance data. After changing positions, the list must be explicitly flagged as updated [1].
From our library
- The spiral stair configurator draws treads, tread pans, hubs and balusters as instanced meshes. When a visitor changes the height, only the number of copies changes.
- The disc harrow model uses EXT_mesh_gpu_instancing directly in the GLB file.
- The carport configurator also uses instancing.
All three are example configurators with fictional products. The parametric model entry explains why this helps parametric geometry in particular.