|
In this tutorial I'll teach you how to make a picture of a glass using
caustics
Some knowledge of the Maya interface will be used for this tutorial
like shelves, menu sets, attributes editer, basic knowledge of what
rendering is, etc. But still this is a beginners tutorial 
What are caustics?
I could go into all the technicals on how caustics are in real life, but I'll try to explain it to you in a simpler way.
Here's probably the best example of caustics. It's when you see
a glass on the table and you see light around the base. Or the light
bouncing on the sides of a boat when it's in water.
Of course these "effects" can be achieved by using texture maps to fake it, but this is not always the best choice of action.
The default renderer, Maya software, is not capable of rendering
caustics. But the Mental Ray renderer has a variety of tools to create
this effect.
In this tutorial I hope I can teach you some basic Mental Ray tools and how to use caustics in your everyday Maya scene. 
The Set-Up
Of course this tutorial has mainly
been written to teach you how to make caustics on a glass sitting on a
table but it can easily be altered to your own personal need.
Import the glass that can be downloaded
Create a spotlight and angle it behind the glass like the image below.
Create a polygonal plane and scale it out. This will become our table top.
Now open the render settings window and under render using, set it to Mental Ray.
(NOTE The render settings window will be referred to RSW, and Mental Ray shall be referred to MR.) 
Mental Ray
You'll be using this renderer for just about everything you're going to
do in Maya. You don't have to use only MR. For example, when you're
using different render passes, you might send Maya software to do some.
But that's beyond the scope of this tutorial.
Here's a quick comparison chart. 
Now in the MR tab in the RSW set quality present to production.
Under secondary effects check caustics.
Here's a quick explanation for all the other attributes under secondary effects
Raytracing = this calculates stuff like shadows, reflections, etc.
Final Gather = this is a way of calculating all the light in the
scene. Example; One directional light could light an entire room scene
instead of having to add point lights around the room, which can be
precarious.
Caustics = as explained above, caustics are a photons based way of simulating effects. Below I will explain photons further.
Global illumination = kind of similar to final gather, but are
worlds apart on how they figure out light for a scene. Global
illumination uses photons to emit light, like caustics.
Photons
Imagine
photons as little tiny bees that fly from light source to surface. A
light will throw hundreds upon hundreds of little photons into a scene
where then they will perform one of two different tasks, caustics or
Global illumination.
Any light from default will not emit photons, but in the mental ray tab of most lights you can turn on this feature.
Let's select our spot-light. Rename it Photon_Emiter_Light.
Click the photon_emiter_lightShape tab.
Set the intensity to 0 Since this will not be the main light for the scene we do not want to emit any light. Just photons.
Set the cone angle to 110.000.
Now roll down the attributes until you find the MR tab.You will see the tab caustics and illumination. Check emit photons. 
Now if you were to render it right now you would see nothing but a
black screen.But you would notice an increase in render time.
The Glass Material
There are a couple different shaders you can use for this job.You can
just use one or you could mix shaders. But since this tutorial is aimed
for beginners, we will keep the shaders and the attributes simple.
Now if you were doing an advanced 3D glass that would require
a high level of realism, you would use the dielectric material (NOTE
The dielectic material is a MR material only. So you will not see it on
the rendering shelf.). But since this is a simple scene, we'll use the
phong material.
Select the glass and then go to the rendering shelf and click create phong. 
Now you will want to make this glass transparent. With the attributes editor open, set the transparency to a light gray.
Render.
if you follow this tutorial exactly you'll see a glass that looks like it was overlit .

Tweeking
This is where you will fine tune your caustics results.
Okay. Select the photon_emiter_lightShape.
Roll back down to your MR photons tab.
Let's explain these attributes.
Photon Color = the photon's color.
Photon Intensity = how bright the photons will appear.We'll be editing this attribute later.
Exponent = here's a quick explaination of it; if the value is
set to one, the photons will gain power. But if the value is set to
three, the photons will lose power.
Caustic Photons = the default is 1000. This defines how many
photons this light will emit in the rendering. 1000 photons will never
be enough to successfully use this effect.
Global Illum Photons = this attribute will be ghosted out due to
the fact that global illumination is not turned on. But it's pretty
much the same as the caustic protons attribute, this decides how many
global illumination photons will be emitted into the rendering.
(NOTE The caustic photons and the global illum photons will
both improve photon quality, but will both significantly increase
render time.)
So, back to our scenario.
Set the photon intensity to 2500.000 .
Set the caustic photons to 100000 but beware of long render times.
Create a directional light and angle it so it matches the
spotlights angle.In it's attributes find the tab shadows and roll down
till you find raytrace shadow attrributes. Check use raytrace shadows.
Let's define these raytrace attributes.
Light Angle = the higher this value, the softer the shadows. But if you do not increase the shadow rays, the shadow will look pixilly.
Shadow Rays = the more you have, you will find that your shadows will appear smoother and cleaner.
Ray Depth Limits = the more you have, the crisper your shadow will look.
You will want to set the light angle to 5, the shadow rays to 30, and the ray depth limit to 4.
So there you have it. A basic scene using caustics. Feel free
to play around with the attributes including the phong attributes. I
hope this gave you a basic knowledge of photons and their uses.
|