• This lesson will take you through setting up GI lighting for an animated scene
  • The information centers around setting up GI and lighting for the scene
  • This lesson topic is approximately 30 minutes in length
  • Lesson covers all 3 Learning Cycles for the Lesson Topic – Lecture, Demonstration, and Activity




Available Materials


Goal - by the end of this lesson you will have a good grasp of how to properly setup animations in which only the camera moves

Objective – We will develop the look for the lighting of the animated car / street scene                             

Outcome – You will be able to set up GI,  and know how to use the Irradiance viewer to help set up your render for animation

Available materials

To set up the lesson follow the links below and download all available materials.

Lesson plan download
Presentation (Lecture) download
Demonstration tutorial download                                                                                   

Scenes & Assets download



1. Terminology 

 Here’s some terms to be aware of when thinking about the Global Illumination

  • Fly Through
    • Where a camera travels through a scene (with no animated geometry or lights)
  • Global Illumination
    • How light is bounced off of surfaces onto other surfaces via indirect light rather than being limited to just the light that hits a surface directly from a direct light source.
  • Irradiance map
    • Is a collection of points in 3D space (a point cloud) along with the computed indirect illumination at those points
  • Light cache
    • Light caching is a technique for approximating the global illumination in a scene that traces paths from the camera instead of from the lights (like a photon map)
  • Primary and Secondary Light bounces
    • A primary diffuse bounce occurs when a shaded point is directly visible by the camera, or through specular reflective or refractive surfaces. A secondary bounce occurs when a shaded point is used in GI calculations.


a) Light Bouncing

  • Light bounces
    • When the sun hits a surface, it does not stop.  It bounces from that surface often taking some color from it.
    • If you shine a spotlight at a red wall, the bounce light will contain a red hue



b) Bouncing Light

Primary and Secondary Light Bounces

  • Primary Light Bounces
    • A primary diffuse bounce occurs when a shaded point is directly visible by the camera, or through specular reflective or refractive surfaces
  • Secondary Light Bounces
    • A secondary bounce occurs when a shaded point is used in GI calculations to light the scene further
    • A secondary bounce happens when a ray has already been through at least one GI bounce already
  • GI Caustics
    • GI caustics represent light that has gone through one diffuse, and one or several specular reflections (or refractions)
    • Lighting passing through a glass object causing coloured caustics on a surface such as a table


c) Indirect Illumination

Indirect Illumination Overview

  • Irradiance Map
    • Computes the indirect illumination only at some points in the scene, and interpolate for the rest of the points
  • Light Cache
    • The light map is built by tracing many eye paths from the camera. Each of the bounces in the path stores the illumination from the rest of the path into a 3d structure, very similar to the photon map.
  • Brute Force
    • Indirect illumination is computed independently for each shaded surface point by tracing a number of rays in different directions on the hemisphere above that point



d) V-Ray Quick Settings

  • Fast way of selecting the type of GI you need for your scene
    • Can be found on the V-Ray shelf
    • If you do not see the V-Ray shelf, you can create it from within the Settings tab of the V-Ray Render Settings
  • Each preset creates settings useful for that use, such as indoor or outdoor use




e) V-Ray Quick Presets

V-Ray Quick Settings Overview

  • Presets:
    • ArchViz Interior – good for visualizing interior spaces
    • Exterior – useful for illuminating outdoor spaces where there may not be many “walls” to bounce light as there is with indoor GI lighting
    • VFX – good for using on visual effects shots
    • Studio – useful preset for lighting products and designs inside a studio environment, much like a photographer’s studio setup
  • Custom presets can also be created based on your own needs
  • Allows selection from a number of GI presets such as:
    • 1.Brute Force + Brute Force (accurate)
    • 2.Brute Force + Light Cache (accurate)
    • 3.Irradiance Map + Light Cache (fast)
    • 4.Irradiance Map + Brute Force (fast)

 f) Caching 

  • Caching lighting information
    • Allows you to store illumination information to be used at a later time into a readable file
    • Saves rendering time as GI does not have to be calculated every frame
  • First you calculate the GI by allowing the renderer to run the GI passes
    • With the proper settings enabled, the GI engines will store their calculations into a file
  • Then you can load the pre-calculated cache files and prevent the renderer from having to re-calculate at every frame



