Jump to content
  • Advertisement
Sign in to follow this  
edd1986

A beginner question regarding model to world/world to device transformations

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

Hi, for example i have model of a square with the co-ords (-1-1),(1,-1),(1,1),(-1,1) When i do the model to world transform is it just a matter of translating the model to the appropriate position or do i need to scale the model too. or does the scaling only come when i am doing the world to device transform? thanks

Share this post


Link to post
Share on other sites
Advertisement
Basically, when going from model to world view, you position, rotate and scale the model into the correct position in the world.
The world-device transformation doesn't involve much manipulation on your part, using OpenGL as an example, you simply set up the viewing frustum and the graphics card does the rest.

Share this post


Link to post
Share on other sites
i have to manually do the world to device transform for a module, but thanks - question answered :)

Share this post


Link to post
Share on other sites
Hi again i'm still a bit confused.

So i start with the quad above -

I put it into the world by applying a transformation to all the quad vertices consisting of a scaling of 100 and a translation of 500.

To display it on the screen i transform these points above by translating -500, -500 to place the quad on the origin. then i perform a scale of -1 in the Y axis to flip it the other way round and finally i translate it back 500 500 to place it in the original place. This works and my quad displays correctly on the screen.

But this is where i get confused. Now my quads points are the co-ordinates in relation to the device, all information about the world co-ordinates has gone.

I think this must be wrong as i have been tought that there should ALWAYS be a 'world scene' which is then transformed so it is displayed on the device.

Am i thinking about this the wrong way?

Thanks in advance

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!