|
INDOOR SCENE 1 So before we continue, open the maya scene called inter01.mb. You would see that there is only a geometry in the scene and a camera angle which we will use to render it. If there is no light in the scene, maya tend to create the default light if you try to render. To turn this off go to the Render Options and under Common section go to the bottom and turn of Default Light. I tend to turn this off every time since there can be a situation where you won't have usual lights in the scene, but geometry that serves as the light and maya will understand the situation as "o, there are no lights in the scene, why dont I help my user and set one simple point light just for him" ... and of course, this produced very confused reaction from the viewer. So, turn this off. :) At a start, we need to create some light that shines through the hole, which, in this case, would be spot light To create spotlight, you must go to Create > Lights > SpotLight. The spotlight will appear in the center of the scene. Transform it so that it points through the hole like similar to this:
You can change the angle at which the spotlight shines through the hole, but it must be pointed so that part of the light pass through the hole, or you wont get any light in it. Ok, now switch to shaded display in view, and rotate camera so that it is inside box, like in this picture:
Then go to the Attribute editor of the light (select light and press CTRL+A) to change some options. First of all, switch the Decay Rate to Quadratic. I use the quadric decay rate in many cases to get realistic light behavior. If you want, you can leave the Decay Rate to no Decay and experiment with that. Also, if you have used the Quadratic Decay Rate, increase intensity to something like 120. In Shadow > Raytrace Shadow Attributes check the Use Raytrace Shadows. This will produce the sharp raytraced shadows. Later you can use the area light to get more realistic shadow. One more thing that we will do is that we will create Lambert shader, and assign to our object. After you assign it, change the color of the shader to something like orange. Now, let's go and setup the global illumination... There are two menus that we are interested in. The first one is in light attribute editor and other is in MentalRay Rendering Globals > Options. First thing we have do to is to change few options in light attributes, so that our light emits photons. To do this, select the one and only spotlight in the scene and press CTRL+A. After attribute editor pop's up, go to the MentalRay options > Caustic and Global Illumination and turn on the Emit Photons button. After you do this, few options below Emit Photons will not be faded any more. As you will see, there are three options, Energy, Exponent, Physical. The Energy and Exponent are similar options ... they are used to fade and boost up the overall brightness of global illumination effect in the scene. If you render the scene at this point, you will get the same result as if there was no global illumination. Why? Because we have to turn on the global illumination in the MentalRay Globals. To do this open the render window Window > Rendering Editors > Render View. After the Rendering View opens, go to the Options > RenderGlobals (MentalRay). After the renderGlobals opens, go to the Quality section, and press the box like button on the right side of the Render Quality option. This will open another menu called mentalrayOptions1. In this menu we will turn on the global illumination. To do that, go to the Caustics/Global Illumination section and turn on the Global Illum. This will turn on the calculation of global illumination in the scene. Let's make a test image to see what has happened after turning on GI. The first picture shows the picture without GI, and second with GI.
As you see, there is a lot of additional lighting in the scene. The only problem is that it doesn't have satisfying quality. Remember that after the we setup the global illumination we have to use the final gather to get the best illumination that we can. For that reason, we have to fine tune the global illumination so that it serves the final gather when the time comes. So how can we tune the global illumination? As you remember there are some options in attribute editor of the light and in MentalRay Globals > mentalrayOptions1. Options in the light attribute are used to control the amount of photons in the scene and the brightness of the global illumination effect, and the options in MentalRay Globals are used to fine tune the global illumination, for example how many photons will be collected and mixed at point x when renderer calculates the illumination, or how big will be the area from which the photons are collected. This will all be demonstrated later. To fine tune the global illumination, we will first change some option in attribute editor of the light. So, select the light and press CTRL+A. Go to the Caustic and Global Illumination options. As you see, the Global Illum Photons has become available (not faded any more). This option tells renderer how much GI photons will be shoot in the scene. The more photons you use, the more quality you get, but it slows down the renderer. Our goal is to make the satisfying-fast solution for GI, so we will not use too much photons. By looking at the rendered scene, we see that after we have turn on the GI, the brightness of the scene is exaggerated. We don't want this because when we turn on the final gather it will introduce additional brightness to the scene, and it will be too bright. To change the impact that GI has on the scene we will increase the exponent value to value 3.5. To show you how do exponent and energy values affect the scene, I made a few pictures:
As you can see, playing with exponent and energy values produces similar effects. So, what solution, from those above, would be the best? The one on the right top, with Energy 8000 and Exponent 3.5. Is it too dark? Yes, that's true, but remember that final gather will boost up the brightness of the scene. If we only want to use the global illumination, without final gather, then we will probably go for the Energy 8000 and Exponent 3, or somewhere around these values. But, for now set the exponent value to 2.8 so we have the better perception of how GI affects the scene, and later after we are over with GI setup, we will change it to the 3.5. You will probably ask, what happens when we increase the Global Illumination Photons option. Here are the pictures:
The first picture doesn't have enough photons, so it is probably unusable. The second and third give acceptable results and not too much time has been spent on photon calculations. Last one delivers the best quality but it takes too much time to calculate compared to others. Which one will we use? The one that comes between second and third solution, that means increase the Global Illumination Photons to somewhere around 50 000. This is what we get:
Now about the noise in the picture. To get rid of the annoying noise go to the RenderGlobals (MentalRay) > mentalrayOptions1. We will play a little bit with the Global Illum Accuracy and Global Illum Radius options and see how does that impact the picture. What does Global Illum Accuracy do? It tells renderer how much photons will collect from surrounding area when it calculates the global illumination intensity at the point that we are shading. Second option tells renderer how big is the area from which photons are collected. The pictures can tell more than any words:
From the first picture above you can see that there are a lot of spots in the scene. These are the photons. If you set Global Illum Accuracy to 1, the intensity of photons is not mixed together. That's why there are a lot of spots in this pic. If you increase the Global Illum Accuracy, more photons are collected together and mixed to get average value. This is the situation in pictures 2 3 and 4 in row 1. You can see that increasing of accuracy over 100 doesn't have too much effect, so you can leave the accuracy at that value. As for the radius, if you leave it at 0, the renderer will automatically set the value that he thinks is the best. This is the case at the first picture in second row. But that is not acceptable solution in our situation, so we will have to set it on our own. By increasing the radius level, illumination becomes more suitable for this scene. The last one, with accuracy 100 and radius 0.5 is probably the best solution. It does have too much noise, and every part of picture is illuminated enough. That's why we will use this settings. That's the end of global illumination setup part. Now it's time to invite the final gather and raise the quality of the illumination. But first, go to the attribute editor of the spotlight and in global illumination section increase the exponent to 3.5. To turn on the final gather, go to the mentalrayOptions1 in the RenderGlobals (MentalRay). Open the section Final Gather and turn on the Final Gather option. There are three important options in this section, the Final Gather Rays, Min Radius and Max Radius. By default these options have default values of 100 0 0. All three options have a great impact on the rendering speed. FG Rays is number of ray shots at the scene to estimate the final gather values. The more rays you have the more quality you get, but rendering speed drops dramatically. The Max and Min radius tell the renderer at which radius from shading point will FG collect information about surrounding light. If these values are set to 0 0 then the renderer estimates the value of these two. But, in this case we will set it manually. Let's see few pictures produced by changing these three values.
As you can see, the more FG rays renderer shoots at the scene, the more time it took to render, but you get a better quality. And, if Min and Max radius are increased, it takes less time to render the picture. For the best quality/speed balance you need to find the most appropriate values for these options. By looking at the pictures above, you can estimate that Rays could be set to somewhere around 300. Since we are increasing the FG rays value, the rendering will probably slow down so we will compensate that with the min and max radius for which we will choose the values min 0.25 and max 1. Now, if you render the picture, the result will look like this:
It looks good, and renders relatively fast... we achieved our goal. At the end, go to the mentalrayOptions1, section Sampling Quality and increase the Max Samples to 2 and turn on Jitter. Then go to RenderGlobals (Maya Software) and increase the resolution to 800 600. That's it, press render and let mental ray do his job. Result: If you want an additional realism to the scene you can use the area light instead of the spot light. That will produce blurry, more realistic shadow. To do this, select the light, go to his attribute editor and under MentalRay > AreaLight turn on Area Light. This picture was rendered without area light.
|
|||||||||||||||||||||||||||||||||||||||
|
Toni Bratincevic - toni@vizije.hr - http://www.interstation3d.com |