May 2, 2014

Caustics through Mental Ray

by Mario Malagrino, Italy 



Caustics are really great light effects that you can observe in liquids, glass objects and gems. We are able to simulate this effect with 3D Studio Max perfectly. This tutorial about Caustics will work only if you enable "Mental Ray”! (This tutorial was made in Max 8).



Step 1: Let's Create a small room like on image "1" (try to do that in realistic sizes, it is important that you make the setup of the "unit system", only in this way Mental Ray will give you an optimal end result since it will consider all measurements of the objects in the scene for the final rendering).Now create your lights to illuminate the room.

There are several techniques to create a correct illumination. In the case of the room I have created 3 long "free area lights" like on below image (you can find them under photometric lights).

Step 2: Place them under tree long boxes. Select the bottom polygons of the boxes and assign them a white self illuminated material like below image.



Step 3: 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).


Step 4: After you made the room you must create the water. We can do that with a simple box. To create the small waves on the surface you have different possibilities (or with a material or by polygons). For transparent water material creates a "Raytrace" material (it must be transparent and a bit reflective). To create a wave effect put in the "bump map" a "noise"-map with a quite small size; to simulate trough geometry deformation the noise/wave effect you must apply to the box a "noise modifier". The wave size will influence the caustic shapes. Big waves/noise = Big caustic shapes!

After you made all the objects you must create a "MR Area Omni" light on the top of the water in the center of the room like step 2 image. Now make a right mouse button click on the MR. Area Omni and disable "AFFECT SPECULAR" and "AFFECT DIFFUSE". 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).




Step 5: After this step this MR.Area Omni will NOT anymore affect the illumination of the room. We will use that MR.Area Omni ONLY to create the caustic effects. In this way we have much more control of the caustic position, color and brightness. Disable shadows in the MR.Area Omni.

Now select the MR.Area Omni and all other objects except the lights that you have created for illumination (Free area lights). Make a right mouse button click on all the selection and select properties.




Final Step: Go on the "Mental Ray" panel and check "GENERATE CAUSTICS”. This is necessary in order to have a caustic effect on the objects. Now we must go to the "INDIRECT ILLUMINATION" panel and enable "CAUSTICS".

To improve the quality of the caustics (better/clearer shapes) you must go to "LIGHT Properties" and put a VERY high number in "AVERAGE CAUSTIC PHOTONS PER LIGHT".I put a bit less than one million. For test renderings it is enough to put 10.000. The higher the number, the better will be the effect. Of course it will take much more time to render the entire scene. You can put very high numbers in multiplier (MR.Area Omni) to create a very bright caustic effect. If you change the light color of the MR.Area Omni you will change the color of the caustics ( blue omni color = blue caustics). To have a blue color of the illumination under water the water material should have a blue color in diffuse and transparency. Hope you liked this tutorial. 


source: http://www.cgarena.com/

0 comments:

Post a Comment