Archived

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

Structural

Ideal quadtree size?

Recommended Posts

Just a quick question: what is according to you an ideal amount of polygons in a section of a quad tree? Currently I have divided my tree in pieces of 32*32 heightpoints, which results in about 2100 triangles per section (drawn with a triangle strip). I feel that this is WAY too much, but what are your opinions about this?

Share this post


Link to post
Share on other sites
This link has excellent info about performance.

http://216.239.53.100/search?q=cacheLaBwIREiPQC:developer.nvidia.com/docs/IO/2641/ATT/gdc2002_d3d_performance.pdf+DrawPrimitiveUP&hl=da&ie=UTF-8

There is a bullet that says: Always batch your polygons into groups 200+

Share this post


Link to post
Share on other sites
A while ago when I made a terrain engine with a quadtree for culling, I actually broke it down to 32x32 patches (lowest level of the tree). I tested it a bunch and it seemed to work best at that level. That was on a map of 512x512 and 1024x1024. I suggest you test it yourself by changing the number of levels you let the quadtree generate.

--Buzzy

Share this post


Link to post
Share on other sites
32x32 is pretty good. Smaller than that and your leaf count rises dramatically => the memory and performance overhead of managing them increases similarly. Much bigger than 32x32 and you''re potentially drawing lots of extra polygons you don''t need since a 128x128 leaf may only have a couple of polys in view.
On the rendering side, 2000polys is the optimal number I found for my engine though my engine is a bit unusual.




Read about my game, project #1
NEW (18th December)2 new screenshots, one from the engine and one from the level editor



John 3:16

Share this post


Link to post
Share on other sites
Thanks for your answers.
I have a good working tree now and it creates a tree of 341 nodes and is 5 nodes deep.

I have another question about quadtrees though: How do I implement different LOD levels? I now have a vertex array that holds all vertices that can be drawn in one go. Do I have to add another set of arrays, but with a lower polycount? Or are there other recommendable methods?

Share this post


Link to post
Share on other sites