Jump to content
  • Advertisement

Archived

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

BGCJR

CPU BACK FACE CULLING

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

Advertisement
Look up how to do normals, all you have to do is calculate the normal of a face, and if it is negative it is facing away and can be culled

Share this post


Link to post
Share on other sites
Thanks
I need CPU culling.
I found normal finding code.
I''ve got CPU CULLING working but i''m not sure how.LMAO
I need cpu culling for generating texture coords for a models
like Quake 2 models.
6 side views get resized and plotted on a bitmap.
There is a problem though.
if a view has two or more tris overlapped. Oh well, More work.

Share this post


Link to post
Share on other sites
It''s easy. Find the normal of the polygon and calculate the vector between the camera and the polygon. Then dotproduct the two and if it''s negative, you don''t render that polygon. Look it up in the articles section. There''s an article on it.

---
My Site-My Tetris Clone w/Source
Come join us on IRC in #directxdev @ irc.afternet.org

Share this post


Link to post
Share on other sites
Thanks!
I used the method ''RapidStunna'' mentioned. it works great. I added the normal for cam facing, but it is not needed.

Share this post


Link to post
Share on other sites
I think I didn''t understand what you mean with "CPU" backface culling... What''s that exactly?

Share this post


Link to post
Share on other sites
What about using a tree structure (BSP) so you can cut down large amounts of faces at once? I''m not sure how this would work since each face would have to be processed to be sorted on to the tree. I''ve only just read about this and am not sure of the mathematical mechanics behind it...

Always code for the platform with most units in circulation.

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!