Pages

Friday 26 March 2010

Little tip for fog lights in MentalRay

The procedure of creating fog lights in Mental Ray:
  1. create your light (point or spot light, even though it works with volume lights as well, but I never tried it, not a big fan of volume lights!)
  2. create the fog light (under Light Effects)
  3. scale the cone (spot light) or the radius (point light) of the light to the desired length of the light rays. -Don't worry about intensity and colour for now-
  4. create a Mental Ray light shader. Go down in the attribute editor of the light to mental ray, open the attributes in the folder, go further down to custom shader and click on the checker board next to Light Shader, choose either mib_light_spot (spot lights) or mib_light_point (point light) to create a Mental Ray light shader.
  5. in the attribute editor go the sphereShape node (point light) or the coneShape node (spot light) and check the box Volume Sample Override in the Render Stats section. Give Volume Samples a higher number, but beware that it increases render time so leave it low for playing with the settings and crank it up for the final render. 50 is good for the start.
  6. now play around with the settings in Mental Ray Light Shader and the Fog Light. Don't worry about any settings on the original light (like intensity and colour) cause the Mental Ray Light Shader completly overrides all those attributes!

Another little tip to speed up the process of linking lights to objects:

  1. select the light
  2. change the menu set to rendering
  3. go Lighting/Shading> Select objects illuminated by light. That selects all the objects in the scene, as the light so far lights all the objects. It deselects the light though.
  4. shift select the light again
  5. go Lighting/Shading> Break light links. Now the light doesn't light any objects
  6. select the light again and shift select the objects you want it to illuminate.
  7. go Lighting/Shading> Make light links. And that's it. The light will now only illuminate those objects
If you make those commands into custom shelve buttons you can create complex object based lighting sets within minutes without going through the tedious process of light linking in the Light Linking Relationship Editor.


1 comment:

Palm COurt said...

I was also searching fog light from long time.You have solved my problem.Thanks for sharing this great stuff with us.