Hey everybody,
From the "warped and twisted uses to which no one ever expected Flightgear to be put" department: I'd like to share a few screenshots demonstrating a little system I just put together. My ultimate goal here is a real-world-terrain-based MMO game using Unity for the FPS engine and FlightGear as a backend skybox server. I also have goals for this technology that go far beyond games, but I'll leave that for later discussions.
For now, on to the screenshots!
This is standing on Spencer Butte in Eugene, Oregon, looking west. The next one is looking south:
This one is is down in south Eugene, looking up at Spencer Butte.
And here's one up in the Coburg Hills north of town, looking south back toward Eugene:
This is west of Eugene, watching the sun set tonight. Also, the first one starting to add things like Unity's trees into the foreground. Still very much programmer art on that end.
This is all done using Unity C# scripts, opening up sockets to communicate with A) a tiny little terrain server I wrote in C++, which accepts a starting latitude/longitude and a width/height of the area, and returns height data from a giant ten-meter-resolution height data file I made from DEM maps. In Unity I have a 3x3 set of tiny terrains (640m each) which page across the landscape, loading new data and moving as necessary to stay in front of the player. And then, B) a modified flightgear instance, which takes a socket connection from which it reads latitude, longitude, and elevation, and returns five screenshots taken at 90 degree angles to each other, with a 90 degree field of view.
The result was actually better than I expected, although the lighting comes out pretty sharply different between the different camera angles. There is no hiding the fact that I'm painting to a skybox - but for a first pass, it's actually pretty entertaining anyway.
There are several flightgear related tasks remaining to figure out. (Warning, gross understatement.) It would work much better if I could somehow turn off rendering for everything within a certain radius of the camera, so I would not accidentally fill half my sky with one tree. The best solution would be to somehow cut out the exact square that I'm rendering locally in Unity, but I'm quite willing to accept cheap hacks and half measures at this point.
I also need to figure out a quick & easy way to raycast for a terrain height at any given place in the flightgear world. And figure out enough of terragear to know how the terrain textures are placed. And on and on and on... but I thought some folks here might get a laugh out of this little project, at least.
Cheers, and thanks so much to everyone who's helped make Flightgear what it is!
Sincerely,
Chris Calef, CTO
BrokeAss Games, LLC