Archive for March, 2008


random() people

March 19, 2008

Some photos I just added on my Flickr page, shot a few month ago in Paris.

stranger paris 2 bis

stranger paris 2

stranger paris 3

stranger paris 1


“Practical Light and Color” Shader

March 13, 2008

Hi, I’m writting the blog post from my hotel room (which is pretty nice) in Sant Cugat del Valles \o/ near Barcelona. I started to play with OpenGL Shader Language Editor (Mac) at the airport, and I was continuing a bit tonight.

I’ve been working on a GLSL shader that interprets Jeremy Vickery’s vision about light and color, especially the color temperature concept.

color temperature dvd

Practical Light and Color (Gnomon Workshop)

At first, a few notes about this very lightweight tool: it really easy to get your hands on it as there are very fews possibilities, it crashes a lot, the code (text) editor is pretty cool with instant code validation and hightlights AND instant effect on the viewport (like a super fast compilation), there are only sphere/teapot/plane objects and no way to add a mesh, no GLSL samples, finaly an automatic uniform variables binding (I mean you type “uniform float bla;” and an editable variable appears (that you can then modify with sliders or color picker or texture browser).

So, let’s talk about light and color! The basic idea is that the hue component of the color is dependent to the luminance component (illumination of the area/object/pixel), so generally dark areas tend to red, less dark ones to orange then yellow, average ones to white, and then blue for bright things.

I noticed that the visible spectrum of J. Vickery above differs from the standard (real) one that you have in every book, but it gives much nicer results (no green nor purple, and different colors spacing).

Here are some details about my way of getting the final color, actually the differences between each image come from 2 color tone variables I’ve been modifying (from 0.0 to 1.0):

  • one that acts a bit like a desaturation, but in fact it’s something like:
    • (colorTemperature + vec3(colorTone)) / 2.0)
  • and one that is a weight related to the previous one, so the final result is:
    • (colorTemperature + vec3(colorTone)) / (1.o + colorToneWeight)

In facts, this is a way to scale the color temperature (texture) AND to reduce the effect it has on the object’s lighting. By scale I mean, using for example colors from red to white, instead of the full gradient that turns into blue at the end. Visually it’s like setting the time of the day or the kind of weather or environment (for example sunset on a sunny day: mostly orange tint).

Of course that’s not the final equation to get the color, I’m still experimenting on it so maybe I’ll give it later with more interesting results. Anyway here are my results with a white teapot:

color temperature shader

color temperature shader

color temperature shader

color temperature shader

color temperature shader

color temperature shader

color temperature shader

color temperature shader

It would be very interesting to try this shader these kind of scenes (Jeremy Vickery paintings):

color temperature jeremy vickery painting

color temperature jeremy vickery painting

And add some kind of atmosphere attenuation, just like he’s talking about in its DVD and GDC session. I didn’t figure it out the visual nor technical differences between this and usual fog in games but .. yeah soon 🙂


Barcelona D-1

March 11, 2008

Hi! I’ve been quite silent since I got back from the SF’s GDC, so here are some news.

I’ll be flying to Barcelona, Spain tomorrow for a few days trip for Ubisoft where I’ll meet the team responsible for a new project. I really can’t say more about it because the game hasn’t be announced yet. The goal is to learn from a specific technology they’re developing over there which is very exiting (couldn’t tease more I guess), help them on their new game, and see how it could be used in other upcoming projects.

I’ve already done this kind of mission before for another technology made by the Montpellier team, a bit the same genre and older, but still confidential. So I’m glad to renew the experience with another studio, that I don’t know yet. Actually I already worked with the Barcelona team on Driver Parallel Lines for Wii last year, on the Wii-specific controls for the character/camera and vehicle, so I know a few of them.

As usual, I didn’t pack my stuff yet, the last time I did the same for my travel to San Francisco and the result was that I couldn’t find my digital camera battery recharger:/

Beside that, I told you I was making a small game engine and tool on top of Ogre and wxWidgets… Well it only has a few days of work, so the editor has nothing fancy for now (I’m still discovering wxWidgets), but the engine starts to be interesting from a usage point of view. There’s nothing Next-Gen in it but with a bit of work it’s gonna be … “wait for it … LENGEN…”, no, just cool.


In fact, in my end of studies project, as soon as I wanted to make a test with Ogre (or with the physics engine) I added things in my current in-game gamestate or player or camera class, and everytime it was making the code uglier with lots of previous test in the usual Update() methods (I’m summarizing but you can imagine), because I had only ONE game, so with my new project, the goal is to be able to make a new ‘demo’ with a few clicks (like a game on itself). I’ll explain that idea next time (moreover the editor part of this process hasn’t been done yet). Anyway here is a screenshot of it :


It hasn’t any name yet, but I’m working on it 🙂 The only cool thing for now is that the wxAUI and wxPropertyGrid parts of wxWidgets produce controls that look like the .net ones (auto-hide, dockable, drag’n drop, properties, blabla…).