Kelvin FG Phys Sun IBL HDRI

Maya, Mental Ray: Lighting

KELVIN COLOR, FG, IBL, PHYSICAL SUN & SKY

In this section we’ll delve more into indirect lighting techniques. We’ll look more closely at fundamental Final Gather settings, Physical Sun and Sky and learn how to light with image based lights (IBLs).

Future sections will be on setting up shaders and later we’ll have to learn about optimising Final Gather for rendering animations. But for now we’re really starting to get into the meat of lighting.

 

LIGHT COLOR IN DEGREES KELVIN

To set up a light colour in degrees kelvin
1. Select the light
2. Map it’s colour to a
– Mental Ray > Mental Ray Lights > Blackbody

The intensity is a multiplier of the regular light intensity leave at 1.

Then to set the colour see degrees kelvin times of days and colour chart below.

 

PHYSICAL SUN AND SKY

Physical Sun and Sky gives us an indirect lighting solution for atmosphere and a default outdoor lighting setup. The look is quick and easy to use but a little generic. It’s very straight forward to setup.

*Please remember to gamma the mia_exposure_simple1 (connected to the camera) back to 1.0 as we will always be using linear workflow.

Here’s a neat little video tweaking the Physical Sun and Sky a little in MR Maya.
http://www.vimeo.com/48944888<title>none</title>

To get more realistic settings it’s often great to use IBLs (Image Based Lighting) or sometimes referred to HDRI or High Dynamic Range Images to light our scenes.

 

LIGHTING WITH IMAGE BASED LIGHTING

Image based lighting uses high dynamic range photos taken from real life to light our models/scenes. This is perfect for compositing with live action footage, but it’s also used a lot in outdoor cg lighting as the lighting setup is more varied than straight Physical Sun and Sky.

It’s very easy to light with IBLs.

 
Download IBLs
The best website to download IBLs from is HDRI Labs, openfootage.net is also good.

http://www.hdrlabs.com/sibl/archive.html
http://www.openfootage.net/
http://noemotionhdrs.net/

Easy Maya Style Workflow

1. Shoot your own or download a IBL/HDRI image
2. Create a Image Based Lighting Setup by clicking Create (Image Based Lighting) in the render settings under the Indirect Lighting Tab.
3. Map the IBL’s high resolution HDR image into the mentalrayIblShape1 node that gets created.
4. Rotate/scale the mentalrayIbl1 (found in the outliner) to setup the scene.
5. Create a direct light in your scene (usually the sun/directional light) orient it the same way as your light sources in the IBL. We usually mix direct lighting (point/spot/directional/area) with the indirect lighting of an IBL.
6. To stop the IBL from displaying in the background, under it’s render stats check off “Primary Visibility”

Problems with Easy Workflow IBLs
IBLs used with the easy setup are actually flipped backwards. This is not a problem in most simple situations. Easiest to flip the image in Nuke to fix this problem.

Noise from Easy Workflow IBLs
In animation the IBLs cause flicker because the hires IBL is high contrast and this can cause flicker problems. The solution is to light with a blurred lower resolution image but we light the reflections with the hires.

Images downloaded from HDRI Labs usually come with a blurred version. To blur IBLs ourselves we have to use convolution blur to avoid seams.

Optimised IBL Workflow in Maya – faster/better/good for animation
To create a better quality workflow for animation we blur the lighting image but keep the reflection image the hires high contrast image. There’s 3 potential images we use, we call this splitting the light…

– Light with the blurred lo res HDR image
– Reflections use the hires HDR image.
– Background with the extremely high JPG image

1. We need to access mip (Mental Image Production Shaders)

type the following in the command line and restart Maya

optionVar -intValue “MIP_SHD_EXPOSE” 1;

2. Create a simple ray switch (to switch between the images)
Mental Ray > Materials > mip_rayswitch

3. Create a 3 lookup spheres, one will be for each image (high contrast, blurred, extreme high jpg).
Mental Ray > Legacy > mib_lookup_spherical

4. Hook up the blurred HDR to one mib_lookup_spherical, the high contrast to the other, and extreme high jpg to the last

5. Change the 2 HDR image textures switch’s Color Profile to “Linear”

6. link both the mib_lookup_spherical to the rayswitch
blurred = final gather slot
high contrast = reflection slot
extreme high res jpg = environment slot

Rotate them to match Ibl settings
mib_lookup_spherical > Rotation

7. Plug the rayswitch into the render camera
cameraShape > mental ray tab > Environment Shader

8. Make sure no mentalrayIbl’s in the scene, delete them this method replaces them.

Render the scene.

*A much easier way to do this is to use the sIBL plugin (see next section)

Optimised sIBL Workflow with free plugin – faster and better and easier
A great fast way of spliting the light is with the plugin sIBL which also does a number of other handy things. Download and install at home

Instructions
http://www.hdrlabs.com/sibl/

Free Software Download
http://www.hdrlabs.com/sibl/framework.html

Creating Your Own IBLs
Creating your own IBLs requires a fair bit of equipment and setup, a good tripod, a good camera and wide angle lens.

A good tutorial for this is on Digital Tutors (paid subscription) here.
http://www.digitaltutors.com/tutorial/599-Using-HDR-Images-for-3D-Lighting-in-Maya#play-12528

 

FINAL GATHER FUNDAMENTAL SETTINGS

It’s important to understand how Final Gather Works and the settings related to Final gather. Here we’ll cover how FG works and go over some of the basic settings.

Three Main Settings
FG primarily relies on 3 main settings, the final gather points in the scene, the number of rays shot from each point and

– Number of Rays shot out from each point
Final Gathering > Accuracy
Default is 100

– Number of FG Points
Final Gathering > Point Density
1 – 2 is roughly good for final quality, .1 is roughly good for previewing. Default is 1

– Blur Between Points
Final Gathering > Point Interpolation
Default is 10

Controlling The Light Bounce
We usually want to leave the light bounce colors to the defaults, this matches real world lighting and is dependant on scene scale. Be sure to scale your scenes to correct real world sizes. Maya’s units are in cms by default.

To raise or lower the light bounce we can make Diffuse Scale Colours brighter or dimmer.

Remember that colours can go above one in value
Final Gathering > Primary Diffuse Scale (bounce light off first object)
Final Gathering > Secondary Diffuse Scale (bounce light of secondary bounces)
Secondary Diffuse Bounces (up for secondary bounces)

Cap bright and dark spots
Final Gather Quality > Filter to 2 will cap bright and dark spots in your scene.

Final Gathering Map
In animation FG Flicker is a big problem. To get around this we can bake final gather maps for scenes where the lighting isn’t changing and the objects are static. We’ll cover this section later.

Other Settings
This website has an overview of all the FG settings
http://www.joelstutz.com/Final%20Gather.html

Instructor

Andrew Silke

Leave a reply