Lighting
Learn how to represent lights in a scene in PyTorch3D.
Lighting in computer graphics
Now, we introduce the constructs needed to add lighting to a scene. Like many topics in the wide world of computer graphics, lighting is quite complex, and many different approaches have been taken by artists and engineers seeking to achieve specific styles and aesthetics.
The simplest kind of lighting is purely emissive lighting. With this lighting model, the polygons of objects are self-lighting and do not interact with external materials at all. They appear the same regardless of the view angle, their position in the world, or occlusions from other nearby objects. The shading process simply takes the diffuse appearance of the polygon and renders it to the camera. However, emissive lighting is also referred to as unlit shading since no actual lighting is involved. Historically, this technique has been used in real-time rendering contexts such as video games from the 1990s. It is highly performant but quite unrealistic in appearance.
A brief introduction to light physics
What we call visible light is a specific band of wavelengths in the electromagnetic spectrum. This band consists of radiation with roughly the wavelength of
All light sources contain a mixture of light of different wavelengths. Full spectrum light contains light spanning all wavelengths of the visible spectrum. Lights can also appear to have a tint of blue, green, yellow, red, or any other color, depending on which range of the visible spectrum it emits most strongly.
Types of lighting
PyTorch3D supports the most common forms of lighting (with the exception of spotlights and emissive materials). This includes the following types of lights:
Ambient lighting
Directional lighting
Point lighting
All of these lights possess a color, but they differ in how they govern the transport of their light through a scene.
Ambient lighting
Ambient lighting is light that has scattered throughout a scene so much that it travels equally in all directions. For this reason, it is also called a non-directional light source. It is often used as a fill light to cast scenes in a specific appearance or to lift the overall exposure of a scene. Because it travels in all directions equally, it doesn’t have a specular component. This kind of lighting is like the ambient light that fills up a cloudy day and does not cast hard shadows.
Get hands-on with 1200+ tech skills courses.