This is my first blog entry and also my first tutorial.
My name is Georgian(aka nimlot). I will make a tutorial for you. A tutorial about many things but mostly about caustics in mental ray.
I guess that if you search over the internet you should probably find a nice caustics tutorial for 3ds max, but I want to get it a little further. I will try to make a tutorial as detailed as I can because I was always frustrated that after I’ve did some things step by step after a tutorial I was never been able to achieve that last example that the writer showed at the end of it. U know….the image that makes u smile for how beautiful it is. I want to try to get you right there…right at the end….with the best results for you. Hope you’ll enjoy it. Also you can download the final scene. You will find the link at the end. :)
This is what we want to achieve.

I’m using Autodesk 3ds max 2009 but it works in all versions what I do now.
My system:
Intel Core2 Quad Q6600 2.4 GHz
4 Gb DDR2
Gigabyte Nvidia 9800 GTX+ 512 Mb
OS: Windows Xp SP2 (so only 3.2 Gb of RAM working :( )
Part 1 : Making some nice caustics
So let’s start:
First set your units to cm. In top menu at customize -> units setup select at display unit scale -> metric and from the dropdown select centimeters. Also go to rendering->render setup(F10) and in the render setup window down there where it says presets select mental.ray.no.gi and press ok.
Next create a plane. About 500x500 it would be fine.
Make 4 GeoSpheres like the ones in img.01. Spheres diameter is 10 and 2 segments. In perspective mode select the GeoSpheres and align them to the plane. Select only the z position and set current object to minimum and target object to maximum. Press ok.

Next step is to create a light for our scene. Go to create standard lights and select from there mr Area Spot. In the left viewport create a light just like the one I did(img02). To be sure it is exactly as I did select the light and right click on the Select and Move icon in main toolbar and set the position to -700 cm on x 0 cm on y and 350 cm on z. The target should be in 0,0,0. Change the multiplier to 4. Change the decay to inverse square and set the start point at 1029.4 and at spotlight parameters change the hotspot/beam to 4.5 and the falloff/field to 74.7. And now we have our first light in place. :)

Now we will start making some nice shaders for GeoSpheres.
1. Open material editor and select the first slot. Name it glass. Open material browser, go to new and from there pick Glass(physics_phen). Leave it how it is.
2. Select the second slot and name it chrome. Open material browser and pick from there Arch&Design(mi). In material editor select from the template’s dropdown select (under metals group) chrome. Leave it how it is.
3. Select the third slot and name it brushed. Open material browser and pick also Arch&Design(mi). In material editor select from the template’s dropdown select (under metals group) brushed metal. Leave it how it is.
4. In the 4th slot we will make a more complex material. Select a slot and name it ruby. Open material browser and pick raytrace. On raytrace basic parameters check the faceted box. Click on the diffuse color and set it to rgb=141,0,0. Click on the transparency color and set it to rgb=255,77,68. Set the index of refraction to 1.77. Click on the specular color and set it to rgb=255,144,144. Set the specular level to 136 and glossiness to 40. Click the button next to reflect and select the falloff map. Change the falloff map to Fresnel and deselect the Override Material IOR checkbox. Go back to your base material and in Extended Parameters rollover, in the Advanced Transparency tab check the Color checkbox and change the end to 20. Click on the color square and change it’s color to RGB=172,0,0. Now go to the SuperSampling rollover and deselect Use Global Settings. From the dropdown select Max 2.5 Star. And we’re done.
5. In the 5th slot create a standard material with diffuse RGB=100,100,100 and assign it to the plane.
6. Now assign to every GeoSphere one of the materials we’ve created.

Create a camera just like mine and make a test render(F9). It should look like this.

Now it’s time to see some caustics :D. Usually caustics are a problem. You have to play with them a lot until you will get the result you want. For instance if you don’t want to wait too much on render you will have to accentuate the intensity of caustics too see them. I will show you how. Select your GeoSpheres and right click in viewport. Go to Object Properties. Now go in Mental Ray tab and click the Generate Caustics checkbox. Click ok. Now we have the caustics generators. All we need now is to tell the renderer to render them. Open Render Setup window(F10) and go to Indirect Illumination tab. Go to Caustics and Global Illumination tab and check the Enable checkbox under Caustics. Now let’s see what we have.

Pff…..almost nothing. Don’t despair….it’s only the beginning. There are 2 important values to play with when creating caustics. The first one is the multiplier and the second one is the average caustics photons per light. The multiplier is useful when we don’t want to wait a long time at render and we don’t need to achieve a too much realistic render. Increasing the multiplier value will make caustics more intense. I usually use it when I want to see how it comes. The average caustics photons per light is the key for realism. More photons means more accuracy. You will see. In our the image above we barely distinguish any caustics so it will be a good idea to increase the multiplier value. Increase it to 10 and let’s see what we have there.


Now we have something. This means we’re doing great. Don’t change the multiplier value and change the average caustic photons per light to 100000. Let’s see how it goes now.

Now we have some nice caustics. Let’s play a bit longer. Change the multiplier to 5 and the average caustics photons per light to 500000. Watch out….it will take much longer to render. We’ll see some much realistic caustics. I like them but I think it should be more intense. So I will let the multiplier around 8 or so. This will be the our optimized values for the final render. If you want more depth than increase average caustics photons per light until you are satisfied. For now I think 500000 it’s enough.

Now we will play a little with the light. Just for fun. Move the light a bit closer to our GeoSpheres. Let’s say x=-415 cm and z=190 cm. Also change the decay start point to 607 cm. Change the multiplier value to 8 and average caustics photons to 100000. Let’s see how it looks.


Nice. I really like how it looks. I wonder how it will be if we go closer. Let’s move the light to x=-210cm and z=75cm. Also change the decay start point to 327cm and the hotspot/beam to 12.


Nice. But now the caustics are too intense. So let’s see how it works with multiplier set to 1.5 and the number of photons to 1 mil.(1000000). Don’t worry my render time is still under 1 minute(around 40s).

I would say it’s much nicer. Next thing to do is to get rid of those ugly shadows and get some nice smooth shadows. Select the light and go to the modify panel. Go to Area Light Parameters rollout. Increase the height and width of the rectangle to 100. Also increase the U and V samples to 20. Let’s test it.


Now it looks better. I’m proud of you. Last image took about 2 minutes to render.
I hope you enjoyed this tutorial. I'll post another one in a few days so stick arround.
Here is the link for the scene:
http://rapidshare.com/files/251183657/caustics01.max.html
30 comentarii: