Archived

This topic is now archived and is closed to further replies.

executor_2k2

World View projection matrix

Recommended Posts

What is the world view projection matrix, and how do you calculate it? In open gl you can get the projection matrix but i dont remember being able to get the view matrix...So do you take the model view and multiply by the inverse of the model transformations then multiply by the projection matrix??? Someone straigten me out please. Thanks.

Share this post


Link to post
Share on other sites
1) Direct3D takes three separate matrices:

- World: The transformation from object space into world space
- View: The transformation from world space into camera space
- Projection: The transformation from camera space into homogeneous clip space


2) OpenGL takes two separate matrices:

- ModelView: The transformation from object space into camera space
- Projection: The transformation from camera space into homogeneous clip space


ModelView = World*View


Some vertex shader/program examples (particularly those which originated from D3D samples) have a variable that they call something like "WorldViewProjection". It is exactly as it sounds:

A concatenation of the World, View and Projection matrices

WorldViewProjection = World*View*Projection
WorldViewProjection = ModelView*Projection

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites