On Wed, Apr 25, 2012 at 2:44 PM, James Turner wrote:
> On 25 Apr 2012, at 14:22, Stuart Buchanan wrote:
>> The extra 300 Drawables are from the quadtree that is generated to a)
>> make culling fast b) to provide a mixture of LOD so that buildings
>> don't all appear in big blocks.  That code is taken directly from the
>> random vegetation,  and I could look at reducing the size of the quad
>> tree, at the expense of worse cull performance and/or less fade-in.
>>
>> (I must own up to not looking at the OSG stats before now
>
> Okay, this seems way too many drawables to me. Recalling Robert's target of 
> about 4000 drawables maximum per scene, which we regularly blow out of the 
> water.... What's the gain of so many drawables vs one LOD node per tile?

One benefit is better culling.  The other is that we can have
buildings gradually appear rather than all springing into view at once
when you get within the LoD range of the center of the time (where
objects at the edge might be significantly closer)

> I'm firmly in the 'small, compact scene graph with massive leaves' camp, you 
> see. If part of the tile is visible, great, submit the whole damn lot and I'm 
> confident the card will cope :) You could quad tree down a couple of levels 
> if you insist, but I'd be thinking no more than a 2 or 3. (And the same for 
> random vegetation)
>
> In fact, could you make the quadtree depth a config option? With 0 as a 
> permissible value?
>
>> The relevant code for the random buildings is in
>> scene/tgdb/SGBuildingBin.cxx (IIRC), and would be pretty easy to hack
>> into not very pretty triangles by simply commenting out the fourth
>> vertice in each block, if you didn't mind living in an abstract house
>> :)
>
> Will give it a go.

If you're going to be looking in the code anyway, the depth of the
quad tree is set in some constants at the top of the SGBuildingBin.cxx
file, and (IIRC) the LoD range is also set up there, so you could see
if reducing the depth makes a difference.

-Stuart

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to