g) Use Camera Path

  • Setting up the Camera path for the Irradiance map and Light Cache
    • Baking a light cache or irradiance map from an animated camera creates illumination information for the entire space through which the camera moves
    • Make sure that Use Camera Path  is checked for the Light Cache and Irradiance Map
    • This generates an Irradiance map/Light Cache along the camera path in your scene, casting more illumination samples throughout the space, giving you a more accurate GI calculation for the entirety of the animation as seen below with camera path on the right




h) Don’t Render Final Image

  • V-Ray does all the necessary pre-calculations but stops before rendering the final image
  • Allows us to set up GI without having to wait for the final image to render



i) Irradiance Map Viewer (Light cache)

  • Light Cache Set as Primary Bounces
  • Allows us to experiment with setting up the Light Cache without having to wait for the Irradiance Map calculation to complete.



  • Irradiance Map Viewer
    • Can be opened form the Light Cache section of the GI tab in the V-Ray render settings
    • This will open the last light cache or irradiance map rendered
    • Will look similar to a colored point cloud image in the viewer



j) Saving a Light cache to a File

  • Rendering a scene with Light Cache enabled will create a light cache that you can view using the Irradiance Map viewer
  • Viewer can be used to find the best settings you need for your GI calculation before you save it to a file for use later
  • Also known as “baking a light cache”




k) Loading a Light cache from File

  • Light Cache loaded from file once it has been saved
    • When Light Cache Mode is set to ‘From File’ the light cache will be loaded from a previously calculated and saved file
    • This file has been generated and saved out in a previous render
    • The same light cache file may be used as many times as needed in subsequent renders
    • The light cache file will likely need to be updated when the lighting in the environment is changed



l) Setting up the render Settings

  • Setting up the Render Settings for Irradiance Map and baking
  • In the GI tab of your render settings change the Primary bounces Engine to Irradiance  map
  • Leave your Secondary bounces Engine to Light Cache with the Mode set to From File and the pre-calculated Light Cache file loaded
  • Open V-Ray Quick Settings once more and set the GI Quality to 100% (Note this will have an affect on the settings for the Irradiance map in the GI tab of the V-Ray render settings





m) Viewing the Irradiance Map

  • Open the Irradiance map settings and click on the Open map with Irradiance Map Viewer button to examine the irradiance map that was generated
  • Note that we have samples for the entire animation path
  • The irradiance map viewer is good for checking as well as merging and saving new irradiance maps, allowing finer control over the irradiance map outside of the 3d package



n) Saving the Irradiance Map

Just like with a Light Cache, you are also able to save the Irradiance map
  • In the Irradiance map settings click the Save button and save the Irradiance map (usually to the Assets or Cache folder for a scene)
  • When you want to render using an irradiance map, switch the Mode parameter to From file and use the Browse button to load the Irradiance map you’ve saved
  • Note that V-Ray doesn’t calculate any pre-passes and starts rendering immediately when you use an irradiance map file, saving time on the render





a) Global Illumination
  • Primary and Secondary Light bounce engines
  • Indirect Illumination baking
b) V-Ray Quick Settings
  • How to quickly set up our scene using V-Ray Quick Settings
c) Irradiance maps
  • How to use the Irradiance Map viewer
  • How to generate Irradiance map and Light Cache maps along the camera path
  • How to save and load Irradiance map and Light cache maps to and from a  file
d) Rendering                                          
  • Rendering the final animation


Time to see it work!

Watch while I demonstrate how to set up the render settings for an animated camera flythrough sequence





Time to do it yourself!

Use the provided scene file to setup the render for the fly through animated sequence




Rendering the Final Animation

  • Open the V-Ray Quick Settings and stg the AA Quality to 12%
  • Open the Render Settings dialogue and in the VRay Common tab in the Image File Output rollout specify a File Name Prefix
  • Disable the Don’t save image (ignored in batch mode) checkbox
  • In the Animation rollout switch the Animation parameter to Standard and set the End Frame parameter to 100
  • If you now hit Render you will render the entire animation