   Large scale vegetation rendering
  I've been trying to determine an efficient way to render large outdoor scenes with trees and grass.  My question is not about how to do the LOD, it's actually how to determine which LOD to use.  It seems to me that if you were to perform a distance check to each tree (even if it's done on the GPU), and you have 10,000+ trees within view, the performance will go way down.  So should distance checks instead be performed on groups of trees, in a octree type fashion?   
  That's how I would handle it... LOD each section of trees, then instance render them at the chosen level of detail.   ;  I am using the LOD of the terrain patch (stored in a quadtree) to determine the LOD of the objects placed on it (with a "coefficient" by object type so I can choose to render more or less detailed objects).;  Don't forget to use squared distance instead of real distance :)   ;Quote:Original post by alfithI am using the LOD of the terrain patch (stored in a quadtree) to determine the LOD of the objects placed on it (with a "coefficient" by object type so I can choose to render more or less detailed objects).Is this a wise way to do it?  I can imagine problems occuring because a section of the terrain can have a low LOD and still be close to the camera due to the fact that it represents a flat section of land and hence the error is small.  Using this to calculate the vegitation LOD you'd then get a sparsly populated area of terrain when maybe it was supposed to be very dense.  I'd recomend keeping the LOD's seperate although I dont have any experience with which LOD would be best to use.  A simple quad tree approach with a distance based LOD calculation like has already been mentioned seems sensible though.  Maybe you could even factor in the angle that the mean terrain section normal makes to the camera into the LOD calculations since you could no doubt get away with drawing less vegitation for a plane viewed edge on than for an ariel view.;Quote:Original post by alfithI am using the LOD of the terrain patch (stored in a quadtree) to determine the LOD of the objects placed on it (with a "coefficient" by object type so I can choose to render more or less detailed objects).Is this a wise way to do it?  I can imagine problems occuring because a section of the terrain can have a low LOD and still be close to the camera due to the fact that it represents a flat section of land and hence the error is small.  Using this to calculate the vegitation LOD you'd then get a sparsly populated area of terrain when maybe it was supposed to be very dense.  I'd recomend keeping the LOD's seperate although I dont have any experience with which LOD would be best to use.  A simple quad tree approach with a distance based LOD calculation like has already been mentioned seems sensible though.  Maybe you could even factor in the angle that the mean terrain section normal makes to the camera into the LOD calculations since you could no doubt get away with drawing less vegitation for a plane viewed edge on than for an ariel view.oops ... sorry for the double post   ;  you are right Motorherp, I just forgot to mention that my terrain LOD is "only" distance based.;  billboarding would be pretty good for distant trees because of their circular and repetitive nature.   ;  I seen someone (forget where now sorry) that made a large square around the camera for a distance that he wanted the best LOD for.  Anything falling within that was rendered at the high LOD.  Then he made more squares outside of that first square and anything within that had a lower LOD.  I just woke up and brain is dead so I cannot think if this would be slower the doing a square distance to each object or checking which box it's in.   ;Quote:Original post by Mike2343I seen someone (forget where now sorry) that made a large square around the camera for a distance that he wanted the best LOD for.  Anything falling within that was rendered at the high LOD.  Then he made more squares outside of that first square and anything within that had a lower LOD.  I just woke up and brain is dead so I cannot think if this would be slower the doing a square distance to each object or checking which box it's in.By 'object' I assume you're talking about each tree, plant, grass cluster etc?  You really dont want to be doing LOD calculations on each and every object regardless of the method.  Although I dont have experience with vegitation systems I imagine you really dont want to be storing each object as its own entity with position, orientation, etc either.  Instead use a spacial partitioning system such as a grid or quadtree and perform the LOD calculations on the partitions themselves to determine the LOD to use on the vegitation within that partition.  My intuition then tells me the best way to go from here would be to generate and place vegitation objects using a deterministic psuedo random generator with the resolution determined by the LOD.  The difficult bit would be choosing a random generator which produces a realistic dispersion and selection of vegitation objects.   