Week 6: Indirect Lighting, Photons and Render Layers

Overview of Light Components



Lighting Terms

  • diffuse
  • specular
  • reflection
  • refraction
  • normal
  • direct illumination
  • indirect illumination
  • ambient occlusion
  • photons
  • Cornell Box
  • global illumination
  • normals





Direct Illumination
    Any object that does not emit its own light must reflect light in order to be seen.
    Direct Illumination is light emitting from an active source, such as a point light (bulb) or directional light (sun)
    As light hits an object, the surface of the illuminated object becomes a light-emitting source. This reflected (“bounced”) light is often called indirect illumination.
    An object’s surface reflection is often categorized as being either predominantly specular or diffuse.


    Specular reflection is light that strikes the surface of an object and immediately bounces off at a measured angle (the angle of incident light equals the angle of reflected light). Mirrors, glass, chrome and still water are examples of highly specular reflecting surfaces.
    Diffuse reflection differs in that the light strikes the surface of an object and interacts, is partially absorbed by, and reflects off of the surface. The bounced rays are not evenly measured but scattered across the surface of the object. Unvarnished wood, foam, cardboard, rubber are examples of diffuse reflecting surfaces.
    Glossy or mixed reflections split the difference between specular and diffuse.


Indirect Illumination
    In Maya and mental ray, when light rays, or rather, particles of light known as photons strike a surface and bounce off, they take with them some of the color energy of the first surface and apply it toward the illumination of the second. This process continues, transferring energy from the second struck surface to the third, and so forth, until the energy of the photon is exhausted.
    Photons are considered in the mental ray render only when a light is set to emit photons, and the Maya Render Settings are set to Global Illumination.



Photon and Global Illumination Settings in mental ray

Spot, Point, Directional and Area Light Settings

Settings are relative and dependent on the size of the scene

Photon Intensity
The total amount of energy distributed by the light source. Each photon carries a fraction of the light source energy.

This is similar to decay—the intensity increases as the value decreases. The default (2) simulates natural (quadratic) decay, but violates the conservation-of-energy law (that happens in the natural world), so bright spots from distant light sources could occur in unexpected locations.

To increase the chances that indirect light will reach a greater distance, decrease the value.

Visible noise can occur with values less than 1.

Global Illum Photons
The amount of photons being generated by the photon casting light


Render Settings for Global Illumination

Change the number of photons used to compute (i.e.: blend neighboring) the local intensity of global illumination. The default number is 64; larger numbers make the global illumination smoother but increase render time.

Use this setting to control the influence of indirect illumination effects for global illumination. You can select a color with the Color Chooser or use the slider to set the Scale value. Scale is off by default.

Controls the maximum distance at which mental ray for Maya considers photons for global illumination. When left at 0 (the default), mental ray for Maya calculates an appropriate amount of radius, based on the bounding box size of the scene. If the result is too noisy, increasing this value (to 1 to start, then by small increments up to 2) decreases noise but gives a more blurry result. To reduce the blur, you must increase the number of global illumination photons (Global illumination Accuracy) emitted by the light source. Bigger values make for a softer, less detailed solution, while smaller values key in on smaller changes in lighting details

Merge Distance

The photons within the specified world-space distance are merged. For scenes with uneven photon distribution, this attribute can greatly reduce the size of your photon map.



Render Layers and Render Layer Overrides





Small Cornell Box MEL

polyCube -w 24 -h 24 -d 24 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;
// Result: pCube1 polyCube1 //
select -cl ;
select -r pCube1 ;
select -tgl pCube1.f[1] ;
hilite pCube1.f[1] ;
selectMode -component ;
select -r pCube1.f[1] ;
polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 12 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0 -thickness 0 -smoothingAngle 30 pCube1.f[1];
// Result: polyExtrudeFace1 //
scale -r -p 0cm 12cm 0cm 0.182875 0.182875 0.182875 ;
select -r pCube1.f[0] ;
move -r 0 0 47.621414 ;
select -d pCube1.f[0] ;
hilite -u pCube1 ;
select -r pCube1 ;
select -add pCube1.f[0] ;
hilite pCube1 ;
select -r pCube1.f[1] ;
hilite -u pCube1 ;
select -r pCube1 ;
setAttr "pCube1.translateY" 12;
polyNormal -normalMode 0 -userNormalMode 1 -ch 1 pCube1;
select -cl ;
camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 1 -horizontalFilmAperture 1.4173 -horizontalFilmOffset 0 -verticalFilmAperture 0.9449 -verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.1 -farClipPlane 10000 -orthographic 0 -orthographicWidth 30 -panZoomEnabled 0 -horizontalPan 0 -verticalPan 0 -zoom 1; objectMoveCommand; cameraMakeNode 1 "";
// Result: camera1 //
setAttr "camera1.translateY" 10;
setAttr "camera1.translateZ" 52;
lookThroughModelPanelClipped camera1 modelPanel4 0.001 1000;
rename "camera1" "renderCam";
// Result: renderCam //
setAttr -lock true "renderCam.tx";
setAttr -lock true "renderCam.ty";
setAttr -lock true "";
setAttr -lock true "renderCam.rx";
setAttr -lock true "renderCam.ry";
setAttr -lock true "renderCam.rz";
setAttr -lock true "";
setAttr -lock true "";
setAttr -lock true "";
setAttr -lock true "renderCam.v";
setAttr -lock true "renderCamShape.hfa";
setAttr -lock true "renderCamShape.vfa";
setAttr -lock true "renderCamShape.fl";
setAttr -lock true "renderCamShape.lsr";
setAttr -lock true "renderCamShape.fs";
setAttr -lock true "renderCamShape.fd";
setAttr -lock true "";
setAttr -lock true "renderCamShape.coi";
setAttr -lock true "renderCamShape.lls";
select -cl ;
selectMode -object ;

Previous Post

PROJECT01, Part 2

... Read more

Next Post

Week 7: Final Gather

... Read more

ART298Comments Off on Week 6: Indirect Lighting, Photons and Render Layers