MINIATURE / STUDY / LEVEL 3 OF 5

Being the
miniature.

In VR the camera is the headset. It cannot be shrunk and carried to the table. So instead of moving the camera into the model's world, the scene moves the world around the camera. Mode 1 puts M on the body: my body goes to the table. Mode 2 puts M⁻¹ on the world: the table comes to me. M⁻¹ sends the spot to the floor under my head and grows everything twelve times about it. My eyes are then exactly where the model's eyes were, looking at a world exactly twelve times its size. Both pictures below are drawn from the same eyes. Only the world's matrix changes.

mode 1world = I, stage = M = T(spot) · S(1/12) · T(−origin)
⇄
mode 2world = M⁻¹ = T(origin) · S(12) · T(−spot), stage hidden
⇒
M⁻¹ · M = Ithe model's eye, sent back through the world, is my eye

From my eyes, in both modes

same camera; only the world's matrix differs

Mode 1: the table, my model on it

Mode 2: the world of the model

The two matrices

and their product

M on the stage (mode 1)

M⁻¹ on the world (mode 2)

M⁻¹ · M

The inverse, as node calls

miniatureModel.js

The inverse of a product is the product of the inverses in the opposite order. Each factor is easy to invert: a translation by its negative, a scale by its reciprocal, a turn by the opposite angle. placeWorld writes them out, so no general matrix inverse is computed per frame.


      

Choosing a mode each frame

miniature.js

The house, the table and the body are never told which mode it is. The animation loop sets two matrices and hides the body in mode 2: in that mode I am the body, and it would sit around my own eyes. It also computes one point the same way in both modes, where my head is in table coordinates, for the door in level 4.


      
    

What you should be able to explain

  1. Move the world, not the camera. A camera's view matrix is already the inverse of where the camera is. Mode 2 makes that explicit with one node: rather than placing my eye at M · eye, it places the world at M⁻¹ · world.
  2. Inverse of a product. (A · B · C)⁻¹ = C⁻¹ · B⁻¹ · A⁻¹. Read on a point, mode 2 first subtracts the spot, then grows ×12, then adds my origin.
  3. One point both modes agree on. M · head is my head in table inches. In mode 2 the same point is M⁻¹ applied the other way round, the world's inverse times my head, and the page shows they are equal. That is why the door, measured in table inches, can be tested the same way in both modes.
  4. Forgetting a factor. Without T(−spot) the growth happens about the room's origin rather than the spot, and the table rises far above my head. The view shows where it goes.

Exercises: ① Walk one metre toward the table in mode 2: how far did the model move on the table? ② Turn 1 rad left: why does the mode-2 world not turn with you, while the view does? ③ Tick "forget T(−spot)": how high above your feet is the table top now, and how does that follow from 0.76 m × 12?