Jump to content
  • Advertisement

Archived

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

XBTC

View-Frustum-Culling????

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

Where do I find Tutorials and other Ressorces on it? (OpenGl preferred!) Thanx in advance,XBTC!

Share this post


Link to post
Share on other sites
Advertisement
I can''t give you any links, but I can tell you how culling works. Every triangle has a front side and a back side. If you look at the triangle''s front side, the vertices are counterclockwise, from the backside they''re clockwise. Culling is for determining if you see a triangle''s front- or backside and drawing only the front side. In OpenGL you can do it with some gl calls like this:

glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glPolygonMode(GL_FRONT, GL_FILL);

OpenGL transforms the triangles before testing and does 2D - culling, and I think it''s faster if you cull trianges yourself. You''ve to test if (viewpoint-vertex of triangle vector)*(normal of triangle)>0. If it is, you see the front side of the triangle.

Visit our homepage: www.rarebyte.de.st

GA

Share this post


Link to post
Share on other sites
The best explanation of View Frustum culling (how to do it, and what it is ) that I''ve seen, comes from "Computer Graphics, Principles and Practice" by Foley and Van Dam.
If you are seriously into learning about 2D and 3D polygon graphics, from a theory and implementation point of view, that is a basic book, you should try to find it.

Basically, view frustum culling is the act of removing polygons that are outside your field-of-view ( and thus not visible ) from the pipeline. The way OpenGL ( and Direct3D too, I presume ) do it internally, is with a special kind of projection matrix. It''s not the most efficient method, because you will have transformed invisible polygons too.

Other ways to do it include things like Octrees, BSP trees, KD-trees, or more complex, dynamic structures.



#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**

Share this post


Link to post
Share on other sites
Thanx alot!
But I think I haven´t formulated my Question good enough(sorry),I Don´t meant Backface-Culling like ga explained.
I meant View-Frustum-Culling and I know what it is but my implementations so far don´t work too good(nearly not at all) so I wanted some tutorials,further informations or see some implementations of it.

P.s.:I use BSP-Trees already but i can´t see how a BSP-Tree
could do ViewFrustum-Culling.I think VF-Culling is
only more efficient with BSP´s cause you can eliminate
total subtrees if they lie outside the VF(I think).

Edited by - XBTC on May 8, 2000 3:54:55 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Another Misunderstanding:I mean Culling not Clipping!

Share this post


Link to post
Share on other sites
quote:
Original post by baskuenen

Cooling?


Clapping

Well, I dunno any source material for you, but, why would you close your mind to other ways of doing certain functions? IOW, clipping is very much like culling, so it might follow that one''s techniques can be used in the other, and vice versa.

A smart man once said...."Don''t immitate, innovate" -- just wish it were me







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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!