Jump to content
  • Advertisement
Sign in to follow this  
ganesh_mandavilli

Why we need local and world coordinates

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

Advertisement
Say an artist creates a model in a 3D modelling program. The vertices of this model are in "model space" (i.e. relative to the center of the model).

If a programmer wants to put 10 copies of this model into the world ("world space") at 10 different locations, then you must transform the vertices from model-space into world-space - usually using a transformation matrix.


Without using two different coordinate systems, the artist would have to create 10 copies of the model, with the vertices manually transformed to the correct positions - For a dynamic object (like a player/car/whatever) moving the vertices manually is just not feasible.

Share this post


Link to post
Share on other sites
It also gains value when you try to make queries against a certain model, since you can perform optimization steps on that model in it's model space that don't translate so well if you have to do it in world space [especially if the model is not static]. Things like optimizing lighting or collision detection don't always work too well if you have to do everything in world space, and it's often easier/more efficient to transform something into a known local coordinate system that than to change two things into a static world-coordinate system.

Then there is skeletal animation, which is an extreme use of local coordinate systems that make it possible to draw a figure only once, yet position it however many times [since each vertex will have it's own coordinate system that is derived from the figures skeleton]. Such a thing just isn't reasonable to do strictly in world space.

It's a matter of efficiency and convenience mostly. Technically you *could* do everything in world-space.

The world coordinates though are needed when you need to have a big picture view of a scene, like for rendering. Most other operations are easier/faster to do in optimized local coordinate systems.

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!