Jump to content
  • Advertisement
Sign in to follow this  
daneel_olivaw

[Q] Projection

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

Hello everyone, I'm very new to 3d and I'm doing some matrix testings on my own, to learn and understand how everything works. So far I'm fine, but I'm having problems with perspective projection. I have set a simple scene up, basically just points in certain places, I apply view transf. and then projection, but I need to avoid drawing points which are not visible to the eye. For this I've read about using a canonical view volume which is the simplest as it transforms the frustum into a cube. The problem is that I've been searching but none of the docs look clear at least to me. From what I understand I need to separate the perspective transf. in two parts and apply the clipping in the middle by simply discarding points outside the volume. But how do I separate the projection transf? I'm currently using this: 1 / r * fov, 0, 0, 0, 0, 1 / fov, 0, 0, 0, 0, (n + f) / (n - f), -2 * n * f/(n - f), 0, 0, -1, 0 but I can't seem to find a way to distinguish among points that have to be drawn from the ones that have to be ignored. I'd appreciate any pointer or tip. Thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement
http://msdn.microsoft.com/en-us/library/bb147302(VS.85).aspx

perspective projection transforms the visible frustum into the unit cube that will later be "flattened" and stretched to fit the screen. therefore any point that is outside the unit cube (ie, if its x or y coordinate is not within [-1,1]) can be culled

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!