Frustum Culling

Started by
6 comments, last by soSSSego 21 years, 1 month ago
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
soSSSegowww.sosssego.cjb.net
Advertisement
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.
Thanks, i''ll see this tutorial!

Back face culling improve the FPS??

soSSSego
soSSSegowww.sosssego.cjb.net
depends on your scene. typically it does
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
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 ,-)
f@dzhttp://festini.device-zero.de
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??
sorry, what i meant was:
...would it be a good idea to make a octree out of spheres?...
*g*
cu

This topic is closed to new replies.

Advertisement