Mental Ray Sun

This tutorial is geared towards showing you how to use the Mental Ray renderer to create really good lighting and skies. First thing we need to do, before we begin, is set Mental Ray as the Rendering engine.

First, open Max then hit F10 to open the Render Scene Dialog. Then scroll to the bottom of the window until you find the Assign Renderer rollout, open it and hit the 3 little black dots button which in turn open the Choose Renderer window, in here chose the Mental Ray Renderer (Fig.01).

Fig. 01

Fig. 01

You can now close the Render Scene Dialog window. Next let's add our Sun; go to the Create Panel, then over to Systems, and in here create a Daylight system in the centre of your world, like so (Fig.02). Note: that the first thing you will create will be the compass and then the light will come out.

Fig. 02

Fig. 02

You'll notice that you can set the sun to be at particular positions based on the time of day. Play around with it. Once you're done, set your time back to the above settings.

Now we're going to change this light to use the power of Mental Ray: with the light selected, go to the Modify tab, change the Sunlight parameter from Standard to mr Sun and then do the same for the Skylight parameter to read mr Sky, as you can see in Fig.03.

Fig. 03

Fig. 03

Once you set the Skylight to mr Sky, you will get an announcement window asking if you want to add the Physical Sky map to the environment, just hit Yes. This is the map that will create our wonderful sky for us, so of course we want to add it!

Before we move on and test out what we have done so far, go ahead and create some objects in your scene so we can see how the lighting affects them. Make sure that you add a Plane for the ground - other than that, add whatever objects you like (Fig.04).

Fig. 04

Fig. 04

Now we have a few more settings to change before we can proceed. If you were to render now this is what you would see (Fig.05).

Fig. 05

Fig. 05

Everything is a little blown out so, we need some changes ... Go up to Rendering > Environment to open the Environment window. In here find the Exposure control rollout and make the following changes (Fig.06).

Fig. 06

Fig. 06

Now I'm going to rotate my perspective view so I can get a shot like this (Fig.07), and then hit Render.

Fig. 07

Fig. 07

Notice Mental Ray added a sky in our background for us. However, I would like to see this sky in our perspective view, let's do that now so you can really get a sense of what we have achieved so far.

Hit Alt +B to open the Viewport Background window. Then make the following changes and hit OK (Fig.08).

Fig. 08

Fig. 08

After a second or so, Max will update the background of the perspective view to show our Mental Ray sky. Now let's see how cool this really is!

Go ahead and make some changes to our sun, like the time at which it is set. Select the sun light, and then make the following change (Fig.09).

Fig. 09

Fig. 09

Notice that the background colour (with the sun now visible) and lighting all updated to reflect the current time of day! Come on, that's cool!

The last thing we will look at before moving on is how to make our render look a little better, because if we render now this is what it will look like (Fig.10).

Not bad, but it's way too dark!

Fig. 10

Fig. 10

Hit F10 again to open the Render Scene dialog. Go to the Indirect Illumination tab and check the Enable Final Gather option. Then before you render, change the preset to Draft; we don't need to render at the high quality setting it is at the moment. By setting it to Draft our render will go a lot faster. Once we are happy with the way it looks we can increase the quality for the final rendering (Fig.11).

Fig. 11

Fig. 11

Now render (Fig.12).

Fig. 12

Fig. 12

Notice we have light bouncing and reflecting off our objects. Plus it is no longer as dark as it was. Final Gather is a great way to begin to achieve realistic renderings very easily.One more tweak: back in our render scene dialog, under the Final Gather rollout, up the Diffuse Bounces to 10 and then render again (Fig.13).

Fig. 13

Fig. 13

What this does is increase how much the light bounces around our scene.  Our current example, being completely exterior at the moment, doesn't really have the capability of seeing a dramatic change with this setting, but if we had an interior scene or even something with some walls we would. See the following examples for a better visual explanation (Fig.14: 0 diffuse bounces, Fig.15: 10 diffuse bounces & Fig.16: 20 diffuse bounces).

Fig. 14

Fig. 14

Fig. 15

Fig. 15

Fig. 16

Fig. 16

Can you tell that there is more light emanating into the shadows when there are some diffuse bounces? This is something to play with on a per scene basis, but my recommendation is that you set it to 10 for most of your work, unless your needs deem otherwise. Alright, so that was pretty easy huh?Let's now take a look at some of the other wonderful thing Mental Ray has to offer you.

Open your Material Editor. In the first blank slot, hit the Standard button so we can change the type of material. Now you see all those yellow dots? Those are material types specific to Mental Ray. I want you to go ahead and double-click on the first one, Arch & Design (mi) (Fig.17).

Fig. 17

Fig. 17

Now that we have changed the type of material, open the Select a Template rollout and look at all the prebuilt materials you have to pick from! In Fig.18 you'll see that I applied a basic template to each of my objects.  No changes were made to the materials themselves; they are completely set to their default settings.

Fig. 18

Fig. 18

Should give you something to play with!

The last thing I want to show up here in this introduction to Mental Ray is something you might need to do to make your renderings a little cleaner. What I mean by this is if you look at the above render, you will notice the pixels running along the top edge of the wall. See how jagged that looks?

Let's fix it! Open the Render Scene Dialog and go to the Renderer tab. In here make the following changes (Fig.19).

Fig. 19

Fig. 19

Now we're telling Mental Ray to increase the amount of pixels used to generate each image. Here's the result (Fig.20).
A lot cleaner!

Fig. 20

Fig. 20

Note: Remember our Draft setting within Final Gather? Here is what this render looks like with it set to
Medium (Fig.21).

Fig. 21

Fig. 21

Note: The biggest difference is the render times, so be careful with this if you are rendering animations!
Do you notice the difference? Me neither, but the render time went from 1 minute to 4!

What's the point? Well, unless you're doing high end architectural renderings, leave your Final Gather set to Draft.

Okay, so you now hopefully know how to set Mental Ray as your renderer as well as how to set up your lighting.  You also should have a good frame of reference to begin playing around with your Mental Ray materials.

Fetching comments...

Post a comment