Scenery LOD ideas for FlightGear: Difference between revisions

Comments from Stuart
No edit summary
(Comments from Stuart)
Line 120: Line 120:




'''Stuart:'''
Now, this is very interesting. I need to have a bit of a play with it to see what the CPU cost of the simplification is, but at first glance, it should be straightforward to build scenery LoD by using this for the distant scenery, and simply re-loading the BTG file (which is fairly cheap) at closer range as part of the PagedLoD system we've got for trees etc.  Obviously there's a bit of a problem at the edges, but because the scenery tiles have straight-ish edges and are single-sided, I suspect the visual artifacts will be minimal.
Hooray - I'm not sure there's much value in tying this to a SGPropertyChangeListener, as its not something that can be dynamically changed.  I 99% sure the visitor goes through the OSG tree modifying the data itself, so the original data is no-longer available afterwards.  Effectively it's a destructive transformation.  So, to apply some new setting would require loading the BTG file from disk again. 
(An alternative would be to have a different type of visitor that creates a new OSG sub-tree with cloned data, but that obviously increases memory occupancy.)
I'm also not sure of the implications of applying it to aircraft,  but it should be easy to try out at least. 
-Stuart