1 Nisan 2008 Salı

Global Illumination using Default Scanline Renderer

Step 1:

First things first. We will need a scene to practice on so I’ve set up a simple scene with a teapot in it. For those of you who don’t know, I didn’t make the teapot because 3D Studio Max already has it. You will find it under the Create Panel.

{alt}

Step 2:

But what is Global Illumination and why do we need it? To explain it I will quote the first paragraph from Wikipedia:

Global illumination algorithms used in 3D computer graphics are commonly used to add realistic lighting to 3D scenes. Such algorithms take into account not only the light which comes directly from a light source (direct illumination), but also subsequent cases in which light rays from the same source are reflected by other surfaces in the scene (indirect illumination).

Read entire article on Global Illumination. So basically GI is just another light that we can add to our scene which unlike Omni Lights or Spot Lights illuminates the entire scene from above, having the same intensity in every spot of the scene and that makes the objects have a very realistic soft shadow.

Step 3:

Because the GI will add shadows to our objects we will need a plane so that we will be able to see them. Under the Create Panel select Plane and using the Keyboard Entry feature create a 10000x10000 plane (make sure that the Top Viewport is selected)

{alt}

{alt}

Step 4:

Now we need to create a light that will generate our GI. We will use a skylight. So under the Create Panel go to Lights and click on the button that says Skylight. Now click anywhere you want in the Top Viewport. It doesn’t matter were you place the light because it’ll work the same in any spot.

{alt}
{alt}
Step 5:

Usually when I test my scenes I like to use some standard materials instead of the colors that are automatically assigned to objects. So hit ”M” on your keyboard to bring up the Material Editor.

Select an empty material and change the Diffuse Color to White. Leave everything else on default and assign this material to the Plane. Now pick another empty spot and assign it to the teapot.

The only thing that I will change to this material is check the 2 Sided option otherwise I will have some nasty holes in the teapot.

{alt}
{alt}

Step 6:

If you render the scene now you will get something similar to the picture below which is not what we expected, isn’t it.

{alt}
Step 7:

Well this is the tricky part which most of us don’t know about. To use GI we actually have to activate it in the Render Settings. We do that by going to Rendering->Advanced Lightning->Light Tracer. You don’t have to change anything in the dialog box that appears. Just hit Render and enjoy the result.

{alt}

{alt}
Final Result:

Hiç yorum yok: