20,741
edits
m (→Procedural Airports (psadro_gm, zakalawe, papillon81): DRAPING, as per: http://forum.flightgear.org/viewtopic.php?f=5&t=17598&start=15#p177131) |
|||
Line 168: | Line 168: | ||
The trick is to make an OSG 'loader' which creates the airport geometry from the apt.dat definitions, which of course is exactly what genapts does - this is why I was working with Chris to make it fast enough to run inside the loader thread, in FG. | The trick is to make an OSG 'loader' which creates the airport geometry from the apt.dat definitions, which of course is exactly what genapts does - this is why I was working with Chris to make it fast enough to run inside the loader thread, in FG. | ||
I'd love to fully generate the apts at runtime. LEMD is probably the most complex layout, and genapt currently takes about 2.5 seconds to generate. I imagine it could be generated in 2 stages for LOD. 1 for runways and taxiways, which are really quick, the 2nd stage for the line data which is slower. | I'd love to fully generate the apts at runtime. LEMD is probably the most complex layout, and genapt currently takes about 2.5 seconds to generate. I imagine it could be generated in 2 stages for LOD. 1 for runways and taxiways, which are really quick, the 2nd stage for the line data which is slower. | ||
'''psadro_gm:'''Although I haven't written a line of code in SimGear for draping, yet - I'm getting a pretty good idea on how it will work. I think we could speed up the OBJECT_STATIC_AGL using the envisioned draping code. | |||
Currently, when a tile loads, it first gathers the type of objects in the tile. If there is a draped object, I plan on keeping raw btg data (nodes and triangles) around. I need the Geodetic nodes, unfortunately for proper draping, so I'm going to have to create a parallel node list Cartesian ->Geodetic. The triangles are all index based anyway, so we'll just refer to the Geodetic nodes when using these triangles. | |||
A draped object's 2D bounding box will be used to quickly find the relevant triangles (using the geodetic nodes long/lat) that need to be considered, then I plan to use barycentric interpolation to find node heights at specific lat/long coordinates. This node will then be converted back to Cartesian space. | |||
=== Procedural Buildings & Cities (radi & vanosten) === | === Procedural Buildings & Cities (radi & vanosten) === |