Lighting with Mental Ray

This tutorial was created by the Florence Design Academy.

On the F.D.A. gallery (www.florencedesignacademy.com/gallery_eng.html) you can see a few examples of designs of our students who have used this technique.

Since our students need a effective way to display their concepts and ideas, our teachers have developed many tutorials in order to give them an additional tool that every designer should have. This tutorial explains all steps to illuminate an object with a technique which simulates the illumination techniques of a photo studio. Before we begin it is very important to inform you that we will use "Mental Ray" as render engine (version 8 and 9 of 3D Studio Max).
Mental Ray is a very stable render engine and it allows you to have very realistic renderings. Since we are using Mental Ray for this tutorial it is very important to use "real dimensions" for all the objects that we have to create. Otherwise the result will not be realistic. It means that you have to go to CUSTOMIZE -> UNITS SETUP and choose the units that you want to use. In any case you should get used to create objects with their real dimensions so that you get a feeling for correct dimensions and proportions.

The first step to do is to create an "environment object" (it is similar to the rooms which are used in the professional field of photography) on which later we will place our object to illuminate (this is ideal for product/industrial design and furniture design).

There are different shapes that you can create to have an environment-object which will be reflected correctly on your object and will give very good render results (image 0). What many designers don't know is exactly this last point: in order to have a good rendering, the object has not only to receive a good lightning, but it needs to receive a good reflection of the room in which it is placed.

Fig.

Fig.



The color that you should assign to the environment-object (the room) should be white like the walls of a photo-studio! The material should not have specular highlights. In this way the color of the environment will not affect the color of your product design (especially if you use reflective materials). Of course it is the designer's choice to change the color to a different one.

Let's do the first steps for an environment-object. Create a spline like the letter "L". Then select the corner vertex and go to "modify", select the "fillet" tool and smooth the corner like in "image 1".

Fig.

Fig.

If you like to have a very smooth environment you should put a very big value in the fillet slot. Now we need to create an outline of this shape (the thickness of the walls). Select "spline" and go to outline the spline with the command "outline" that you can find again in the modify panel.

From this point you can create both environment objects (the linear or the circular one). To create the "straight" one (which will be the one that I will use for the tutorial) you must assign to the spline an "extrude" modifier from the modifier list.

Fig.

Fig.

To create the "circular" environment object you must first move the PIVOT/GIZMO to the correct location.

Fig.

Fig.

Just go to hierarchy, click on the button "affect pivot only" and move the pivot (this button allows you to move/rotate the pivot independently from the object)! After this step assign to the spline a "lathe" modifier from the modifier list. You will see that you will create an object similar to a tube. Go to the modify panel and increase the segment number to have a smoother shape. Now go to Degrees and put 180° in the slot. You should have the result of the image below.

Fig.

Fig.

Both of these two objects are really useful. It is your choice which one to use for your renderings. Create a teapot on the environment-object (in the room) and create a simple skylight. Remember that the illumination direction of the skylight can't be changed, i will ALWAYS come from the top (image 5).

Fig.

Fig.

For now you can leave the standard multiplier value=1. To be able to render correctly with a skylight you must enable final gather in Mental Ray (without final gather the skylight will not work).

Fig.

Fig.

For the first test rendering put a low number like 40 in the Final Gather Samples slot (in Max 9 you must use the Rays per FG point slot). Make now a test rendering. You should have the same result like in the image below.

Tip for test render: a smaller render size will allow you to have a shorter render time.

Fig.

Fig.

The skylight is NOT able to create specular-highlights on the object. The specular-highlights are of course VERY important to simulate different kind of materials. This is the reason why you should never use only one skylight in your scenes. It is important to have an additional light. If you want to have a very strong specular-highlights like on car paint materials you should use Mr Omni lights (you can find the tutorial of the car paint material in the FDA tutorials for materials). For this tutorial I will use a photometric target area light. This light is very soft, it gives very good and realistic results. Let's create a target area light like in the image below.

Fig.

Fig.



