Archived

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

soSSSego

Frustum Culling

Recommended Posts

soSSSego    122
Hi people! I have a some questions! Frustum culling works for dont drow de backfaces of poligons, right? The openGL dont have a function to do this? Its a good way to improve FPS? And in computer with slow processor? How others ways to improve de frame rate? Thanks! soSSSego

Share this post


Link to post
Share on other sites
James Trotter    432
Frustum culling is something different. What you''re refering to is called backface culling. To use backface culling, OpenGL has a command:

glCullFace(Enum face);

where face is GL_FRONT or GL_BACK.

And you also need to enable backface culling:

glEnable(GL_CULL_FACE);

But frustum culling is when you check if an object is inside your view frustum, and if it is, draw it. This can give you a great performance boost, and is a good idea to implement. gametutorials have good tutorials on the topic.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
i have this stupid problem that a huge cube is in the frustum though it''s outside . . .

does anyone know how to solve this problem (the guys on gametutorials haven''t written anything about this, they just mentioned that there is that problem....)

cu

Share this post


Link to post
Share on other sites
Trienco    2555
i guess youre doing the typical "compare against each plane"-check and now it intersects the wrong two planes.

obvious solutions would be to divide the cube into smaller pieces. a simpler method would be to test the cube against a sphere containing the frustum. less precise but it is:
a) a very fast test to remove most objects immediately
b) doesnt have the problem like the usual frustum test
c) probably a good idea to do before the real frustum test takes place

d) will solve some of the problems i had with my occlusion culling.. so ill be away implementing it ,-)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I use the cubes, which i test to be in the frustum, for my octree, well, would it be a good idea to make a octree out of boxes?
Hmm, I guess i''ll use a bounding sphere around the boxes i form the octree with ... shall i do that??

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
sorry, what i meant was:
...would it be a good idea to make a octree out of spheres?...
*g*
cu

Share this post


Link to post
Share on other sites