On 18 Sep 2013, at 16:16, Stuart Buchanan <stuar...@gmail.com> wrote:

> Command, questions and offers of help to update some object masks are
> all welcome :)

All sounds good, there is a related issue that came up on IRC:

It would really help memory use if we could defer tree/object/building 
generation until the tile is close to the viewer. Right now you generate lots 
of LOD nodes so we don't pay the rendering cost for distant tiles, but we're 
still paying a memory cost and loading time hit.

The ideal approach is to use PagedLOD, i.e let the osgDB pager do the job it's 
intended for. So the base tile would have a PagedLOD which loads the building / 
trees / objects when the LOD threshold trips, with the usual queuing system and 
unloading. What this needs is to make a pseudo-file-name for to add to the 
loader, which causes a custom osgDB ReaderWriter to run. (Likely with a custom 
Options instance set specifying any parameter data needed for the tile - is 
there any? I can't recall) That ReaderWriter can then return the root osg::Node 
for the trees/buildings/objects as we already do.

(Mathias switched the tile object models to use such a PagedLOD back at the 
start of the year, and it's worked very well, I would say - there is a tiny 
amount of popping when starting up, but almost no visible popping after that)

I hope this is a relatively small refactoring, but potentially with a big 
benefit for memory use, and much cheaper loading of distant tiles

(BTW Adrian proposed something which achieves a similar end result back in 
February, the problem with his approach is it doesn't work via the OSG paging 
mechanism, and hence I don't think we should pursue it - ultimately we need to 
be letting the OSG Pager handle all our loading and unloading, instead of 
trying to fit our own LOD systems above / below it)

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. 
Flightgear-devel mailing list

Reply via email to