nVIDIA GeForce256 and T&L
T&L, part 2: Lighting
When we already have all the made calculations, we are going to calculate the lighting, because a world without lights... is dark. In the current games, the programmers it uses lights maps to decide that it departs from a scene it is illuminated (complicating the movement of the lights and diminishing the reality of the shades, since this skill consists of changing the color of the objects to simulate that are illuminated) or also they can calculate the lighting that corresponds to each of the apexes (vertex lighting).
With the GeForce, they can manage up to 8 different sources of light, and see the results of the renderización of these lights in real-time (to do it in plan "fixed photo" is relatively simple, but it is not very useful in a game).
The unit of lighting of the GeForce calculates the direction of the beams of light towards the apexes, as well as the length from the apex towards the point of view (exactly the same trip that does the light in the reality). This way, we can apply the vertex lighting and give him light to the objects, while we can do other calculations from this information to obtain effects as there can be the fog.
Now we already have a scene, with the objects and also we have lit the light. Of course, there can be diverse types of lights. We return to our game of careers of cars: it is night and there is full moon, with what there is a light that illuminates everything, of general form, but also there are lights of lampposts that illuminate the street (these are calm), the lighthouses of the cars (these move) and finally a police officer car, with lights of colors that, in addition to moving, turn. Well, our flaming GeForce is going to facilitate all these calculations and heaps of multiplications of counterfoils (yes, the lights do not escape to the mathematics either). We are going to see as of important it is the light:
We do not have lights of any type to the left. If we bear in mind the solar light in the first moment we observe how the shades appear by magic art, nevertheless, the source of light is not completely definite, is not known very well from which it comes; this is called an ambience light.
Well, the work has multiplied for three in the last case, since, in addition to the light we will have to bear ambience in mind all these lights that produce the torches of the walls. To finish of complicating it, you all know that the fire one is not calm, with what these lights will change position (a bit) in every frame. Also you will be able to verify how the color of the light looks alike to that of the fire (as it must be).
Well, there are two types of light, the ambience and the guided light (Diffuse and Specular Lighting). The differences between two o'clock you can observe them in these images provided for nVIDIA:
The light is directed to the box, but as it is a question of diffuse light, the beams get lost as soon as they intercept the object. For an example put, if you are reading this day, to put you out to the window and look at the street, of course you will see the paving, nevertheless you will not be able to know where from the light of the sun comes, since enough is distributed uniformly.
Nevertheless, with the guided light (specular), the light beams bounce towards the point of view of the spectator, simulating the effect of a focus. With this light we can simulate different behaviors as the material that we are illuminating. In this case you will have to look at the street in the night, it is sure that a lamppost illuminates certain piece of the asphalt, perfectly defined.