Maya Mental Ray

Let's begin this simple tutorial I've written not so long time ago about Outdoor Illumination in mental Ray.What you see below is the final render of what we need to achieve with this tutorial.

 

Step 1 - a simple scene

Modelling the pottery of the scene

Modelling the pottery of the scene

It is very important to have some simple stuff on the scene so you can look on how Global Illumination and Fg work on your surfaces and their shaders. For this little tutorial I created some potteries, which are very easy to make but also smooth enough to let you all see how the lights and shadows work. I assume you to have some modelling skills so I won't get into pottery explanation (just create simple Nurbs Geometry with the Revolving Tool...then convert it to poly and tweak it a little bit more....but as long as we are talking about Illumination we shouldn't really care about how objects look like...)
You need to arrange the pottery with 3 nurbs planes like in the picture. that's Easy!Isn't it?

some sample of the pottery

some sample of the pottery

arrange the scene in this way

arrange the scene in this way

Step 2 - The lights approach

One of the most popular way to illuminate 3d models is the three-point-lighting method, which gives your scene a fully thridimensional form. The three point lighting method is a very known scheme also in Hollywood movies. In this tutorial I'd like to explain you how to achieve the same kind of effect with Golbal illumination and Final gather point in mental ray. The three-point-lighting is basically a way to 'reveal' your models...not only to lit them brightly;But as long as we are talking about Gi and Fg we don't need to care about having three lights. We can work just with one,(in this tutorial two are better). Global Illumination and Final Gather point are some very usefull and powerful features of mental ray,they can provide very realistic rendering based on specific phisical photon emissions. In Maya only spotlights and points light can emit photons...so in this tut we will work with them,discovering some useful things about how to save photons maps so that our rendering time will be shorter.

Step 3 - Before arranging the lights

We need to switch from Maya Default Rendering system to Mental Ray system. Set Gi and Fg (follow the pictures). I decided to put the Fg numbers of rays to 100 (1000 is too much so the render time would be expansive).
As you noticed I left empty the Min and Max Radius fields...it's because MR can automatically calculate these
values indipendently.
As regarding Global Illumination I left all the parameters the way they were.

choosing the renderer

choosing the renderer

Global Illumination settings

Global Illumination settings

Final Gather Settings

Final Gather Settings

Step 4

As I said before we want an outdoor looking scene,so once we have arranged the potteries we can now put two spotlights on the scene (as shown in the picture). For this scene I thought that I wanted a mediterranean atmosphere so the two spotlights are of the same chromatic scale (yellow and orange). Set up the lights as shown in the pictures below.

We need each of both spotlights to emitt photons, remember no photons no Gi nor FG!!I just increase a little bit the number of photons emitted by each spotlight (this will provide a brighter result).
As regarding the shadows we're gonna work with Depth map, no raytrace shadows should be use in this render. You need to set the parameters as in the picture: first select The Depth Map Shadows Attribute tab and type 1024 in the Dmap resolution field and then you can leave the Dmap filter size to 0 or to 1; after you did this you should now open up the MR tab (always on the spotlight attribute editor) and check the option 'Shadow Map' and then
Hit the button underneath it: Take settings from maya.
Now for the Yellow Light set samples to 10 (this is a little value which provide sharper shadows) for the reddish light put 30 into the samples field.

That's it!

orange spotlight settings + shadows settings

orange spotlight settings + shadows settings

yellow spotlight settings + shadows settings

yellow spotlight settings + shadows settings

and here you can see the way to switch from maya shadows settings to Mental Ray ones:

Step 5 - Final Gather Miracle :) - The Trick for the realistic blue-ish light

If you render at this stage you won't probably see a very remarkable result...I mean...not an outdoor illumination! As you probably noticed when you got something illuminated by the sky ,'portions' of the sky colours are absorbed and reflected by the surfaces of your objects...this means that your objects are lit by the skylight and we wanna achieve this goal with a simple trick and Final Gather Point method. By taking samples of the environment Fg can illuminate the scene,that's why
we need to create a sorta envoirament which will give us the typical bluish light effect of an outdoor illumination. A big Sphere sorrounding our pottery with a lambert shader could be the solution. As you see I put a detached part of a
sphere....a kinda dome. I gave a lambert shader to the 'dome' with these settings:

Color: set to black
Diffuse: Set to black
Incandescence: Select a bluish color (important not too bright)
See the picture for references.

The incandescence color will provide a big amount of light spread all over the scene. So remember when you wanna lit something with Fg you need to assign a shader with a bright color in the incandescence field.

X-ray shaded perspective.
You can clearly see the 'dome' which is a a part of a sphere.

 

Step 6 - FINAL STAGE...IT'S RENDERING TIME!

...here we are guys. If you render at this stage you'll see that we achieved our goal! But...wait a minute we still need to take care of rendering time and the rendering quality!!! Let's do this.
Rendering time is always something to take into consideration, Gi and FG are expansive to calculate and making different attempts with these options turn on can be quite frustrating...one way to 'reduce' rendering time is by saving the 'Photon Map file' of Gi and The 'Final gather file' for Fg...You just need to type a name (which would be the name of the file) into the specific field as shown in the picture below (in the rendering global settings of MR)...you need to leave checked the
options underneath each name field (Photon Map Rebuild and Final gather Rebuild)....do a render to save these maps and the you can deselect that options aforementioned. See the pictures as reference....How to verify if the render now it's a little bit faster?...it's easy ...you need to go in the rendering global settings and open the TRANSLATION tab and select from the EXPORT VERBOSITY index Detailed messages (see pictures below as reference)...if you open up the output window at the
end of a render you will notice (after a long list of stuff) the 'wallclock' which tells you the time for rendering...(see
the picture below)....If you try to render rebuilding everytime Photon Map and Final Gather your render time would
take more time than having these maps files saved(see the picture). Saving Photon Map and Final Gather is very
useful when you achieved your illumination goal or when you need to re-render an old saved scene...

Rendering quality: We need to increase Gi accuracy and Fg number of rays before doing the final render. Just look at the pictures below.

 

wallclock time before saving the maps

wallclock time before saving the maps

and wallclock time after saving gi and fg maps

and wallclock time after saving gi and fg maps

final rendering settings...

final rendering settings...

...So guys... that's it!I hope it makes any sense to you. I wish I could teach you something with this little tutorial.

Sorry for my unacceptable english (if you wish you can correct me everytime you'd like to)...

Tutorial written by: MASCIOTTI MATTEO aka 'profane'

 

Fetching comments...

Post a comment