Random Buildings: Difference between revisions

Jump to navigation Jump to search
no edit summary
mNo edit summary
No edit summary
Line 13: Line 13:


== The new System ==
== The new System ==
{{FGCquote
  |We currently use instanced buildings to save memory.  We've also added<br/>
deferred loading of models (including buildings) for the same purpose and<br/>
to separate loading of the tile itself from the objects within the tile.<br/>
<br/>
However, instanced buildings have some limitations.  In particular, the C++<br/>
placement code doesn't know the specific size of a building at a given<br/>
point, so has to assume it's the largest size from a set when ensuring that<br/>
it doesn't overlap with the triangle edge.  With Scenery 2.0, that causes a<br/>
problem as the triangles are much smaller in urban areas due to the<br/>
increased road resolution, so you may see a decrease in building density.<br/>
This can be addressed by clipping against the polygon edge rather than the<br/>
triangle edge.  I had some code to do this, but it increased load times due<br/>
to the increased computations and had some bugs as well.
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32337029/
    |title=<nowiki>Re: [Flightgear-devel] cities in FG & how to move forward</nowiki>
    |author=<nowiki>Stuart Buchanan</nowiki>
    |date=<nowiki>2014-05-14</nowiki>
  }}
}}
As of 05/2012, FlightGear supports a new "random buildings" feature, buildings are generated at runtime and placed in Urban and Town areas.  In v2.8.0 these take up a lot of memory, but in subsequent releases this has been improved significantly.
As of 05/2012, FlightGear supports a new "random buildings" feature, buildings are generated at runtime and placed in Urban and Town areas.  In v2.8.0 these take up a lot of memory, but in subsequent releases this has been improved significantly.


Navigation menu