World space or projection?

Started by
2 comments, last by kauna 10 years, 4 months ago

Suppose I have a camera which has it's own viewmatrix that represents it. If I were to multiply the viewmatrix with the projection matrix,the camera goes into world space.

My question is: why does it go into world space,and not into projection space?

Advertisement

If you multiply view matrix with projection matrix, you'll get a matrix which can be used to transform from world space to projection space (assuming that your matrices are constructed correctly and that the order of matrix multiplication is correct).

However, the typical camera/view matrix is a matrix which transforms from world space to view space. For that reason typically you'll see some fancy math at the construction of a view matrix (ie. matrix inverse).

Cheers!

I still don't get it. You have a model in world space.But how can you compare world space data to view * proj space extracted planes?!

Well, you can't since those those things are in different spaces. (Practically, you can but you won't get anything useful out of it).

So, to get something out of this, you'll need transform either to the other's space.

In my opinion it is faster to transform the frustum planes of a camera to the world space to perform frustum culling (for example). So if your frustum planes are in projection space, you'll need to transform them by inverse view-projection matrix. Of course, it might be easy to construct the planes directly in world space too.

Cheers!

This topic is closed to new replies.

Advertisement