|
|
Posted :
4/30/2006 9:07:00 AM
by Matthieu Laban
Category :
Flight Simulator Project
Alright, I was supposed to fly today with my roommate and another friends from work... It totally blew, two airplanes were available... the first one with broken strobes and beacon, and the next one with a non-transmitting radio... That was frustrating...
We went back home, and I started coding some stuff on FSP...
I implemented a threaded update of the world... it still sucks a little bit but it's a good start. I could do a flight from Palo Alto, to San Carlos and then to Concord Buchanan :-) I wanted to do that kind of 'long distance' flights for a while and it's now possible !
Well, enough for words, here are some of the pics:



More Pictures Here
Happy Landings
|
Posted :
4/27/2006 7:10:00 AM
by Matthieu Laban
Category :
Flight Simulator Project
Looking better every day :)
I have captured new high resolution screenshots of the new terrain engine in action. I have "fixed" the problem with SFO runways behind non perpendicular... but this is a quick hack, so I'll figure out something better some day... meanwhile, this'll do the trick...
 Moffet Federal
Silicon Valley and Moffet from another angle
 Low pass over Moffet
This new terrain engine is starting to shape up and some of these screenshots look pretty good I think... Especially the first one with the view from high altitude...
I'll work on optimizing all that in the next few days and try to release a new version by this weekend hopefully... or maybe sometime next week...
Happy landings
|
Posted :
4/25/2006 8:16:00 AM
by Matthieu Laban
Category :
Flight Simulator Project
I continued experimenting stuff with the terrain today...
I'm too tired to start a long blog post about it and my english co-processor is already asleep... that would result in crappy english writting, so this is going to be a short one...
I'm gonna let the screenshots speak for themselves instead...

On the left, low res of a very detailed area of texturing (before reloading), and on the right, a high res version that has been automatically regenated when reloading the terrain. Some sort of adaptive... something...

Kewl thing is that it can actually span on multiple resolutions now, just like in this example where you have the low and high res versions right next to each other. The texture area is overlapping, so it generates high res stuff on the small mesh close to the camera, and low res farther away... Pretty neat... On these pictures, the blue squares represent the "texture bounds", and the red lines the "mesh bounds"

Spanning on different resolutions again, but at Palo Alto... Man I need to recover the old style, this looks ugly ! :)

San Francisco airport on the left. High res texture on the center mesh, and low res on the edges... Silicon valley on the right. Texture areas are clearly visible over Moffet and Palo Alto.
Well, that was fun, but I'm afraid I found a important issue in this terrain thing and in my coordinate system in general... If you take a closer look at KSFO runways, you'll see that they are not perpendicular ... and that sucks ...
I think I have a few leads on how to solve that... more soon ! Happy Landings
|
Posted :
4/20/2006 4:36:00 PM
by Matthieu Laban
Category :
Aviation
Well, I can fly solo now! My CFI checked me out on the club’s PA28-181 and 161s. So to celebrate that, I decided to fly last Saturday and go to Monterey with Julie and a co-worker friend of mine who happens to be a pilot too.
Weather of course sucked, so we had to change plans. I decided right before startup that we would go to Reid Hillview, then somewhere north like Oakland or Hayward, and that we would advise, depending on weather conditions over San Francisco.
“Palo Alto, Ground, Cherokee 12345V, at Lima 16, with Hotel, ready to taxi for a straight out departure to Reid Hillview”. Well, I messed up the message a bit, but it resembled something like that ;-)
Right after take off, we were sent off to Moffet Tower, that is just south of Palo Alto. We flew over the airfield, and apparently, Moffet controller didn’t want to talk to us very much so he told us to switch to San Jose tower thirty seconds later. This part is very fast, 4 different frequencies in less that 5 to 10 minutes. We flew over Santa Clara, NVIDIA’s HQ, Great America Parkway, San Jose Airport. Overhead the airport, we switched to Reid Hillview tower who cleared us for a direct approach runway 13 Right. There was a strong crosswind that day, so I decided not to deploy full flaps. This had implications on the speed of the airplane… I arrived a little too fast, so I executed a go around, then another hehe, better safe than dead as they say, right? Next try went alright ;) One thing to note is that the tower controller was very nice at Reid Hillview.
Anyways, after that, we headed to the north, living San Jose to the left, and with a nice view of the mountains on the right… After half a dozen miles, we decided Oakland was going to be our next destination. This is the home base of my co-pilot of the day, Bruno. (Thanks again for the help with the radio ;)) We contacted Norcal approach, and got cleared for approach to runway 27L, which we later changed to 27R. Not much traffic in the pattern besides a Learjet arriving from the north. The runways at Oakland are much wider and longer, so this was better that Reid Hillview and Palo Alto :) We did a touch and go and asked for the same again, followed by a departure to the north for the continuation of our bay tour. “Cherokee 45V, number 2 behind the Learjet on final, cleared to land runway 27R, caution wake turbulence” After this last touch and go, we flew towards Oakland (the city this time) and then to the Golden Gate Bridge, overflying Treasure Island, Alcatraz… Even though the weather was not very good, it was still a wonderful sight!
At the Golden Gate Bridge, we decided to go home, and request a direct through Class Bravo. We got cleared and flew south east, over San Francisco City, Daly City, KSFO… It got a little bumpy when we flew close to the mountains west of the airport… Julie didn’t quite appreciate that, so that’s why there is no more photos from that moment on hehe :-) The rest of the flight went smoothly and we landed after a flight of an hour and 36 minutes :)
Great fun !
Here are the pictures :
Bay Tour of 04/15/2006 Bay Tour of 04/09/2006 (Checkout flight with CFI)
Happy Landings !
|
Posted :
4/6/2006 5:12:00 PM
by Matthieu Laban
Category :
Flight Simulator Project
I did the first tests of terrain texturing yesterday, so far it looks crappy, but I'm researching so I guess that's normal ...
The system currently only supports texturing of relief areas that are smaller than the area covered by the texture. That was the simplest case ...
I'll continue that tonight ...
Check out this first screenshot
|
Posted :
4/5/2006 8:08:00 AM
by Matthieu Laban
Category :
Flight Simulator Project
Slight improvements, check this out :
Before : Loading time of full scene : 45 seconds to 1 minute Memory Usage of FSP : 700~800MB
Now : Loading time for full scene : 10ms (yes ! ten milliseconds) Memory Usage of FSP : 150 MB
This huge improvement is due to the use of File Mapping. (CreateFileMapping, MapViewOfFile...) This is exactly what I needed, and I don't know why I didn't think of that before. Basically, what I was doing before was reading the full altitude database file (a huge table, full of Int16) and copied it to an internal table. I then used this table to lookup the altitude at a specific point in the world. That was fast, but caused a important memory overhead ...
With this file mapping thing, I don't allocate anything and windows takes care of all that stuff for me (more info on msdn for those who care). I can look up the altitude pretty much the same way as before, but without copying all the data to my own internal memory. I gain both in loading time and memory. The time required to map the file is insignificant.
All that means I'll be able to feed the sim with HUGE amounts of data ... but that's for tomorrow evening :-P mmmm, I want to test now ..... meeting at 9:30 am tomorrow .... okay, we'll see if I snapped and tried tonight :)
EDIT : yeah... I tried hehe :P it works great ! I have the entire bay area from Napa to Monterey, to the Central Valley, Looks awesome ! :-P
Man, I'm happy :-P Happy Landings !
|
Posted :
4/4/2006 8:31:00 AM
by Matthieu Laban
Category :
Flight Simulator Project
A Flight Simulator Project post, for a change ? Well, it’s no secret I’ve been working on the terrain generation lately, actually, I was working on terrain shadowing… I tried a Shadow Mapping approach, but it sucked… the terrain appears to be too huge and I faced precision issues … Since I didn’t have any concluding result yet about this terrain thingy, I decided it was time to run some heavy tests and see how it behaved with huge areas of DEM data. I shot a video of what it looks like ! It’s still untextured but still, it looks good…
Click here to download video.
Disclaimer : The video suffers from stutters and low fps... I only set fraps to record at 20fps, so that's normal. Also, the DEM data is pretty large, it makes FSP overall memoty usage to up to 800MB... Needless to say my laptop was suffering :-)
Anyways, about how I do that … Well, that’s a little different than all the other approaches I’ve seen over the internet… My explanation is not going to include any fancy formulas or anything… Basically, I have created in my favorite model editor, a huge set of patches at different resolutions, from very detailed, close to the center, to very sparse for areas far from the view point. Here’s a wireframe view
 Click to enlarge
Why did I do that instead of creating a patch by hand? First, because that’s what I did before, and it was a real pain to generate all that stuff. Even though it worked, some cases were really complicated and it was against my principle of coding on FSP. This principle is : “Make the feature work and move on with life, you’ll refactor when it’ll really start sucking”. The great thing about this is that I end up with a working feature, certainly not as optimized as it could be, but it works, and the overall game is moving on. That’s probably why FSP is not only a Terrain Generator. Because the terrain in FSP started as a simple patch, then more patches, then another thing, and it became what it is now, until next refactor … It might not stay that way, as I think I could do better than this, but meanwhile, it does its job of showing the terrain ! One other great thing is that most of the code that was used in the previous version of each feature is reusable, and even if no code is reusable, I already have a view of what to do, and what not to do…
Anyways, back to the relief generation. The thing that kept me from considering this option was the computation time of the position->altitude lookup. In fact, I found a very quick a dirty solution, with just a couple of rules of three calculations … again … It takes about 250->500 ms to recalculate the height of 105’000 vertices. Stutters can clearly be seen in the video when I recalculate the relief, but this will be done in another thread eventually so I don’t consider this as an issue.
The texturing is generic now. It is purely based on altitude, and the lookup is done via a simple pixel shader that matches the “altitude” of a pixel to a texture coordinate.
The next step will be to actually map terrain textures on that … I have some clues on how to do it, but I think this is going to be the trickiest part…
Happy Landings !
|
Posted :
4/3/2006 1:21:00 AM
by Matthieu Laban
Category :
Flight Simulator Project
Well, okay, I was supposed to talk about my last flights, and I failed to do it for the last two weeks...
Actually, I didn't fly last week end, my flight instructor was not available so we postponed the flight to this week end. In short, two weeks ago, Steve (my CFI) found out that I had forgotten some of the flight planning basics... so we shortened the flight and made a little tour around Livermore and Byron.
So this week end, I had to be more prepared and plan all the stuff, which I did better apparently, but then some other issues came to light. One of these was the radio... And I gotta say, my english skills are given a hard time when I'm flying... These guys speak so fast, and apparently don't get that I'm not from around here and don't talk slowly :-) (or speak little (private joke)) Anyways, that was this Saturday, and we scheduled another flight for today (Sunday). The purpose of this flight was to make me work with the radio, talk to many controllers, switch between different radio frequencies, towers, ground control and stuff...
We took off from Palo Alto, and asked for a straight out departure from Runway 13. Right after take off, we were asked to switch to Moffet Tower, which is just south of Palo Alto. I was surprised that the controller at Moffet handed us to San Jose tower very quickly, when we were still over his airfield... We flew along the 101, and I saw my apartment, NVIDIA from above… pretty cool...
Then, we flew just a little north of San Jose airport, and we were cleared to switch frequencies to Reid Hillview airport. Reid Hillview cleared us for a straight in Runway 13L and an option for a left downwind departure to Hayward.
That part was nice, we flew north west to Hayward, playing with the GPS inside the airplane, a Garmin 430, learning how to use it. After that, I contacted Hayward Tower that cleared us for a left downwind runway 10L. This time, I was more prepared for this flight, I actually had a pencil in my hand at all time, so whenever a controller said something, I was ready to jot it down ... That something I had not done in a long time ... One of the downsides of flying only to local airfields where you know everything already...
Alright, so no major problem on this landing. I'm glad I can land Pipers way better than I used to in France when I was learning. I used to fly a PA28 Cadet in Lyon, and I remember always having a hard time flaring the airplane correctly at touch down. Anyways, we took of again and were cleared to Palo Alto. We contacted Palo Alto over Coyote Hills and headed towards a long final for runway 13. You'll see on the Google Earth track that on the way to Palo Alto, we didn't go very straight, that's because Steve simulated an engine failure... Apparently, I didn't pick the right field to land on... :-P
At Palo Alto, we did a short field Landing, approaching at full flaps, 60 knots, then 55 knots... engine at idle. That gave us a 500ft/min descent rate. I never thought we would reach the runway. The landing was rougher that usual, we didn't have much speed left at that time, but that was still ok, I didn't break anything :-) During that flight, I was tracked by my two GPS friends, the Holux and Garmin 96C GPS devices. I recorded tracks on both devices just to compare which one was better, and they both seem to be reporting the same positions.
Here are the Google Earth KML Track files :
Sunday's Flight (Garmin 96c) Palo Alto, Reid Hillview, Hayward
Sunday's Flight (Holux) Palo Alto, Reid Hillview, Hayward
Saturday's Flight Palo Alto, Tracy, Stockton
Two weeks ago Palo Alto, Livermore
Happy Landings
|
|
|
|