Jump to content
  • Advertisement
Sign in to follow this  
NickUdell

Any point in moving the world in reverse these days?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I was learning 3D a couple of years back, fixed function was still raging and we were taught to move everything backwards when the player moved forwards, as opposed to moving the camera. But since you can always supply a position in the view matrix, what's the actual point in moving the whole world around you? Are there any advantages over either method?

Sorry if this is a duplicate, I struggled to think what the correct search terms for this would be.

thanks

Share this post


Link to post
Share on other sites
Advertisement
The position in the matrix you mention is what move the vertices when you multiply them by the matrix. In the end, you have to move everything into a unit size cube (z-range differ between OpenGL and Direct3D though) centered at the origin. This cube cannot change so you must move the vertices into the cube, not move the cube to around the vertices. This is why documentation says you move the world and not the viewpoint. The two are conceptually identical though so it is a matter of how you look at it.

Share this post


Link to post
Share on other sites
Yeah it's a matter of perspective (pun unintended)
The "cam" doesn't really exist. It's a matrix that moves whatever you want to look at into the frustum.

Share this post


Link to post
Share on other sites
I suppose if you moved the stuff on cpu side, the gpu doesnt have to translate every single one of them?

Maybe its from some reeeeeally old era when the gpu couldnt handle both translating and drawing? xD

Share this post


Link to post
Share on other sites

I suppose if you moved the stuff on cpu side, the gpu doesnt have to translate every single one of them?

Maybe its from some reeeeeally old era when the gpu couldnt handle both translating and drawing? xD

Nothing changes. CPU or GPU side, you still have to do the same operations and transformations and the concepts and interpretations remain the same.

Share this post


Link to post
Share on other sites

The position in the matrix you mention is what move the vertices when you multiply them by the matrix. In the end, you have to move everything into a unit size cube (z-range differ between OpenGL and Direct3D though) centered at the origin. This cube cannot change so you must move the vertices into the cube, not move the cube to around the vertices. This is why documentation says you move the world and not the viewpoint. The two are conceptually identical though so it is a matter of how you look at it.


Now that makes a lot of sense. I always assumed they were different techniques.

Thanks very much.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!