| 2008-08-03 | Let there be light! |
After reflexion, i've decided that the main light source will come from the player.
Daídalos is going to have a disturbing atmosphere, and i think that having a flashlight for main light source is a good idea.
So i started to work on the light handling:
Let there be light!
In fact not really. If you look at it you will notice that the light is not reallistic, it's roughly a light but we can see the "breaking points". It need improvement.
A little explanation:
In order for OpenGL to generate the light properly,
we need the give the orientation of the walls. To do so, we use what we call the normals.
A normal is a vector perpenticular to the vertex of an object. There is 4 normals by facets.
In the previous screenshots, the normals are there but it's not enough. Why? Simply because with the type of illumination choosen (Vertex lightning) 4 normals is not enough for a wall,
the light do not have enough reference points, and so it's not realistic.
We need to increase the number of normals by wall.
As i said before, each normal is associated to a vertex, we simply increase the number of vertex by wall, wich mean more facets by wall!
The result is a lot better, even if we have to increase the number of facets. In the futur test version, it will be possible to configure the number of facets in the scene in order for any computer to be able to run it.