World space or projection?

This topic is 1876 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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?

Share on other sites

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!

Share on other sites

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?!

Share on other sites

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!

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 9
• 13
• 9
• 9
• 15
• Forum Statistics

• Total Topics
634072
• Total Posts
3015341
×