Jump to content
  • Advertisement
Sign in to follow this  
ghidra

Normals and back face culling with field of view angle

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

First, hello! This is my first post. I have hit a wall, and can't find a straight forward answer to what I think is a somewhat mundane concept of 3D graphics engines..... I can calculate a plane normal, and rotate it, and do a simple dot product to the cameras out vector(0,0,-1) and cull all the right faces. But that is only if the object is directly in front of the camera. If the object or camera is translated so that the object is rendered in a corner of the screen, i am culling the same polys that I would if the object were directly in front of the camera. To me this seems like a problem. With the field of view angle, if the object is translated enough away from the center of the cameras viewport (origin) to "stretch" I SHOULD be able to see polys that I wouldn't see if the object were directly in front of the camera. But I am culling them away. I turned the alpha down on the polys when they render so I can see if anything is rendering behind, and in this scenario where I am culling polys on the side of the object that is being exposed to the camera...I am not culling the polys on the opposite side of the object that is no longer being exposed to the camera... But again, if I put that object that is not culling right in the corner of the screen back in the center, it culls right...? Hopefully that makes since... Does the fov play a roll in back face culling? Do I need to be using the homo coordinate? (that is what I call it, the fourth homogenous coordinate..told you, I'm not a professional) Am I not translating the normals right? Right now I am translating my 3 point normal vector with a 3x3 matrix that is comprised of the objects rotation in camera space. Then I get the dot product of that vector with the camera out (0,0,-1). and bam. almost right..... thanks for putting up with my ramblings... j

Share this post


Link to post
Share on other sites
Advertisement
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!