English French German Spain Italian Dutch

Russian Brazil Japanese Korean Arabic Chinese Simplified
Translate Widget by Google

Senin, 27 Juni 2011

Lighting with mental ray - 3dsmax Tutorial

Lighting with mental ray-3dsmax Tutorial


Software: Autodesk 3ds Max

Author: Mario Malagrino

URL: http://www.mariomalagrino.com/

http://www.florencedesignacademy.com



This is a tutorial of the Florence Design Academy www.florencedesignacademy.com

Introduction



On the F.D.A. gallery 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.



[Image 0 - Click Here for Larger Image]


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".



[Image 1 - Click Here for Larger Image]


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 (Image 2).



[Image 2 - Click Here for Larger Image]


To get a more realistic illumination I have enabled Final Gather in "indirect illumination". I Put a quite high number in "samples" to make the final rendering (600) (image "4").



[Image 3 - Click Here for Larger Image]


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 "image 4".



[Image 4 - Click Here for Larger Image]


Both of these two objects are really useful. It is your choice which one to use for your renderings.



[Image 5 - Click Here for Larger Image]


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).


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 "image 6").



[Image 6 - Click Here for Larger Image]





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 "image 7". Tip for test render : a smaller render size will allow you to have a shorter render time.



[Image 7 - Click Here for Larger Image]


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 specularhighlights 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 an target area light like on "image 8".



[Image 8 - Click Here for Larger Image]


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 on "image 9". 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 of "image 9".



[Image 9 - Click Here for Larger Image]


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 of "image 10".



[Image 10 - Click Here for Larger Image]


We can have a better result with a few more steps...Let's create two big boxes. like on "image 11".



[Image 11 - Click Here for Larger Image]


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".



[Image 12 - Click Here for Larger Image]


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 "image 12" 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 on "image 13".



[Image 13 - Click Here for Larger Image]


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 (image 14).



[Image 14 - Click Here for Larger Image]


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).



[Image 15 - Click Here for Larger Image]


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



[Image 16 - Click Here for Larger Image]


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).



[Image 17 - Click Here for Larger Image]


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.


You can create also with 3D Studio Max a "depth of field effect" (DOF), and a glare effect with the Mental Ray "glare shader". But the PhotoShop solution is much more faster.



[Image 18 - Click Here for Larger Image]


That's it:)

I hope you have enjoyed this tutorial.

0 comments:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More