   Partially Culled Models
  Hi, I am currently writing some frustum culling functions need to know something. Say you have a fairly large model and it bounding volume will fall into the frustum most of the time, do the more advanced frustum cullers attempt to just draw the part of the model thats visible or it always a case of it is either in the frustum and drawn completely or out of the frustum and not drawn at all. If you do attempt to draw a partial mesh could someone please post a link to an article that discusses it. Cheers 
  A way to only draw the parts of the mesh that intersect the frustum would be to determine if each triangle intersects the frustum.  You could do this by constructing bounding spheres for each triangle, just as you have bounding a bounding volume for the entire mesh.  Then test each sphere against the frustum to determine whether or not you should draw the triangle.  A better method, however, would be to use some sort of spatial sorting.  Here is a pretty good tutorial for getting started with a spatial sorting method called ''octrees'', along with a tutorial for culling bounding spheres (just look for the frustum culling and octree tutorials):http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg5.htmDepending on the size and complexity of the scenes you are rendering, octrees may or may not be too complex for your situation (but its a good idea to learn about them anyway). Anyway, I hope that helps.  Good luck. -----------------------------I never chew my cabbage twice ;  An important thing is that you dont mind of any particular triangle, but you care about hundreds or thousands of them, this is why spatial partitioning is used, you always cluster your poligons in some manner and every cluster usually may polygons.The politics of sublidividing your mesh vary a lot depending on the nature of the mesh. For outdoor environments you may use octrees or quadtree (simpler than octrees), and hierarchically cull their nodes against the frustum using bounding spheres or of bounding boxes. Spheres are simpler to cull, bounding boxes are harder (you must create a poly/poly or plane/poly intersection routine and begin clipping all around) but fits better usually.Someone also uses cylinder as bounding shape.Ciao ;  So is the answer to my original question yes? Should i be looking at partially drawing partially visible models?One problem that i can see with this is that I am using display lists (OGL) and if I start wanting to not draw certain triangles in a model then I will have to manually specify each vertex when rendering and then I lose any speed increases I may have gotten from the display list. Will this loss simply offset any gain I get from drawing fewer triangles?   [edited by - jonbell on February 16, 2004 7:46:20 AM];  As said above, it depends on your model: you are interested in refining the culling only of models with more than 5-10K. Someone will tell even more, it also may vary according to your hardware target. It depends on your model also in the sense of the shape: say you have a lot of models (hundreds) with say 2500 poly each, but they are quite wide on the screen and you see them all the time, you should divide them according to teir shape.It may also depends on the type of camera your''re using, but this is usually a secondary issue.Again, the clustering option is the best: you don''t have to cull/test every single polygon (this is already done from the OGL driver!), you test for frustum rejection only groups of polyogns. Every group is a compiled list.A practical example: make an octree routine wich splits your meshes till you reach a desired poly-count for every node (say 5K) or a desired tree-depth. Each node is a compiled list.Then you hierarchically cull your nodes with sphere culling of box-culling.Remember: don''t try to cull single polygons, only clusters of them, the number and the way depends on your model, can''t say nothing more because don''t know what kind of models you''re handling.Ciao;  Dont bother space partitioning anything below 5k. Make that 10k if you are using Display Lists because the card will be able to cull vertices not in the frustum much faster than you could with trees.Try this:Render a 10k poly model and move it half out of screen and record your FPS. Now go and edit the model in Max or whatever such that it looks about the same it did earlier onscreen(half) and render it just as it looked earlier.If the difference in speed it minimal, dont bother using octrees for it because you will probably waste more time determining the nodes required for drawing then allowing the gfx card to do it.For models above that limit(terrains), you should do some partitioning.Note: I am assumming you are using 1) VBOs or 2) Vertex Arrays IN Display Lists(optimal usage of Display Lists this way)and targeting something like a GF or above. For lower end cards, 10k might already be half of what they are capable of rendering and you might want to roughly partition objects with 5k polycounts or higher. But then again, for anything lower than a GF, you shouldnt be using such models in the first place.  [edited by - GamerSg on February 16, 2004 9:07:21 AM]