It is important to consider that the softness of the shadows of this light will change with the size of the light (big size:soft shadows, small size: sharp shadows).The shadow type MUST be "raytraced shadows", only this kind of shadow will give optimal results with mental ray. Don't create a light with a too big size, otherwise the shadows will be too soft and will cover too big areas, this will darken the environment and will not look realistic. Since now we have two lights you should reduce the multiplier of the skylight. Try to put a value between 0.4 and 0.7. I have reduced it a lot in my scene, in this way it is clear that the main light source is the area light. I like the contrast between strong illuminated surfaces and darker surfaces like in the image below. But at the end it is your taste which will decide about the multiplier amount of the two lights. Sometimes I create an additional area light on the opposite side of the first one.

If you like to have more than one area light you should disable the shadow of the light with lower intensity. Too many shadows are confusing and really ugly in a rendering. Make a rendering. You should have the result like in the image below.

Fig.

Fig.

This is how I normally render objects with no reflections. If you have an object with reflective material you need to do a few more steps. Let's see why (chrome and other materials are in another FDA tutorial). If you create an object made of chrome and you go to make a rendering you will have the result like in the image below

Fig. 10

Fig. 10

We can have a better result with a few more steps...Let's create two big boxes. like in the image below.

Fig. 11

Fig. 11

Create a white self-illuminated material and apply it to the boxes. If you make a rendering you will see a big difference between image 10 and 12

Fig. 12

Fig. 12

The reflection of this boxes are giving the impression of two light sources like windows or big white panels which are used also in the field of professional photography. You can notice that image 10 is a little bit darker than image 12 even I did not change the light settings. Why this?

Whenever you enable final gather you will notice that self illuminated objects are able to create light. The bigger your self-illuminated object, the brighter the surface close to it will be. That's why the rendering in image 12 is a bit brighter. Be careful with the size of the 2 boxes, don't make them too big and don't place them too close to the teapot, otherwise you will create too bright areas. At this point you can do a final rendering. This means you must set all settings to the maximum values, in this way you will have a perfect rendering. In the render panel (image 6) set Minimum samples per pixel "4", maximum "16". If you change the BOX filter to "Mitchell" your rendering will be a bit sharper. The minimum size of a final rendering should be 1024*768 pixels ( bigger is of course better). Don't forget to increase the shadow samples (area light sampling) to 32 or better 64, in this way your shadows will be perfect. Put in final gather sample slot 300, if this is not enough put 400.
Now make your final rendering.

The result of the last image is already very good, but we can improve it. I also teach to my students that Photoshop is a tool which is able to improve a rendering in many different ways. Let's apply a glow effect to our highlights ( in our case we will assign a glow effect to the reflected boxes on the teapot to give the impression that there is a lot of energy coming from the white panels). Select the "magic wand tool" to create a mask on the brightest parts (which are in this case the white boxes) of the teapot surface like in the image below.

Fig. 13

Fig. 13



Now press on your keyboard CTRL+C and than CTRL+V (copy and paste). You will see in the layer panel (F7) that automatically you have created a new layer on which there is only the masked part of the teapot (see the image below).

Fig. 14

Fig. 14

Now make a left double mouse click on the blue bar of the new layer. You will enable a window (layer style panel) with really great tools (try them, they are really interesting). Choose "OUTER glow" and change the yellow glow color to white. Now select the size slider and move it to the right side. Now you have a very nice glow effect on the teapot.
Another very interesting effect that you can create on a image is a Depth of field effect (DOF). In this way you can simulate a sharp focus point on the teapot. The part of the object which is far away will be a bit blurred (like in photography).

First of all we must fuse the background image (original rendering) with the glow effect layer. Just go to "layer" and select "flatten image" (image 15).

Fig. 15

Fig. 15

Now make a right mouse click on the layer and choose "duplicate layer" (image 16)

Fig. 16

Fig. 16

In this way you will have two layers, one is the perfect copy of the other. Apply on the copy a gaussian blur effect (image 17).

Fig. 17

Fig. 17

The last step is very important. Choose the "eraser tool" and delete the part of the image which should be sharp (image 18).

Try to use a soft brush and set it to opacity 60.

Fig. 18

Fig. 18



That's it:)

I hope you have enjoyed this tutorial.

Fig.

Fig.

Fetching comments...

Post a comment