Jump to content
  • Advertisement


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


View vs World

This topic is 5732 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

Just wanting to know so that I dont generate bad habits: When moving around in a scene is it best, better coding practice or whatever, to set the view once and then move all objects based on new world coordinates, or simply move the view and leave the world coordinates alone? Cheers.

Share this post

Link to post
Share on other sites
Rename "View" to "Camera" and "World" to "Object into universe" it all makes sense

i.e. To move the viewer around the scene, the common practice is to alter the view matrix. To move objects within the world, alter the world matrix.

Both matrices get concatenated by D3D internally anyway* so there''s no greater cost for one over the other, but view is more "usual" for cameras.

[as an aside, OpenGL takes a matrix it calls "WorldView" where you do the same concatenation yourself before calling the API]

Simon O''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Well D3D adverts against changing the view matrix to much as it does have an aditional overhead to reset it for cards (don''t ask me read the docs), but when they say this they''re talking about setting the view matrix far too many, like far too many times each frame. What is far too many? Well every frame you have to set the view matrix once and probably some 2 or 3 more times for additional views and tricks but far too many would be more like setting the view matrix for every object instead of using the world matrix... (Who does this?).
So a optimal solution is to use things the way they are intended to be used: to move your virtual eye use the view matrix every frame, to move objects use the world matrix. Remember that if your moving all other objects then your doing a huge amount of calcs and if you just move the cam your reducing the load (obviously I''m going to admit your scene has more then 1 spinning cube)

Share this post

Link to post
Share on other sites

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