Hi,
An easy old method to do ambient lighting is to do : DiffuseColor + (AmbientFactor * DiffuseColor * AmbientColor);
Another method is to have upper color and bottom color.
The best method is global illumination but still cost a lot.
Is it better to stay to the old way of ambient factor ?
True, to be more accurate on the question, I mean : what is the best option nowadays for ambient lighting to have a physical correct calcule and real-time ?
I don't get it. The first two options you mention are real time but they are VERY far from being what you call "physically correct"* unless we assume light never bounces to other surfaces; which almost never happens in real life.
First, there are more fake methods. Like...
- Adding additional lights that are positioned relative to the camera (Hollywood movies do this a lot. Keywords here is 3 point lighting setup)
- Adding additional lights that are placed in a controlled environment (usually a cinematic or some small indoor level).
- There's also a technique which dinamically places point lights at the place where the light hits on the geometry; thus simulating the bounces (works only for directional, spot and area lights). The "Leo" demo from AMD showcases this. Draw the scene from the light's perspective, and use an UAV to store the fake point lights' positions.
- Use IBL (Image Based Lighting) to loosely approximate GI. It can give very convincing results.
Second,
The best method is global illumination but still cost a lot.
That is veeeery broad.
GI can be:
- Raytraced (or path tracing). Often not suitable for real time. Although the PowerVR guys say otherwise. Intel also has a demo that didn't took off from around 2008 but I can't find it now. It was all running on the CPU.
- Baked. Depends on your definition of "real time". It is baked, but you can move the camera in real time. Depending on how much data you bake, you may even be able to move the geometry, but not the lights.
- Light Propagation Volumes. Crysis 3 uses them.
- Voxel Cone Tracing.
- Screen space. Gives terrible results to be used as a generic solution, but it is good enough for distant geometry (Crysis uses SSGI for distant geometry and LPV for close geometry).
* We actually reserve the term "physically correct" for something else. Being physically correct means the math obeys certain properties from the real world, like the fresnel effect and that the amount of light coming out of a surface can't be higher than the amount of incoming light (unless the material is generates lights from another source, like a fluorescent effect or a lit cigarette).
GI is just about the number of bounces that are taken into account by the math.