===== General Introduction ===== ==== Rendering vs Light Modelling ==== **Rendering** is the process of generating a (final) image (or a series of images) from a 3D scene. This includes computing how surfaces appear based on materials, lighting, camera position, and other visual effects. **Light Modelling** refers to the mathematical and physical simulation of how light behaves in a 3D environment, particularly how it interacts with objects (reflection, refraction, absorption, scattering). ^ **Feature** ^ **Rendering** ^ **Light Modelling** ^ | **Goal** | Create image | Simulate realistic light behaviour | | **Focus** | Visual output | Physical correctness and realism | | **Includes** | Shading, camera, rasterization | Reflection, refraction, light transport | {{ :tutorials:light3.png?direct&450 |}} ==== Light Modelling ==== Light modelling generally involves three aspects: * Global illumination model * Light sources * Local illumination model {{ :tutorials:light1.png?direct&500 |}} Whereas the **Global illumination** model handles the actual light computation, the **Light sources** are the light-emitting elements, and the **Local illumination** model defines the optical properties of the scene objects. In each aspect, computer graphics offers plenty of alternatives. {{ :tutorials:light2.png?direct&500 |}} Several of them are implemented in GroIMP as ready-to-use tools. GroIMP integrates two main **light model implementations**, namely: * Twilight, a CPU-based implementation * GPUFlux, a GPU-based implementation Both implementing different global illumination model for rendering and for light computation. More on the different ways to implement a global illumination model can be found here: [[:groimp-platform:raytracing:raytracer_algo|Ray tracer algorithm]] The general settings of the can be changed within the GroIPM properties as described in the [[:groimp-platform:raytracing:raytracer_options|Ray tracer options]] section. In the following, only light computation or light modelling will be discussed. Regarding **light sources**, GroIMP provides a complete set of possible implementations. They all implement the //Light// and //LightBase// interfaces, which makes them easy to handle and exchange. {{ :tutorials:light4.png?direct&300 |}} For the **Local illumination** model, which defines the optical properties of the scene objects such as values for absorption, transmission, and reflection, so-called shaders are used. {{ :tutorials:light5.png?direct&400 |}} GroIMP provides a set of standard shader implementations, e.g., for Lambert and Phong shading. Whereas the Lambertian model supports only diffuse reflection, the Phong reflection model (Phong, 1973) combines ambient, diffuse, and specular light reflections. {{ :tutorials:light6.png?direct&650 |}} ==== References ==== Phong BT, Illumination of Computer-Generated Images, Department of Computer Science, University of Utah, UTEC-CSc-73-129, July 1973.