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é
Bloom / Glow / HDR and Rain 

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

I snapped, I finally bought a video card that supports shader model 3.0 :) That means i could work on my HDR shader again !
Two new things to write about then, HDR and Rain.

HDR:
To achieve the HDR effect, the rendering goes through 6 steps. All of these steps are rendered to textures that are re-used in the next step.

1 – Render to small texture
To make a better rendition of the blur effect, a render to a small texture is used. The texture size I chose is 128x128.

2 – Perform luminance / brightness filter
The goal of this step is to transform the image to black and white, and to reduce or increase the brightness of the whole image.

3 – Perform a Horizontal Gaussian Blur
With a technique I found in NVIDIA and DirectX SDK, a horizontal blur is applied on the rendering.

4 – Perform a Vertical Gaussian Blur
Same as above, but vertical.

5 – Render the original image on the back buffer

6 – Render the texture of Step3 with blending, on the back buffer
This last step renders the blurred texture over the original image. The result is what is on the images below.

 
    Rain ... Dark skies ...  -       Night flight

  
Left : Light gloom effect  - Right : HDR


God's Airplane in heaven hehe :-)

 
Left : Overbright tests - Right : Blurry :)

I like what this effect does to the flight simulator, it makes it look less crispy and more movie like.
I know you have comments on the overbrightness of some of the images, but these were only tests, and all the parameters in the shaders are completely customisable. I think i'll leave it up to the users to configure them to whatever value they prefer :-)

One last comparison for a light effect :


 
Left : No Gloom - Right : Gloom

Rain:
To create a rain effect in the simulator, I had two options in mind.
The first one was to create some sort of particle system, with rain drop textures on every particle, and make them move down, just like real rain.
The second one was to render a couple of blended cylinders with rain texture (vertical lines) on them, center them around the camera and perform UV animation on the texture to make the rain drops slide down.
I chose the second option since I think it takes less processing time to do a simple UV animation than it takes to render hundreds of rain drops.
To reduce the CPU effort on the UV Animation and to avoid uploading the vertex buffer to the video card each time I modify the cylinders, I moved the UV Animation logic to a vertex shader.
Here are some pictures of what it looks like. It might look crappy on still images, but when moving, it looks really nice.
All these images were rendered with gloom shader on.

 
Nasty weather


Cessna 210 Light rain
 
Rain ...

Happy Landings!

Clouds & Autogen 

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

Two big updates to talk about today. The return of the clouds and a cool autogen feature.


Clouds :
One morning last week as I opened my window to a nice weather, with puffy clouds on a nice blue sky, I thought it would be nice to re-enable the clouds in the simulator.
Clouds were one of the first things I added to boost the realistic factor of the simulator. They give a nice impression of volume to the scenery and it’s always nice to fly around/through them, you can trust me on that one ;-)

As I’m trying to do everything by myself, I decided to take pictures of the clouds and use them in the simulator. The clouds this morning were perfect for that kind of work, sharp with a uniform background. I took like 50 cloud pictures isolated the parts I wanted and applied a couple filters on them. Then I cut and pasted the parts on a texture that contained 16 clouds chunks.
There was all the artwork I needed. The rest I took from watching how the guys from flight simulator proceed to render the clouds.
The basic idea is not to use a single billboard per cloud, but a bunch of billboards at random positions around a center point. This gives an impression volume, kind of like a  volumetric cloud when it’s just a group of billboards. It sounds stupid but it actually looks great, even when flying around/through them.

  
 
Clouds

Autogen:
A great feature that Flight Simulator 2002 brought was Autogen. This technique draws generic buildings, trees, houses on a terrain from land data. In flight simulator, you have a tool to assign a texture a group of autogen chunks. In these chunks will appear the type of objects you want to see at this position like trees, light building, skyscrapers, light houses, bushes …

 
Autogen

The great thing about this feature is that is gives both an impression of altitude and speed. You really have the feeling that you’re flying over lots of things, and not over a huge flat plan.
I’ve been wanting to implement this feature for a long time but never had the time to code it. Now the base code is done, and it works really great.
The main idea behind my implementation of Autogen scenery is to draw rectangles on the scenery and assign them a type of object (Only trees or buildings for now).
During loading, these zones are detected and an Autogen builder generates random building/tree types at random positions inside these rectangles. These objects are then rendered at their position every frame.
Result : this killed my frame rate :-/

As I was about to dump this whole super cool Autogen feature, I changed the approach of the whole rendering procedure. Instead of rendering objects separately, I created a huge vertex buffer of all the objects that were sharing the same material within each autogen area. Instead of a thousand calls to their render method, only one render was called, therefore, only one DrawIndexedPrimitive, and only one set of RenderStates changes ....
Result : I went from 26 fps to 200+ J
As always, it need improvement, but the basics are here. Next steps for this feature will be to add more building types.
Let’s move on to the screenshots :

   
Autogen

  
Autogen

More screenshots here : http://matt-online.homeip.net/FlightSimulatorProjectGallery.aspx

Happy Landings !

Flight Simulator Project - Beta Program 

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

Note : this project is NOT Microsoft Flight Simulator 2006, it is a completely different project i'm working on. I'm not working with Microsoft, and can't provide ppl with beta versions of FS2006 ...

Update (2005-07-20) :
A downloadable beta is now available here

At the beginning of the week started the Flight Simulator Project - Beta Program. I’ve posted a message on the PilotList and a bunch of people replied for being part of the testing.

   
   
   
Various Screen shots of the Flight Simulator Project

The reason why I’m not giving it out for download to every one is to avoid the load of bug reports and I’d rather eliminate the more obvious problems on a small group of people. The main idea in this program is to eliminate the big problems and first launch issues.

Be aware that you will have to install the April 2005 Redist of DirectX and the .NET Framework 1.1.

If you are interested and want to help me, feel free to e-mail at :
FlightSimulatorProject[@]gmail.com (remove the brackets)
Please, use this as your email subject : [Flight Simulator Project Beta Program]

Happy Landings Everyone!

Note : this project is NOT Microsoft Flight Simulator 2006, it is a completely different project i'm working on. I'm not working with Microsoft, and can't provide ppl with beta versions of FS2006 ...

Cessna Citation CJ1 

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

The flight simulator project welcomes a new aircraft to its fleet, the Cessna Citation CJ1. This aircraft is a light jet and I thought it would be a great idea to have such an aircraft to test my new physics parameters. Indeed, even though the Piper PA28 and Cessna 210 Centurion, are quite different, their flight model is quite similar and aside from the engine horse power, nothing really changes, from my simulation stand point at least.

Last Thursday night, I decided to start modeling this new aircraft. I chose the Cessna CJ1 because I like its shape with the elevator on top of the rudder wing :)

The model is not finalized yet, but the main parts are completed and the overall impression is satisfying enough. It’s textured and has moving parts (ailerons) but no moving landing gears. That’s why they are down in the screenshots. But let’s just say for the record that they are down because during the first flight, I didn’t want to take any risks of it not extending properly ;-)

For the flight model itself, I haven’t really changed a lot of parameters yet. Only the aircraft mass, engine horse power, brakes strength, and wheel damping were changed. With those updated, the aircraft now takes off at approximately 100 knots, and stalls around 80. I thing it’s still quite slow, but I’ll tweak this later. I’m happy with just the fact that increasing the weight did all the trick !

Anyways, screenshots tell more that my crappy English writing, so here we go.

  
CJ1 at parking              -                CJ1 on Final 

    
Taking Off

More screenshots can be found at : http://matt-online.homeip.net/FlightSimulatorProjectGallery.aspx (Click on 'Cessna Citation CJ1')

Happy Landings !