On 20 Sep 2013, at 11:04, Stuart Buchanan <stuar...@gmail.com> wrote:
> The original random buildings implementation (2.8.0) use basic OSG
> primitives, and so had collision detection and Rembrandt shadows "for
> free". In 2.10.0 this was changed to a shader-based instance
> approach based on the tree scheme to reduce the memory footprint which
> was ridiculously high in places like LA or Tehran.
>
> With the shader-based approach, collision detection isn't possible as
> the building doesn't really exist in the scenegraph. Rembrandt should
> be possible at the cost of running another shader IIRC. I think I had
> Rembrandt working for trees, but the cost was absolutely huge.
>
> Now, the basic OSG primitive approach has some advantages:
> - doesn't rely on shader support
> - allows for more variety in the buildings as one isn't instantiating
> a small set of buildings multiple times.
> - the code is simpler
> - more flexibility in adding complicated buildings such as signage,
> extensions.
>
> If I implement a PagedLOD approach, it might reduce the memory
> footprint sufficiently that we could switch back to the OSG
> primitives.
That would be my hope too, BTW. Ideally we'd set a total memory use (or vertex
count, which is a proxy metric for the same) for trees+buildings and setup the
PagedLOD to keep things loading (really, generating) and unloading based on
that target. Then it becomes a fairly clear memory-burn vs popping tradeoff
which I think most people would accept as reasonable. You don't like the pops,
you buy more [V]RAM :)
Instancing would help the memory burn, but OSG makes it very complex, we need
to bypass large chunks of the PrimitiveSet and Arrays APIs until they get a
real API internally, possibly not until OSG 3.4
(This is on the assumption that even though the buildings are random, across a
tile you could have quite a few which differ only in transform and some other
shader uniforms, but have the same
width/breadth/height/roof-pitch/number-of-floors, and hence could be drawn
using the same instance data)
Regards,
James
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel