Category Archives: Rendering

Using the mia_photometric_light

 

Left Normal Spotlight, Right IES Light

Left Normal Spotlight, Right IES Light

 

The Illumination Engineering Society (or short IES) standard format file stores information about the distribution of light from a particular source.  The distribution of light is dependent on the various reflective materials used in the light bulb.

To enhance the realism in mental ray renders the mia_photometric_light node can process IES files.

How to obtain IES Files?

There are several sampling methods available to sample existing light bulbs. However most light bulb manufactures offer free downloads of IES Profiles.

Phillips Light bulbs:

http://www.usa.lighting.philips.com/connect/tools_literature/photometric_data_1_a.wpd

Or for full overkill a couple of IES files collections:

http://www.c4dcafe.com/ipb/files/file/804-whthawks-ies-light-collection/

http://mayazest.blogspot.de/2012/02/free-light-ies-files.html

Tools to Preview and Modifiy IES Files

IES Creator by Rip 3D: http://www.rip3d.net/web/en.html#/free/downloads

A great tutorial on the subject of creating, manipulating IES-files can be found here:

http://jamiecardoso-mentalray.blogspot.de/2012/12/creating-customised-ies-web-lights-for.html

Maya Setup

Install Maya 2013 SP2 several bugs were fixed concerning the mia_photometric_light node. Download it from here: http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=20537489&linkID=9242259

The mia_photometric_light attribute editor is slightly confusing. A more easier interface provides this template:

http://www.creativecrash.com/maya/downloads/scripts-plugins/interface-display/c/mia_photometric_light-ae-template

Download and copy the file to ..\Documents\maya\2013\scripts

How to use IES Files?

  1. Create a spotlight and position it. (Never scale the light, it creates odd errors)
  2. In the mental ray section create a new Light Shader > mia_photographic_light
  3. Define your IES Profile (If no profile is defined the node acts as a pointlight)
  4. The easiest way to set the Intensity mode is to use the Light Profile itself.
IESLightingImage

Applied IES-light

Note: Depending on the scale of your scene you have to  set “Maya Units to meter Scale” (when using cm as unit set it to 100)

Maya: Infinite white background lighting

The infinite white background look is a very popular look for technical stuff that is suppose to look very clean. You can check it out here how to set up lamps for photography: http://vimeo.com/23653086. In Maya with mental ray you can easily create the effect using Final Gather or an ambient occlusion as light source.

Example Scene

I am using  3 spheres with mia_material_x materials (Default with diffuse color = blue, Chrome Preset, Glass Physical Preset).

Applying material preset

In addition a large poly-plane serves as floor and has a lambert with color = 1,1,1 (white),  Diffuse = 1.0 applied to it.

bg_material settings

Final Gathering

  1. Create a Camera (rename it to “Render_Cam”)
  2. In the Attribute Editor change the Environment > Background Color to white

    Camera Background Color

  3. In the RenderSettings in the Common Tab under Common Options deactivate Default Light

    Disable Default Light

  4. Activate Final Gathering in the Indirect Lighting Tab
  5. In addition to the common quality settings the render quality is determined by the Final Gather Settings increasing Accuracy generally makes better renders.

    Final Gather render, Rendertime 0:05

Note: If you want to render with other cameras you have to set up the environment color again. Alternatively you could use something like a large white sphere around the scene
Also notice that no specular highlights are created by this render, additional poly planes with a lambert wiht incandecence set to white can help to set highlights.

Ambient occlusion light source

  1. Create an Area Light
  2. In the Attribute Editor under mental ray > Area light, activate Use Light Shape, change Type to Custom. under mental ray > Custom Shaders connect a mib_amb_occlusion Node

    Area Light Settings

  3. In addition to the common quality settings the render quality is determined by the Ambient occlusion settings increasing Sample Quality and Adjusting the Max. Distance generally makes higher quality renders.

    Final Render Ambient occlusion Light, Rendertime 0:08

    Notes: Notice that the glass ball has a unnatural shadow. This may look okay depending on the effect you are going for, but generally you would want to exclude glass objects from the Ambient Occlusion calculation using the MI label attribute.

    The Specular Highlights also seem very strong and fake. To reduce this effect in the mia_material_x properties under Advanced you can set the Specular balance to 0 to remove any physically inaccurate specular highlights.

