
:: Post Date: 2008-01-25 17:30:27 [Post Comment] [Post Articles]
|
| Getting started with Mental Ray's Final Gather Software: Autodesk Maya Author: Adam Levine Author Website: http://soundslikeblue.com/ Getting started with Mental Ray's Final Gather (it's not as hard as it looks) This tutorial was designed to teach anyone who is interested in rendering with Mental Ray's Final Gather but was either scared to learn or simply didn't think they had the time. Well, I hope this tutorial can quiet your fears and answer some questions. The information i'm about to share with you is by no means original. Yes, I created all the images and renderings, however I am only offering you the information which I have learned from those who came before me. Without further adieu, on to the tutorial. Understanding what Final Gather does Technically speaking, Final Gathering (FG for short) means that at each shaded point, the hemisphere above that point is sampled to compute indirect illumination, in addition to direct illumination. The hemisphere is sampled by sending rays into appropriate directions. Basically, FG lights up your scene by using samples of light from surrounding surfaces and the environment. Note: FG is commonly mistaken for Global Illumination (GI). The main difference is that GI creates a render based on light information and gives you more control over lighting your scene. FG creates a render using information within the surface of the objects in the scene. FG is commonly used to light a character model to give it a soft, "clay-like" feel. Step 1. In Maya, create a new scene. I used a few simple polygons to create this table setup. ![]() Ahh Maya's Default Lighting. Breathtaking, isn't it. This is what our goal will be. Step 2. Make sure Mental Ray is loaded on your computer. Go to Window>Settings/Preferences>Plug-In Manager ![]() In the Plug-In Manager, click on (loaded) Mayatomr.mll (Maya to Mental Ray) The auto load is optional. It will always load if this is checked. I prefer to have this checked.. ![]() Step 3. Let's do a test to see what a FG render looks like set to default. First, open up the Render Globals box either from "Window > Rendering Editors > Render Globals". Scroll down until you are in the Mental Ray menu. Change the quality to Production, click Final Gather, and set the Final Gather Rays to 500. (Note: It will change the quality back to read custom, don't worry.) ![]() Since the background color is black, nothing will show up when rendered. A black environment produces no FG light at all. To fix this, go to "View > Camera Attribute Editor" in the perspective menu. ![]() Under the Environment tab, choose a color other than black. I chose a muted blue. Render away! ![]() Fear not, for it's supposed to look this rediculously blown out! This is because Maya is using it's default lighting because we didn't create any lights. You can easily fix this by creating a light (any light will do, i'll use a point light) and setting its intensity to 0. This will turn Maya's default lights turn off, and we're only left with FG lighting. ![]() Oh what a difference a "non-light" can make. You go little non light. ![]() Step 4. It's nice but it falls kinda flat. To fix this, let's create a shadow-casting directional light (I used ray trace shadows). I colored mine slightly orange to mimic the sun. You need to turn the light's intensity down to about 0.3 because the scene is already pretty well lit. ![]() Step 5. Ok, now it's time to look for any artifacts to fix. (Artifacts are choppy or blocky shapes that were not intended with your render) The image I made above doesn't have a great deal of artifacts however I will explain the two ways you can go about fixing them. The first way is to increase the amount of FG rays from 500 to 1000. While this will fix your problems most of the time, it will also increase your render time. The render time is also always dependant on the amount of objects in your scene. The second way to fix artifacts is by using the MIN/MAX radius settings. The default is set at zero/zero. These values affect the way the FG samples are taken. The MAX radius value determines the maximum distance apart that FG samples can be from each other. The MIN radius value determines the closest they'll be taken from each other. The MAX radius setting is usually about 10% of the size of the scene, and the MIN radius is 10% of the MAX radius. You can find out the size of your scene by using the Create > Measuring Tools > Distance Tool ![]() Using the distance tool, measure the distance across your scene (on the longest side) and then divide that number by 10 to find the MAX radius. Divide that number by 10 again for the MIN radius. Don't count a large ground plane as part of your scene because it will increase the radius values and you might lose detail on your smaller objects. ![]() On the left is a render using a MIN of 0.118 and a MAX of 1.180 Even though this should remove artifacts, sometimes it can make them worse. The key word to fixing this problem is "TWEAKING". I decided to use a MIN of .3 and a MAX of 3. By increasing the radius, some of these problems were solved. ![]() ![]() Again, in my case, these artifacts were not that extreme. If you have an object with lots of fine detail you will notice artifacts a lot more. Step 6. Ok, here it is, the last step i'll cover. If you've made it this far I congratulate you. If you just happen to be reading this because you looked through the tutorial and thought..."gee golly gosh, this thing's long, I wonder what he wrote at the end?" well then for you I have nothing. (It really won't take long to read/understand. Trust me, I was terrified of this stuff for a long time and if I can pick it up, just about anyone can.) Anyway...here's how to fix the amount of FG light that hits your objects. This doesn't change the amount of "light" in the scene. Each shader in Maya has a Mental Ray node. Open the attribute editor for any of your shaders. Click on the Mental Ray node, and notice the "Irradiance Color". The default is white. White means that the shader will be completley effected by FG. If you drop the color down to grey, when you re-render, you will notice that the object becomes darker. This allows you to have more control over how the objects are represented within FG. This is what it looks like when I lowered the Irradiance Color on the table's shader. ![]() ![]() Below is a render I made by tweaking the Irradiance colors on all of the objects including the floor. On the right are two examples of more complex objects rendered using FG. Both were rendered with 500 rays. The "Temple" has some obvious artifacts on the roof which I will have to tweak out. Click images to enlarge. ![]() ![]() ![]() Well, that's about it. Remember, this is only the begining...! There's a lot more out there on the subject and it introduces such things as Global Illumination, Photon Emitters and HDR rendering with Mental Ray. Woo-hoo! I hope I was able to help at least one person consider learning more about this stuff. It just makes things look so darn good. If you're into the purely technical side to Mental Ray here's a great resource. "Rendering With Mental Ray" Second Revised Edition by Th. Driemeyer A great site for learning (one of the main sites responsable for teaching me) is http://www.jozvex.com |
| ok im getting most of this but no shadows! any suggestions? |
| its good for freshers in lighting, thanks a lot. |
| this mental ray. does it work with texture? |
| Great! Just what i needed, thanks Adam!! |
| What type of dynamic tutorials do you want? If you could tell me the types of dynamic tutorials you want, I can try to find or make them for you. Skymedias Admin |
| i want dynamics tutorials i request who read my message plz respond |
| Iam the beginner in 3D but i found this tutorial so easy. man u r rocking Mehmood Khairkha mehmood_78@hotmail.com |
| free lighting tutorials |