Image-Based Lighting (IBL) is a CG rendering technique used in many workflows which involves using an omni-directional representation of light information encoded as an image. Typically, the image is captured and processed as a high dynamic range image (HDRI) for greater realism. This image is then projected onto a dome or sphere analogously to environment mapping. Path tracing is then used to resolve all the visibility and light paths that illuminate the objects in the 3D scene from the HDRI. Accounting for both the materials' scattering response (BSDF) and the lighting information encoded into the image, multiple importance sampling (MIS) is used to resolve both indirect diffuse and indirect specular effects.
IBL is the de-facto standard lighting technique in global illumination and physically-based renderers. It provides fast, easy to setup, highly detailed lighting, shadowing, reflections and refractions. It is good for both exteriors and interiors lighting (often in combination with area lights and portals). IBL can be also used as a complement to the more standard techniques that try to model illumination using classic CG lights, blockers and bouncers.
For a proper IBL workflow, three aspects are key to achieve eye-pleasing imagery: - Establishing an appropriate, color managed, linear workflow.
- Understanding the value range in the HDRI used as the source for IBL.
- Using physically/visually plausible, energy-conserving, materials.
|
Unlike other renderers (that generally fail at sampling environments efficiently), 3Delight provides a proprietary, state of the art, environment sampling algorithm which does not require users to rely on caveats like:
- using multiple versions of the HDRI for different ray types;
- downsizing the HDRI;
- blurring the HDRI;
- manually controlling the multiple importance sampling of the HDRI, e.g. by setting a "sampling resolution" number.
In 3Delight, instead, you should follow these two basic rules:
- Use a large pixel resolution for your HDRI: ideally, twice the size your render output resolution (e.g. if you are rendering a full HD frame @ 1920x1080, then your ideal HDRI resolution is 3840x2160).
- No need to pre-blur your HDRI: 3Delight can efficiently use the same image for both diffuse and specular lighting. Pre-blurring environment maps can get rid of important lighting cues in the scene.
How does IBL contributes to the final image?
- illumination
- shadowing
- reflections/refractions
- background
- atmospherics (TBD)
How HDRI alterations contributes to illumination changes?
- Painting areas
- Changing intensities
- Color correcting
- Blurring/Sharpening
What image should I use as input for IBL?
- An image captured on set by taking multiple photographic exposures and post-processed them into a single image.
- A procedural sky texture (the Hosek & Wiklie model, used in the 3Delight Sky, provides superior quality than the Preetham model).
- A manually crafted image, wether hand painted in an application that supports floating point data (e.g. Nuke) or created with ad-hoc authoring tools (such as "HDR Light Studio").
- A pre-rendered HDR image in lat-long format: you can use the "spherical camera projection" to render a HDR rendering of your 3D set and then re-use it as environment in situation where the full 3D set is not required.
What mapping should I use?
- latitude/longitude
- spherical image
Step-by-step guide for image-based lighting
First you should turn on "color management" in the common section of the Maya Render Globals:
Then, setting up IBL in 3Delight can accomplished in three simple steps:
- Create an Environment node and map a HDRI image. You can choose to use:
- via a Maya File node. In such case, make sure to carefully understand input file textures Color Management first (most likely you will need to set the color profile for your Maya File node holding the HDRI image as "linear"):
- or, if you want to use a procedural physical sky model, use the 3Delight Sky node (which is always linear).
or any other 2D texture/procedural node such as ramp etc.
If you are using the 3Delight OSL renderer you can optionally use a solid color (therefore having no 2dtexture connected) |
Enable Indirect Illumination and choose an appropriate number of indirect bounces (the default value of 2 is a good start for exteriors)
3Delight features highly optimized multi-bounce path tracing global illumination with tiny performance impact on larger number of indirect illumination bounces. Values up to 16 bounces are possible and can be beneficial in complex interior setups (see relative section below). |
- Render in i-Display (make sure to use the right image viewer color profile in i-Display, most likely you will need "Linear to sRGB").
Now you can render:
Here are more detailed steps that take into account the pre-requisites:
If you do not enable indirect illumination, the environment will be visible in reflections and refractions (because they are active by default in the Render Settings) but it will not illuminate your scene (no "environment diffuse") and you will not obtain surface-to-surface light and color transport (no "indirect diffuse"). |
- Setup more render layers and render in i-Display, where all additional AOVs are filled accordingly:
- If you inspect the other channels, now your main buffer also feature the "indirect diffuse" and "environment diffuse" image layers along with their sub-components:
- As an option, you can put the environment image in the background: this is for previews only, ideally the environment should be composited in the compositing application of your choice.
Here are additional rendering examples done following this basic tutorial using different HDRI imagery:
Here are key aspects of the IBL workflow in 3Delight:
→ The illumination and shadowing reacts from the details in the HDRI. → The illumination is not noisy. → There is no need to set any "sampling resolution" parameter on the IBL. → There is no need to pre-blur the HDRI: you can get sharp reflections and soft shadows with one single image. → There is no need to downsize your HDRI. → There is no need to use multiple version of the HDRI and associate them to different ray types (commonly known as "ray switching") → Many image layers (AOVs) are at your disposal in a single rendering operation, at no additional cost in rendering time. → You can have multiple delightEnvironment nodes in your scene, each with different textures connected, and you can choose the appropriate ones for the shot you are working on. |
Notes for Interiors Lighting (To Be Completed)
For interior rendering there are two cases:
- Fully enclosed interiors, without any openings towards the exterior allowing external light to come in.
- Interiors with openings towards the exterior (e.g. a room with windows, doors, or other type of openings).
Fully enclosed interiors
- Create (geo) Area Lights, matching size and position, for each important light sources that illuminates the scene (typically large area lights, neons etc.)
- Make sure all Lights have inverse square falloff (required by physics for plausible lighting)
- Assign to less important emissive objects a material with incandescence (make sure to not push the color values above 1 because of color management, instead use the incandescence intensity).
- Turn on Indirect Illumination
- Set Indirect Illumination Diffuse Bounces to 3 or more (increase by 1 unit as the effect might become neglectable after many bounces, looking at statistics will help).
Or:
- It is also possible to create an HDRI environment with a texture that loosely matching the interior you are rendering. If you have a texture acquired on set for VFX this is the best case scenario. If the set is full 3D you can render a spherical projection version of your environment.
- Set the Indirect Illumination> Max Distance to force environment rays to be called inside the interior: e.g if your room would fit in a sphere of radius 50 units, set the max distance to 25 (or less) units.
Note that 3Delight has no problem using a higher number of diffuse bounces. It not unlikely for fully enclosed interiors to require higher numbers of diffuse bounces (check statistics for precise feedback) |
Interiors with openings
- Setup the HDRI environment with a texture representing the exterior lighting
- Set indirect diffuse bounces to 3 or more (check statistics for feedback)
- Positioning Area Lights behind openings (typically doors / windows) towards the exterior will help "pushing light" inside the room