|
pygame is
pygame.org is
|
Frustum Culling - 2.0.0Ian Mallett (geometrian)Tags:DescriptionIn 3D graphics, one often has a huge amount of polygons to push around. To lighten the load, if some of the polygons are not visible on screen, we don't try to draw them. This makes intuitive sense, but it is not built-in in OpenGL. This is called "Frustum Culling", probably because it is FRUSTRATING to implement. In my demo, the screen, (representing a landscape from top view), is divided into quads, (representing Display Lists each containing 8192 triangles. Use the arrow keys with shift to move and turn. All this took me longer than you'd think it should to do; the solution is actually quite simple, but hard to figure out. I included the source so you can edit the resolution, (NumberOfQuads [per side]), the viewing angle, (CameraViewAngle), and a few other things. Have fun! ChangesI've added a piece of code that makes a depth of field comparison. It does make it slower, and the new screenshot, at 100x100, is certainly slow. LinksScreenshot click to view original size
ReleasesCommentsIf you wish to leave a comment, please sign in first.
|
| spotlight |
|
|
|
| our projects |
|
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
|
|
|
| recent releases |
|
Feb 13, 2012
Jul 5, 2011
Apr 17, 2011
Apr 16, 2011
Apr 15, 2011
Apr 14, 2011
Apr 12, 2011
Apr 11, 2011
... more!
|
|