Light mapping is a technique that compares various illuminating effects of "cheap". Although it is realized, it is realized by texture map. Its basic idea is: saving the desired illumination effect in the texture, then achieve the effect together with other textures of the geometric surface through a certain manner.
Different by the light mapping implementation, the texture map can be divided into: Diffuse Light Mapping: Realize the reflection effect Specular Light Mapping: Implement the specular reflection effect 1.Diffuse light mapping: Simulation: Use the Light Map texture to simulate the surface of the surface To achieve "Lambert's Equation". Moxity: Surface Texture "Take" Light Texture ", that is, the mixing method is" multiplication ". 2.Specular Light Mapping: Simulation Effect: Use the Light Map texture to simulate the surface reflection of the surface. Moxity: Surface Texture "Light Texture", that is, the mixing method is "superposition". Usage limit: Since specular is related to the observed position, the light effect changes as the observer position changes. So Sepcular Light Mapping is suitable for situations where the lamp is disposed near the object, and if the effect of Specular Light Mapping is not good in other cases. Light Map calculation Light Map is how to get the light map texture, you can have the following methods: 1.phong rendering model 2.ray Tracing3.radiosity Here I only question, I don't know much about it. Reference: 1. "Core Techniques and Algorithms in Game Processing", Daniel Sanchez-Creespo Dalmau, New Rider Publishing