> > Sebastian Bechtold wrote: > >> > Hello! >> > >> > Around 6 weeks ago, I came up here with the idea to represent ground >> > features through textures rather than through terrain mesh polygons for >> > more detail and easier modification (which is of course not my own idea, >> > but it's definitely a practical one and not yet implemented in >> > FlightGear). I'm currently trying to develop a texture generator program >> > which generates fake aerial images using the same ESRI shapefile data >> > that is used for TerraGear scenery generation, and it is now for the >> > first time able to produce some useful results. I'd like to present some >> > images that were made with it, hoping that someone with knowledge about >> > OSG and FlightGear's terrain rendering system might perhaps like them at >> > least a little bit so that she/he might want to help me finding a way to >> > get them into the sim. They use FlightGear's terrain textures, so it >> > looks much like the current FlightGear scenery, but with curved roads >> > and rivers and a few other improvements (more to come, I have some >> > further ideas and this is still a very early stage of development). All >> > pictures show german towns: >> > >> > Mainz, Wiesbaden and the Rhine river: >> > http://www.rotblind.de/fgstuff/fgst/mainz_wiesbaden.jpg >> > http://www.rotblind.de/fgstuff/fgst/stuttgart.jpg >> > http://www.rotblind.de/fgstuff/fgst/karlsruhe.jpg >> > http://www.rotblind.de/fgstuff/fgst/heidelberg.jpg >> > >> > This is very cool. Can you generate these "mega-textures" in real time? I suppose you define "real time" in this context as "fast enough to generate them on-demand at simulator runtime". Well, unfortunately, not at this resolution. I've done a few tests and very rough estimates which lead to the result that it -might- be possible to do this at 10 m/pixel (half the resolution of the screenshots). (and of course any lower res, but that's really not worth the work any more), but even this won't be fast enough for military jets.
This estimate is based on the assumption that when an aircraft is located over a certain tile, we want to have generated the textures for all neighboring tiles before the aircraft can reach the tile's border.. Generating an image of 1024x1024 Pixels takes around 5 seconds (on my machine). If an image with this size and a resolution of 10 m/pixel is generated, it can be used to cover an area of 10240x10240 meters (obviously...). Now, when our aircraft leaves one tile and enters another, the maximum number of neighbor tiles (or the now entered tile) which are not yet textured is 5. This means we need 5x5 = 25 seconds to generate all the textures for the neighbor tiles until the aircraft might enter one of them. So the aircraft's maximum speed must not be higher than 14482 m in 25 seconds, which is 1474.56 km/h. And even in this situation, the texture will be ready only just in the moment when the aircraft enters the tile. But then, this is the pessimistic end of the range of possible situations. With slower aircraft velocities, the texture generator could very well have the chance to work ahead and finish textures long before they are required in that resolution. Moreover, computers always get faster. Maybe new ones could already handle higher resolutions without problems at the time when this is implemented. And last, but not least, there's the possibility to make a faster texture generator program. I'm currently using the Magick++ library, and since my program isn't much more than a control frame to fire out the right sequence of calls to Magick++, I fear that I can't optimize a lot there. I decided to use Magick++ for my first attempts, since it is easy to use and has powerful drawing methods, but maybe there are faster librarys around. Microsoft FSX uses one called AGG, which is said to be really fast, but looks a lot harder to learn than Magick++. Maybe I should try to do that, if Magick++ is not fast enough. So much for this today. I really hope I can implement this one day, since it would offer so many new possibilities to make better scenery. Best regards, Sebastian ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel