Matthieu LABAN
.NET, My Life, Flight Simulation and Real Flight...

 
About Me :
25 Years old developer and aviation
enthusiast living in Santa Clara, California.
View Matthieu Laban's profile on LinkedIn 
Contact me at :
mlaban at gmail dot com


Photo & Video Galleries:
- Gallery List
- Flight Videos
Resume :
e-mail me to get my latest résumé
Scripted Precision Approach Path Indicator 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

As i wrote in a past article last august about scripting in the Flight Simulator Project, i wanted to add a Papi in flight simulator.
For those unaware of this flight term, PAPI stands for Precision Approach Path Indicator. It's a light aid placed on the side of the runway that helps the pilot maintain a correct landing path (only on the vertical axis).
It is made of very high intensity directional lights oriented at very accurate angles so that if you fly over the path, you see a white light, and if you fly below, you see a red light. There are usually two or four lights.
For instance, on a correct approach it would look like this :


Two red, and two white = correct approach path

I thought implementing such a feature would be a piece of cake, but it wasn't, it made me pull some hair actually ... Maybe because i didn't use the right technique... I really had a hard time calculating the appropriate angles between vectors ... anyhow, it works now and it looks cool, especially at night !


Close to the ground, almost all red

One cool thing about making a simulator alone is that you can never get bored with anything ... There is so many things to do ! Yesterday i was not feeling like coding, so i fired up 3DS max and started working on the aircraft 3D model. Plenty things were missing like VHF/GPS antennas, flaps details, a dashboard ... I then added them to the aircraft and it looks a little more realistic now :-)


Details from underneath ...


Dashboard and various reworks...

Well, that's all for tonight ...
And yes, i'm thinking about releasing a version, i just don't know when yet ...

Happy Landings, and like they say :
"Red over red, you're dead, red over white, you're all right, white over white, you'll fly all night"

Flight Simulator 2004 ranked 19th ! 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

While browsing a website this morning, i found this article about the best selling video games in USA last december. I was gladly surprised that Microsoft Flight Simulator 2004 was amongst the top 20, ranked 19th !

Since this version is a year and a half old, it is amazing to see it at this place ! :-)

Let the sun shine ! 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

In Microsoft Flight Simulator history, there was one big thing that had been missing from the game for a very long time until a couple versions ago : the sun.
Sure there was light, and it was correctly oriented, but if you looked in the sky, well, there wasn't some big bright shiny thing, bringing happyness to this virtual world !
The flight simulator sun rose in flight simulator 2000 or 2002, i don't remember...

Yesterday, i decided i would try to implement the sun in the Flight Simulator Project. I had thought of two ways to do this.

  • A sprite in the sky where the sun would be
  • Adapting my skyplane shader to make it 'show' the sun where it would be. More like brightening the vertices nearby...

I chose the later. I modified the shader code and added a bunch of variables like the sundirection, the sun color, it's intensity (is it a big hot summer day sun, or a shy winter day sun ?), the color decrease factor ...
The first results were not convincing at all :)

The concept is very simple, calculate the angle between the vertex position as a vector from the origin and the sun vector.
The smaller the angle, the brighter the color is. 
A couple of lerp calls later the sun was shining !
It still requires some tweakings during sunrise and sunset, but the day part looks amazing i think :)

Check out my gallery for more screenshots.

Happy landings !

New Flight Simulator Project Videos 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

I've made a couple of videos of the new scenery i've been working on for the past few weeks.
It has moved from Livermore to Santa Anna - John Wayne Orange County airport in southern California.

Video

The new scenery looks great and i think i'm going to stick to it for a long time :)
I need to adapt a few things though. It turns out that the scale i used is not correct, i'll have to rescale the whole scenery and this will take time.

Anyways, here are the videos :
Video1 : The regular one, with regular airplane stuff.
Video2 : The crazy video where i forgot that i was playing with a million dollar airplane :)
OldVideo : A video from the last scenery in Livermore in case you missed it.

I've also posted a few new screenshots in the
gallery here.

Happy Landings !

Coup de folie ! 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

Cette après midi était trop belle pour ne pas en profiter... Beau temps, visibilité géniale, pas un nuage a l'horizon ... un coup de fil à l'aéroclub, et une heure plus tard, j'étais dans le siege gauche d'un DR400 à Lognes !
Ca a été un vol bien sympa, et assez mouvementé, en effet, le vent de sud-sud-ouest cachait bien son jeu ! La manche à air était presque horizontale parfois ...
L'occasion de s'entrainer un peu sur les atterrissages vent de travers...

Décollage quelques minutes plus tard, et direction l'est, vers EuroDisney, à 1500ft maximum... coucou à Mickey et direction Coulommiers, une ancienne base militaire.
Je voulais juste faire une verticale à Coulomiers, mais finalement, je me suis décidé à faire un touché... léger vent de travers, un peu de pied à droite, manche à gauche, et tout rentre dans l'ordre ! Au décollage, j'ai pu appercevoir les parking utilisés pendant la guerre pour garer les avions, des petits ronds en dur, bien éloignés et en cercle, pour éviter qu'on puisse bombarder tous les avions à la suite !

Décollage vers Lognes, sur le QDM 270 du vor de Coulomiers, la visi est bonne vers l'est, mais l'ouest est completement brumeux à cause du soleil qui ébloui et qui reflète de partout ...
Travers Eurodisney, je contacte Lognes, qui m'autorise longue finale 26, derriere un appareil en finale, puis finalement 3eme parce que j'étais plus loin que prévu, je m'aligne donc derrière un DR400 qui a tourné en dernier virage quelque peu avant moi.
Je sors plein volets, ca secoue beaucoup, le vent sournois qui était régulier jusqu'a présent se met à turbuler dans tous les sens ... il faut que je prenne de la distance par rapport au dr400 qui est en finale pour un toucher...
Il touche, re-décolle et me voila en finale, autorisé à l'atterrissage ... 210° - 10 noeuds de vent je crois, ca fait un petit vent de travers qu'il a fallu combattre au pied en décrabant ...
Courte, et hop, posé, manche au ventre, freins, première a droite !
Contact avec le sol et puis roulage au parking ...

Quel pied !
Les Photos Ici 
(puis 'Lognes Winter')

Happy landings

Y a des jours comme ca ... 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

... ou les choses ont décidé que ca ne se passerai pas comme ca !

Je viens de passer une journée a corriger bugs mystiques après bugs mystiques ... et en discutant sur le net, j'ai établi un début de description de ce qu'était un bug mystique :

Le Bug Mystique :
-> On ne sait pas ce qui le provoque
-> On ne voit pas du tout d'ou il peut venir
-> On a aucune piste par ou commencer a chercher comment le résoudre ...
-> Il est super illogique ... enfin, il y a 99% de chance qu'il soit très logique, mais on le croit pas ... on est dans les 1%, c'est sur !!!!

Il y a surement d'autres choses qu'on peut ajouter a la liste ... toujours est-il qu'aujourd'hui, j'ai même fait face a des corrections mystiques de bugs mystiques ...

Etape 1 :
Tout marche

Etape 2 : 
Je change un truc qui à priori n'a pas de rapport ...

Etape 3 :
Un pauvre bug graphique se produit ... des nuages et/ou le skydome ne sont pas dessinés ... parfois ...

Etape 4 :
Je casse mon code pour revenir en arriere, apparement le bug est pas récent ...

Etape 5 :
Me disant que j'ai tout cassé, je rollback à ce qui ne marchait pas ... et la, ca fonctionne ...

Etape 6 :
Retour à l'étape 1, mais avec un autre probleme bug caché ;)

Tout ca pour dire que les corrections mystiques de bugs mystiques ...
Certains diront que c'est un message subliminal de Visual Studio qui en a marre de compiler le flight sim, et veut passer a de l'asp.net par exemple :)

Flight Simulator Project coding spree ! 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

That’s like a tradition now, with vacations come updates for the Flight sim project. This break gave me the opportunity to make changes on a lot of parts of the program.

1 - Flight model, ground handling:

There is one thing that has been bugging me since the very beginning of the project: the aircraft ground behavior. For some reasons, driving the aircraft around on the taxiway was not enjoyable. The aircraft was slow, non responsive, the front wheel wouldn’t do its job after a certain speed, and more importantly, the aircraft would sink in the ground when moving too fast! …

I searched around on the net and I came to the conclusion that changing the step function of ODE might help. I replaced dWorldStepFast1 by dWorldQuickStep and voilà! All the annoying behaviors I had with the old technique were gone !

You can see in the latest video that the aircraft can have its engine turned on and off, of course, with the proper sounds.

2 – Airports, terrain:

The scenery has been updated a little to support functionalities added with the ambiances described later in this post. A control tower and a bunch of fences have been added to Livermore airport scenery.

3 - Aircraft Model:

One of the things that were hitting performances was the aircraft model. Some areas of the airplane were too highly tessellated. I decided to roll up my sleeves and started to work on a remake of the 3D Model. After a couple days, the polygon count of the aircraft was reduced to 10% of the original count.

4 – Optimizations:

I tried to optimize the engine a little and especially the rendering loop … I did a few changed and these, combined with the revamped model, resulted in a huge framerate boost!

5 - Ambiances, time of day:

I’ve added an option to change the current time in the sim. It’s not really accurate since the times of day are ‘fixed’ and the sky colors hard-coded, but the feeling is very nice and the colors change smoothly. You can see this in the video I mention at the end of the article.

6 – Turbulences:

One thing that was missing from the sim were the turbulences. The aircraft was way too stable in its flight, and it is almost never like that in reality. In real life, the aircraft always ‘shakes’ a bit on all its axes. I then decided to add a small module that added random forces at random points on the aircraft.

This new effect feels really nice and the flight experience is even better. One great thing about this is that the pilot now has to ‘fight’ against the wind on short final to perform a smooth landing.

7 - Instrument Panel:

An instrument panel module has been implemented. It can contain gauges that could eventually be scripted for each aircraft. The drawing is in GDI+ for now which gives quite acceptable results.

6 – Videos:

I've made a new video of the sim in action so that you can witness the evolutions of the simulator.

You can download it here.

I will blog soon about the first airport->airport trip completed in the flight simulator project !

Happy Landings/New Year Everyone !