Jump to content
  • Advertisement
Sign in to follow this  
VersusOm

Back-face culling in Calavier / Cabinet view projections - solved

This topic is 4041 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, I have problem, that I don't know how to test weather the normal of face points to projection plane or not(can I see it or not). In case of perspective or orthographic projections it is easy to determine this, but using Calavier or Cabinet projections I should deal with angle... Cavalier x' = x + cos(a) * z; y' = y + sin(a) * z; Cabinet x' = x + cos(a) * z * 0.5; y' = y + sin(a) * z * 0.5; Maybe someone has an idea? Or at least knows where could I find the solution? Mindaugas [Edited by - VersusOm on June 24, 2007 1:36:18 AM]

Share this post


Link to post
Share on other sites
Advertisement
Solved! :)

As we know Cavalier projection has an angle, that is between the projection plane and direction of the projection. To determine the visible faces all we need is to check angle between its normal and direction of projection.

Calavier: dop = (cos(a), sin(a), -1)
Cabinet: dop = (cos(a)*0.5, sin(a)*0.5, -1)

dop - direction of projection
n - normal (transformed to camera space)

now to determine weather face is visible or not we do:

visible = dop*n < 0;

Mindaugas

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!