From: Stuart B. <stu...@gm...> - 2014-05-14 10:46:41
|
Hi All, (Still out of action due to lack of FG-capable computer - current ETA to get "back in the game" is late June) On Sun, May 11, 2014 at 4:13 PM, Renk Thorsten wrote: > It'd be good to get some comments from Stuart, as he's most experienced in > the way the current approach works from the C++ side - I mainly understand > the GLSL side of it. > All of what's been written so far is correct, and I've not got a great deal to add right now. We currently use instanced buildings to save memory. We've also added deferred loading of models (including buildings) for the same purpose and to separate loading of the tile itself from the objects within the tile. However, instanced buildings have some limitations. In particular, the C++ placement code doesn't know the specific size of a building at a given point, so has to assume it's the largest size from a set when ensuring that it doesn't overlap with the triangle edge. With Scenery 2.0, that causes a problem as the triangles are much smaller in urban areas due to the increased road resolution, so you may see a decrease in building density. This can be addressed by clipping against the polygon edge rather than the triangle edge. I had some code to do this, but it increased load times due to the increased computations and had some bugs as well. I'm beginning to think that the current instanced random building code has reached the end of it's usefulness, and we need to look at doing something completely different. Given that deferred loading saves quite a bit of memory, I quite like the idea of generating all buildings (either offline or in-sim) using a combination of OSM buildings and some random heuristics based on road data, collect them together into big meshes, and load them as normal objects. Of course that leaves a big problem in that the roads in the textures won't match the building placement. I don't have an answer to that - I guess we could load smaller roads at a significant increase in scenery vertex count, possibly using the same heuristics to generate fake roads where required. Alternatively we could create a single-bit texture procedurally with all the road information, and then bake that onto the underlying texture within a shader. It would be a very big texture. -Stuart |