I'm new to OpenGL. I'm using it with JOGL.
I'm reading about frustum culling:
http://www.lighthouse3d.com/opengl/viewfrustum/
http://www.crownandcutlass.com/features/technicaldetails/frustum.html
I'm not sure exactly what it's supposed to do. Doesn't OpenGL cull off-screen objects automatically? (Is this culling significantly slower than just not sending the objects in the first place?)
From what I'm reading, it doesn't look like this will handle avoiding drawing objects that are obscured behind another but are within the viewing frustum. Does that mean that the only benefit is avoid sending off-screen objects to OpenGL?
The simplest implementation is to wrap both nearest objects in a sphere. Wrap this sphere with another group or objetc etc... In this example, only 2 checks allow us to know that 3 objects are in frustum instead of 6 because if the bounding sphere is totally inside the frustum all its content is also inside.
Three types of visibility culling techniques: 1) View-Frustum Culling, 2) back-face culling, and 3) occlusion culling. The last few years have witnessed tremendous growth in the complexity of computer graphics models as well as network-based computing.
By default, OpenGL expects counter-clockwise winding order for triangles that are facing forwards. With backface culling enabled, triangles facing the other direction will be automatically culled. This occurs before rasterization.
Yes, you are basically right. Frustum culling cuts off objects that are outside the camera pyramid. OpenGL, when rendering a scene, of course does this as well but on a per vertex basis. Frustum culling works per object and its performance boost potential is therefore much higher.
One of the bottlenecks is transferring the data between CPU and GPU. If you need to transfer for example only 1/4 of all the objects/vertices in an outdoor scene, frustum culling can yield a nice performance boost.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With