Skip to content

Everything you wanted to know about coordinate system in WoW

Deamon87 edited this page Jan 18, 2016 · 3 revisions

Space types

In 3D graphics the following coordinate spaces are used:

  • Object Space (aka Local Space)
  • World Space (aka Model Space)
  • Camera Space (aka View Space)
  • Clip Space
  • NDC Space (aka Window Space)

For describing WoW's coordinate system the first four spaces are important. Clip Space and NDC Space are used when projecting 3D Geometry into screen and not that important.

Object Space is space with coordinates having (0,0,0) as center of object(model) and coordinates going negative and positive. Transition from Object Space to World Space is done with placement matrix(model matrix), that define object's transition, rotation and scale.

Camera Space is space with camera placed at (0,0,0) point, (1,0,0) pointing left, (0,1,0) pointing Up and (0,0,1) pointing into screen (look direction). Transition from World Space to Camera Space is done with lookAt matrix(View matrix). lookAt matrix is composed from these variables given in World Space:

  • Camera position
  • Camera lookAt point
  • Up-vector

World Space

World Space coordinates are those coordinates, that are sent in network packets in Client<->Server communication.
WoW's World Space coordinates are Z-up. And thus for composing lookAt matix, the (0,0,1) vector should be used as Up-vector

Some of rendering implementations assume, that coordinates are in World Space are Y-up, and supply (0,1,0) as Up-vector for lookAt matrix. To bring all corresponding vertex coordinates and normal coordinates to Y-up notation, these implementation read (x,y,z) from files as (x,-z,y) and do other conversions, which not always lead to correct results. In last chapter it will be shown how to read data in Y-up notation to get proper results.

Apart from that, the Z-up notation will be used for explaining.

Clone this wiki locally