Design Element
Design Element

TLE - A life in pictures

Some screenshots from the engine with some comments from me. Click on a picture to open a bigger version in a new browser window. As in the history section, the newest entries are @ the top.

0016.jpg - Big one
Picture

The engine in it's full glory.

0015.jpg - Disco time
Picture

Picture from the current build (as of 29.07. 2004). You can see four coloured lightsources, visualized by the small yellow cubes so you can select a light using the mouse to move it around, etc. The Turbot doesn't have proper materials right now as i'm working on this part of the engine, to finally bring shaders and materials together.

0014.jpg - Yeah, dance baby
Picture

Well, this looks even better when you see it for real :).

0013.jpg - Yeah, dance baby
Picture

And here.

0012.jpg - Yeah, dance baby
Picture

As you can see here.

0011.jpg - Yeah, dance baby
Picture

The engine also supports animated textures.

0010.jpg - TextureManager::logStatistics
Picture

A picture of the console, showing the statistics of the texture manager.

0009.jpg - The evolution of lighting - Part 4
Picture

Again per pixel lighting with normal mapping but now with an additional specular map (a simple gray scale texture in this case). This is sometimes called gloss map and i use it to extenuate the specular highlight which looks much more realistic. This shader is practically a copy of the Doom 3 light / surface interaction, apart from the shadows.

0008.jpg - The evolution of lighting - Part 3
Picture

Per pixel lighting with normal mapping. Instead of using the interpolated vertex normal, this shader samples from a normal map. The lighting calculation is done in a surface local space, defined at each vertex by three vectors (tangent, original vertex normal and binormal). At each vertex the light and view vector are transformed into the surface local space and then interpolated across the triangle.

To get good results, the three vectors at the vertices should behave nicely and shouldn't jump around to much. Right now these vectors are still hard coded in the vertex shader, so this shader works only on surfaces parallel to the x / z plane. The next step will be to make these vectors proper vertex attributes and store them in the vertex array. I then have to found a method to compute the vectors for arbitrary geometry loaded from .3ds files.

0007.jpg - The evolution of lighting - Part 2
Picture

Per pixel lighting, done in a GLslang vertex / fragment shader pair. The vertex normal, light vector and view vector are interpolated and the lighting calculation (lambert / phong) is done in the fragment shader. This gives us a perfectly smooth specular highlight.

0006.jpg - The evolution of lighting - Part 1
Picture

Per vertex lighting, done with the old fixed function pipeline offered by OpenGL. The specular highlight clearly shows of the poor triangulation of the floor.

0005.jpg - Rainbow bonnet
Picture

My first experiments with ATI_fragment_shader. At the right side of the cube you see the most trivial fragment shader one can imagine: gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);. This is the GLslang version, the original code using the ati extension to build this shader is so ugly you don't want to see it. On the bonnet of the Turbot you can see a shader which visualizes texture coordinates, using the red channel of the fragment for s and the green channel for t.

0004.jpg - Smooth Turbot
Picture

The final result with diffuse lighting. The face normals are calculated and then interpolated for each vertex.

0003.jpg - Normals in red
Picture

Normals done right. As you see here, the engine as able to visualize the normals which makes debugging a lot easier.

0002.jpg - Unnormal normals
Picture

For lighting you need normals. The actual calculation was ok but i stored the wrong normal at the wrong vertex and this is the result.

0001.jpg - The scene
Picture

This is my very simple test scene. It consists of the floor, a cube and a model loaded from a .3ds file. Most of the time, i play around with Jakob's (aka Fragdieb) Turbot, a car originally made for GTA 3.