Math Playground
Back to Graphics

Graphics › Coordinate spaces

Model space

Also called local or object space — the coordinates a mesh is authored in, before it knows where in the world it'll end up.

3D viewer — drag to orbit · scroll to zoom · right-drag to pan
Loading the 3D viewer…
Coordinate spaces — follow a cube from mesh to pixels
xyz

Model space: the cube as the mesh file stores it — built around its own origin, no idea where it'll end up.

the cube's far-top-right corner here: (0.5, 0.5, 0.5)

Where meshes are born

When an artist models a chair, they build it around a convenient origin — usually the centre of its base, or its centre of mass. Every vertex is stored relative to that point and those axes. The file has no idea the chair will sit in a kitchen scene at (3, 0, −7), rotated 40°; that placement comes later. The chair's own coordinates are model space.

Why a sensible local origin matters

Rotation and scale happen about the origin. Put a door's model origin on its hinge edge and “rotate 90°” swings it open correctly. Put it in the middle of the door and the same rotation makes it spin like a propeller. Pick the pivot you'll want to animate around.

One mesh, many copies

Because the geometry lives in model space, you store the mesh once and stamp it everywhere — a forest of 500 trees is one tree mesh plus 500 different model matrices. The GPU calls this instancing; it's why scenes can have millions of objects.

What lives here besides positions

Vertex normals and tangents are also authored in model space, alongside texture coordinates (UVs). When the model matrix has non-uniform scale, normals need the inverse transpose of it, not the matrix itself — otherwise they stop being perpendicular to the surface and your lighting goes wrong.