Jump to content
  • Advertisement


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


projection matrix vs. modelview

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

can i include the camera position into the projection matrix? then the modelview matrix would correspond to the position of my 3d objects in world space, not in camera space(am i right here?) and that would be more usefull in my case. i could render a object in different views by just changing the projection matrix. i think in d3d there are different matrices for camera and other objects. in my opinion this is easier to use. would there be there problems when i dont use the matrices the standard way?

Share this post

Link to post
Share on other sites
While it is theoretically possible to put the camera transform into the projection matrix, it should never be done. If you do, you'll get several problems. The 3D pipeline simply doesn't expect the camera transform in the projection matrix. By definition, once the modelview matrix is applied to your coordinates, they are expected to be in eye-space. Several functions such as lighting, fog, texgen, etc. rely on this fact. They will seriously screw up, if you don't follow the standard way.

A short 'projection matrix abuse' FAQ can be found here.

BTW: all this doesn't really apply anymore, if you use vertex shaders. In that case you are in full control over how the different matrices are used. But when using the fixed function pipeline, the standard way must be respected to avoid problems.

/ Yann

[edited by - Yann L on August 18, 2002 12:39:03 PM]

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!