Instanced Geometry

GPU hardware instancing — drawing many copies of one mesh in a single call — entered real-time graphics APIs (OpenGL / Direct3D) in the mid-2000s with programmable pipelines. A rendering primitive rather than an attributable artwork technique.

community / folk Name — A descriptive category label, not a coined or eponymous name; no single coiner of the term is attested.

In one line A 3D technique that draws many copies of one geometry in a single GPU call, each with its own transform — the efficient way to render forests, particle clouds and voxel fields by the thousand.

Instanced Geometry · Open in new tab ↗ · Motion begins only when you press Run.

The code

The actual sketch behind the demo above — sandboxed and reproducible. This is the whole thing.

instanced-geometry/index.html
const SEED = Math.floor(Math.random()*1e9);

// A dense field of identical boxes (the "instanced" primitive) on a grid,
// each extruded in height by a noise field — a rotating 3D bar-chart cityscape.
let GN, hueBase;

function setup() {
  randomSeed(SEED); noiseSeed(SEED);
  const s = Math.min(windowWidth, windowHeight);
  createCanvas(s, s, WEBGL);
  colorMode(HSB, 360, 100, 100);
  GN = 22;
  hueBase = random(360);
}

function draw() {
  background(230, 50, 10);
  const s = width;
  ambientLight(0, 0, 30);
  directionalLight(0, 0, 90, 0.3, 0.7, -0.5);
  pointLight((hueBase+40)%360, 50, 100, 0, -s*0.3, s*0.4);

  rotateX(-0.9);
  rotateZ(frameCount * 0.004);

  const span = s * 0.7;
  const step = span / GN;
  const t = frameCount * 0.01;
  noStroke();
  for (let i = 0; i < GN; i++) {
    for (let j = 0; j < GN; j++) {
      const nx = i/GN, nz = j/GN;
      const hgt = (noise(nx*2.2 + t, nz*2.2) ** 2) * s * 0.6 + 2;
      push();
      translate(-span/2 + i*step + step/2, 0, -span/2 + j*step + step/2);
      translate(0, -hgt/2, 0);
      ambientMaterial((hueBase + hgt*0.25) % 360, 60, 90);
      box(step * 0.82, hgt, step * 0.82);
      pop();
    }
  }
}

Open the demo source ↗

How it works

Upload the base mesh (vertices/indices) once, then supply a per-instance attribute buffer holding each copy's parameters — typically a 4×4 transform matrix plus colour/scale: 1. Build the instance buffer on the CPU (or in a compute/GPGPU pass): a position, rotation and scale for every copy, often placed by noise, a grid, or a packing. 2. Issue one instanced draw call for N instances; the vertex shader reads gl_InstanceID / the per-instance attributes and transforms the shared mesh into place. 3. The GPU renders all N without per-object CPU overhead, so counts in the tens or hundreds of thousands stay real-time. Animating just the instance buffer (not the geometry) moves the whole field cheaply.

Parameters

Lineage

Related
3D Mesh / Geometry

Frequently combined with

Works using this algorithm (18)

Agglo
leander-herzog
Assemblage
sab-k2xl
Augmented Sequence
toiminto
Beauty of Skateboarding
jeanvascript
Chimera
mpkoz
Democracity
generative-artworks
Escherly Seeds
martijn-cohen
Fushi No Reality - フシノゲンジツ
samsy
Gas Wars
jack-butcher
Immaterial
bj-rn-staal
Isodream
henrysdev-amnda
Jiometory No Compute - ジオメトリ ハ ケイサンサレマセン
samsy
l.o
night-sea
Melancholic Magical Maiden
emi-kusano
Mind Maze
parse-error
Structura
office-ca-protocelllabs
Transitions
jason-ting-x-matt-bilfield
Vahria
darien-brito

Last updated 2026-07-16