ao_exclude

Snippets: Ambient Occlusion exclude Objects

While using mia_amb_occlusion strange effects can happen when rendering transparent objects. (left glass with AO, right glass eliminated from AO)

To eliminate this effect from an object an extra attribute named  “MI Label “. This short snippet adds the attribute to the selected objects and sets it to the value of 5.

import pymel.core as pm

selection = pm.ls( selection=True )
for item in selection :
   pm.addAttr(item, ln="miLabel", at="short", dv=5)

In the mia_amb_occlusion node the attribute  “Id Inclexcl” must be set to -5 (or negatate the value you set for the MI Label).

physical Light

Using Mental Ray physical_light

A quick way to create a realistic Light and Shadows is to use the physical_light Node. In this example I used the teapot with a transparent mia_material_x and inserted in the middle a pointlight connected to a physical light.

Set Up

  1. Initially you have to choose a Maya default light and position it correctly. The physical_light shader however will override all settings of the light.
  2. In the Attribute Editor | mental ray| Custom Shader assign to the Attribute “Light Shader” a “physical Light” node
  3. The Intensity of the light is controlled by the color. In HSV Mode you can see that the Default Value of the Light is 1000 
  4. (Optional) You can connect to the color attribute a mib_blackbody or mib_cie_d  to easier control the Light Intensity and Color

Conclusion

Pro: It is very fast to set up.

Con: The Shadows have no seperate controls and cannot be modified.

Create neon glow effect

There are many ways how to create a glow effect in maya. I will show the three main techniques as well as the pros and cons of the technique.

Maya Software

Set up

  1. Create the geometry for the Effect
  2. Select the geometry and apply a new Lambert Material
  3. Change the color to white, the incandescence to a bright blue and under Special Effects set a glow intensity of 0.9 

Conclusion

Pros: Easy to set up, renders also in mental ray.

Cons: It is a effect that is applied during post-processing and also could be applied in Photoshop. Changes of the Camera result in very different glow values and sometimes must be adjusted accordingly.

Paint Effects

Set up

  1. Create new curves (Create > EP-Curve or Create > CV-Curve) for the geometry. (If you have nurbs geometry you also can select a Isoparm. If you have poly Geometry select a Edge and Modify > Convert >Polygon Edges to Curve)
  2. Open the Visor (Window > General > Visor)
  3. Select the curve and Shift-Select under Paint Effects > glows > neonBlue
  4. In the Menu-Set Rendering select Paint effects > Curve Utilities
  5. Select a brushstroke in the Attribute Editor and adjust the Brush Width and Stamp Density to get a better result
  6. To control the color of the neon Effect open the Shading Section in the attribute Editor and change the Incandescence color

Conclusion

Pros: Easy to set up and modify different attributes.

Cons: Does not render directly in mental ray. You first have to convert it from Painteffects to Poly Geometry etc.

Mental ray

Set up

  1. Create the geometry for the Effect
  2. Create a background for the Object (without background the effect will not be seen)
  3. Apply a mia_material_x to the geometry
  4. In the Attribute Editor scroll down to Advanced and connect a mia_light_surface to the Additional Color Attribute

  5. Set the Values color = bright blue, Intensity = 2, Fg Contrib = 5, Refl Contrib = 5 (Note: the Intensity acts as a multiplier of the Contrib Values, Refl Contrib Value only has to be set if it should be visible in Reflections)
  6. Activate  Final Gathering in the RenderSettings. (Without Final gather you cannot see any effect)
  7. Adjusting the Accuracy and Point Density creates better results

Conclusion

Pros: Creates a very realistic result. You can switch between the mia_material_x and glow effect by setting the IntensityValue to 0 which can be useful in Animations.

Cons: Rather difficult setup, and requires background geometry as well as High Quality Final Gathering.