   Doubt on quadtree
  Hi there i have read a post of YannL and JimH where they were talking about scenegraphs and all of that and in one of te examples they put where you can see a jierarchy which shows the graph they put thisROOT   |   |--- terrain node (geomipmapped quadtree)   |   |--- geometry of the village (static, octtree)   |   |--- Player (deformable skinned mesh)   | |   | |--- Torch (solid 3D object)   |   |   |   |--- Flame (volume renderer)   |   | |   |   | |--- Smoke (particle system)   |   |   |   |--- torch Lightsource   |   |   |   |--- torch shadow projector   |   |--- Big bad guy behind the player (skinned mesh)    |    |--- Big battle axe in the hand of the bad guy ||--- Dripping blood from the axe (particle system)welli can see that they are talking about managing the terrain with a quadtree but what is the criteria then you have to follow to set up that quadtree??In other tutorials you construct the quadtree seeing te nuber of polygons in a region (because for exapmle is a house in that region) and if that number exceeds a quantity you subdivide that cell. But here the static geometry is being managed separately from the terrain with an octree so when have you to subdivide the cells of the quadtree now?   
  Im not sure i understand your question but regardless;Simply make the village mesh a seperate oct-tree based on the same rules, but acting only on the villages mesh (ie, subdivide until there is only x triangles in the cube or subdivide until cube is less than n big)   ;  nono you havent understand mei mean that you are managing the terrain only with the quadtree. which criteria dou you follow to subdivide the cells of that quadtree if it is only managing the terrain? it is truly necessary there the using of that quadtree?   ;Quote:Original post by eduwushunono you havent understand mei mean that you are managing the terrain only with the quadtree. which criteria dou you follow to subdivide the cells of that quadtree if it is only managing the terrain? it is truly necessary there the using of that quadtree?Are you asking how to subdivide terrain into cells? In the engine I'm currently writing I use a fixed value to set a visible distance.  You were writing about number of polygons, but I think it is not a good solution, especially if you are using som kind of LOD solution.   ;  lets see i think im not asking in the correct way. Look at the hierarchy i have put upper in the post. This hierarchy is from other post which was written by YannL and JimH. Ok in that hierarchy they put a terrain hanging directly from the scene and they put an annotation saying that the terrain is being managed by a geomipmapped quadtree, correct?So i cant imagine how can you do that, what is the rule which you have to apply for example to subdivide the cells of te quadtree.Understand me now? Sorry for the confusion   ;  I think I got what you're writing, but I don't see the problem.First, terrain to me is the underlying geometry forming the ground (earth), not stuff that sticks up (houses, peculiar stones etc). The terrain is thus static geometry.You can generate the terrain quadtree any way you like; you should optimize the quadtree based on the terrain. If you're old-fashioned and use a heightmap, you'd probably create fixed-sized patches. If you're modern and use freeform geom, then you probably want to control the terrain patch size depending on mesh density, surface visual complexity and maybe how well you can stitch patches together.Bottomline: You can subdivide it any way you want, preferrably to make the terrain efficient...I hope it was right this time [smile].   ;Quote:Original post by eduwushulets see i think im not asking in the correct way. Look at the hierarchy i have put upper in the post. This hierarchy is from other post which was written by YannL and JimH. Ok in that hierarchy they put a terrain hanging directly from the scene and they put an annotation saying that the terrain is being managed by a geomipmapped quadtree, correct?So i cant imagine how can you do that, what is the rule which you have to apply for example to subdivide the cells of te quadtree.Understand me now? Sorry for the confusionI guess terrain is just its own quadtree, the root object is part of the scene graph.One comment YannL made a few years ago is one that I try to follow. A scenegraph is a graph structure that defines your world, but you shouldn't have implementation-specific details make any constraints on it.What I mean is, the scene graph should be a logical tree. From this information you can generate a render graph or render list. Subdividing the scene graph by coordinates will eventually get you nothing but headaches.If you start with a quadtree that divides the terrain in patches of say 128x128m, and put the rest of the objects in those cells, then when your npc's walk on the map, enter and exit houses, wander into the next cell, then you will have to move him to another record. This will just needlessly complicate things.The design as proposed doesn't do this, the terrain is in its own structure.