Você está na página 1de 42

mental ray: Introduction to Materials,

Shaders and Global Illumination

mental ray: Introduction to


Materials, Shaders and Global
Illumination
Realistic lighting is an important part of
architectural simulation. In Autodesk VIZ
2005, simulating realistic lighting is quite
easy to do. Since all of the lights possess
real-world properties, you can place them
just as you would place a regular light. The
radiosity and rendering engines will do the
rest, providing a physically accurate model
of light effects in your model.
Objectives
Photometric lights use light energy values In this tutorial, you will learn how to:
that enable you to accurately define lights as
they are in the real world. You can set their • Review a model that was built in
distribution, intensity, color temperature, Autodesk Architectural Desktop and link
and other real-world lighting characteristics. the drawing to Autodesk VIZ.
You can also import specific photometric • Hide/Unhide objects by layer.
files available from lighting manufacturers to • Create mental ray materials and apply
design lighting that is based on commercially them to the scene.
available lights.
• Use the Asset Browser to merge lighting
components.
• Manage multiple lights in a scene, and
control the settings of instanced lights.
• Work with Global Illumination and see
how it improves your renderings.
2 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

• Create stylized renderings using mental Set up the lesson:


ray shaders. 1. Start Architectural Desktop, and choose
• Optimize system performance when using File > Open.
Global Illumination. 2. Find the \program files\autodesk viz
Skill Level: Intermediate 2005\tutorials\gallery folder on your hard
drive and highlight tut_tulipgallery.dwg,
Time to Complete: 2 hours (depending on then click Open.
hardware)
The drawing opens in a quad viewport
Files for This Tutorial format.

Before doing the tutorials, unzip the sample


files to your \program files\autodesk viz
2005\tutorials folder.

In This Tutorial
Lesson 1 – Review and Link the Model (page 2 )
Lesson 2 – Add Materials to the Gallery (page 9 )
Lesson 3 – Add Lights to the Gallery (page 22)
Lesson 4 – Stylize the Rendered Output (page 34)

Lesson 1 – Review and Link the


Model
Review the model
Before starting the scene, it’s a good practice
to review the model to get a feel for what When you receive a model, it’s always good
you’re going to be working with. In most to have an idea of the types of object you’re
cases, you will be given a model without going to be working with, how the layer
much information about where it came structure has been set up and pinpoint any
from or who drew it. By looking over the objects that may cause a problem when you
model and it’s structure, you can formulate link the model to Autodesk VIZ 2005.
a better plan for working on the model in Now that the model is open, you can start
Autodesk VIZ 2005. looking it over to determine the best way to
In this lesson, you’ll look over the model proceed.
in Autodesk Architectural Desktop and 1. In the Top viewport, at the upper left, use
then use File Link to link the model to the Pan and Zoom commands to highlight
Autodesk VIZ 2005. the left-most finger of the building.
This is where you’ll be doing most of the
work. If you want, you can similarly pan
Lesson 1 – Review and Link the Model 3

and zoom in the Left view, the lower left,


and the Front view, the upper right.

4. Right-click in the viewport and choose


Deselect All from the flyout menu.
2. Left click in the 3D viewport, at the lower 5. Click the gold windows running along the
right, and select the cyan object at the top stairway.
of the staircase. It shows up in the Properties palette as
a Curtain Wall. The Curtain Wall is an
Architectural Desktop object that can be
altered parametrically by entering new
values in the Properties palette or by
editing its Style.

3. Right-click and choose Properties from


the flyout menu.
In the Properties palette, notice that this
is a 3D Solid meaning that it will not
have any styles associated with it as if it
were a Slab object created in Architectural
Desktop. 6. Right-click in the viewport and choose
Deselect All and also close the Properties
palette.
7. On the menu bar, choose Format > Layer
Management > Layer Properties Manager.
The Layer Properties Manager gives you
a view of the layer structure and naming
4 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

used in the model. This information 1. Start Autodesk VIZ and open the
is important if you plan to use the File Customize menu.
Link Manager to link the model to 2. Choose Units Setup and turn on US
Autodesk VIZ. Standard in the Display Unit Scale group.
The state of a layer is important when Leave the unit system at Feet w/Decimal
considering File Link. Layers that are Inches and leave the Default Units set to
frozen will not link to Autodesk VIZ Feet.
unless you specifically choose those
layers. By freezing layers, such as the
annotation layers, you can reduce the
size of the scene when it is linked to
Autodesk VIZ.
Layers that are turned off, will link to
Autodesk VIZ but will link in the turned
off state.

8. Click Cancel to dismiss the Layer


3. Click the System Unit Setup button and
Manager.
make sure the System Unit Scale is set to
9. Exit Architectural Desktop. Inches.
Now that you’re a little more familiar 4. Click OK to close the System Unit Scale
with the model and its structure, you dialog and then again to close the Units
can proceed to work on the model in Setup dialog.
Autodesk VIZ.
Link the model to Autodesk VIZ
Set units and check unit scale
In this section, you’ll use the File Link
When you start Autodesk VIZ, the default, Manager to link the drawing file to
display units setting is a generic unit. It Autodesk VIZ. Using File Link offers more
makes better sense to set the units to an flexibility in case any changes occur to the
architectural format. You’ll do that now. original drawing in Architectural Desktop.
Lesson 1 – Review and Link the Model 5

When a change occurs, you can quickly


reload the Autodesk VIZ scene and continue
working. If the drawing were imported into
Autodesk VIZ, then you may end up having
to scrap the entire scene if the designer
makes extensive changes.
1. From the File menu, choose File Link
Manager.
The File Link Manager dialog is displayed.
2. Click the File button and browse to the
\tutorials\gallery folder on your hard
drive and highlight tut_tulipgallery.dwg,
4. Close the File Link Manager dialog.
then click Open.
5. Click the Min/Max Toggle to change
the viewport to the quad viewport layout.
This layout closely matches the four
viewports you saw when the model was
open in Architectural Desktop.

6. Click Zoom Extents All to display the


gallery in each viewport.

Hide the roof


Notice that the model was built with a roof;
all you see is the complete exterior structure.
Before adding a camera to the scene, you can
hide the roof to show the interior.
3. Click the Attach This File button and click
1. From the Main Toolbar, click the
OK on the File Link Settings dialog.
Layer Manager button.
The model is linked into Autodesk VIZ.
The Layer Manager dialog is displayed.
6 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

2. Scroll down the list of layers and find the


Roof layer.
Notice the layer name has a plus symbol
to the left of it. This means the layer
contains at least one object.
3. Click the plus symbol to open the list of
objects associated with the Roof layer.
You’ll see one object named Layer:roof.

While you could used one of several


other methods to select and hide the roof
object, a well organized drawing utilizes
the layer system to help improve your
modeling efficiency. Proper use of layers
makes displaying and hiding objects in
the scene very fast and very easy.
If you did the same to the A-Door or
A-Wall layers, you’d see many objects on
Add a camera to the scene
each layer.
Now that you have a better view of the
4. Since the Roof layer only contains one
interior of the gallery, you’ll add a camera
object, you can hide the layer by clicking
to the scene.
on the gray dash in the Hide column.
1. Right-click in the Top viewport to make
The gray dash is replaced by a mask
it active.
symbol meaning that the layer is hidden.
If necessary, move the Layers and Extras
toolbars out of the way.

2. From the Create panel, click the


Camera button.
3. Click Target and place the base point of
the camera at the center of the gallery,
and then drag the camera target to where
stairs meet the second floor in the left
wing. Release the mouse button to finish
the camera placement.
The Perspective viewport allows you to
see that the roof has been hidden.
Lesson 1 – Review and Link the Model 7

8. Click the Select And Move button


and pick the Camera.
4. Right-click to end the Target Camera
command. 9. Right-click the Select And Move button
to display the Move Transform Type-In
5. Right-click in the Perspective viewport
dialog.
and press the C key.
Note: The Select And Move button must
The view will change to what you’re
be turned on before you can enter data
seeing through the camera you just placed.
into the Transform Type-In dialog. The
same is true for Select And Rotate and
Select And Scale.

6. Right-click in the Front viewport to make


it active. 10.In the Offset:World group, enter 6’0” in
You’ll work in this viewport to raise the the Z axis field and press ENTER.
camera and target off the floor. The camera shifts up to a more reasonable
7. Open the Reference Coordinate System vantage point as shown in the Camera
list and change the setting from View to viewport.
World.
This ensures that the Z axis is associated
with vertical movement in any viewport
you work in.
8 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

2. Scroll down the list of layers and find the


11.With the Camera selected, right-click in Roof layer.
the viewport and choose Select Camera 3. Click the mask symbol in the Hide
Target from the quad menu. column.
12.In the Move Transform Type-In dialog,
The gray dash reappears and the layer is
enter 10’0” in the Offset:World Z axis field unhidden.
and press ENTER.
Render the scene
With the model linked and a camera placed
in the scene, you can now create a test render
to see if the camera’s placement is suitable.
1. On the main menu, choose Rendering >
Environment.
The Environment and Effects dialog is
The camera and its target are now displayed.
positioned and you can create a test render
of the scene. 2. Turn off the Active switch in the Exposure
Control rollout.
Unhide the roof Before producing a test render, you need
Before test rendering the scene, make sure to turn off the Exposure Control or the
the roof layer is unhidden. scene will appear to be too bright.
3. Close the Environment and Effects dialog
1. From the main toolbar, click the Layer and choose Rendering > Render from the
Manager button. main menu.
4. In the Output Size group, click the 320x240
rendering preset button.
Tip: You want your test rendering to be
fast, so use lower resolution settings.
Increase the resolution for final renderings
that you’ll present to your clients.
Lesson 2 – Add Materials to the Gallery 9

5. At the bottom of the Render Scene dialog, 9. From the main menu, choose
change the viewport setting to Camera01 File > Save and save the scene as
and click Render. myTulipGallery1.max.
This is the result you get using the Default
Scanline Renderer.
Lesson 2 – Add Materials to the
Gallery
Now that the model is linked to
Autodesk VIZ and you have a camera
positioned in the scene, it’s time to start
creating and applying materials. For this
lesson, you’ll use the Material Editor to
create a series of mental ray materials that
you’ll apply to the scene.
mental ray materials can be used in three
forms:

6. In the Render Scene dialog, scroll down


• mental ray “phenomena”, or pre-made
and open the Assign Renderer rollout. collections of mental ray shaders such as
the DGS and Glass material.
7. Click the Choose Renderer button and
pick mental ray Renderer from the Choose • a mental ray material. This is an empty
Renderer dialog and then click OK. shell into which individual shaders can
be placed to identify all aspects of the
8. Click the Render button again. material’s properties such as surface,
Both images are pretty similar, but that shadow, displacement, etc.
will change when you apply mental ray • standard materials with mental ray
materials to the scene. You’ll use the shaders. All standard materials can be
mental ray Renderer for the remainder of enhanced by adding shaders via the
this tutorial. mental ray Connection rollout.
mental ray materials allow you to specify a
number of Material and Advanced Shaders.
But what exactly is a shader? A shader is
essentially a way of controlling how an
object’s material will behave when rendered.
The parameters of different shaders let you
specify a diffuse or specular component
as well as brightness, transparency, and a
number of other settings. These combine
with the light(s) in the scene to produce the
final rendered appearance.
10 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

Set up the lesson:


Before you start to make materials for the
model, you need to activate the mental ray
extensions.
1. Continue from the previous section or
start Autodesk VIZ and choose File >
Open.
2. Browse to the \tutorials\gallery
folder on your hard drive and open
tut_tulipgallery_no_materials.max.
3. From the main menu, choose Customize
> Preferences and then open the mental
ray panel. Create materials for the scene
4. In the General group, make sure that Notice that each object in the scene
Enable mental ray Extensions is turned on. uses the layer color set in Architectural
Desktop. While you can use some standard
5. Click OK to close the Preferences dialog.
Autodesk VIZ materials, you also want to
6. On the main menu choose Rendering > take advantage of the flexibility and control
Render to open the Render Scene dialog. that mental ray shaders provide.
7. Open the Raytracer panel and turn off the
Show Progress Dialog and Show Messages
switches at the bottom of the Raytracer
Global Parameters rollout.
Doing this turns off a pair of extra dialog
boxes that clutter the user interface while
you’re rendering.
8. Open the Common panel and then open
the Assign Renderer rollout.
9. Click the Choose Renderer button and
select mental ray Renderer from the
Choose Renderer dialog and the click OK. Begin by looking at all the different surfaces
in the scene, and thinking of what kind of
material each surface should have. So far,
the scene has no lighting other than the
Autodesk VIZ default lighting. Materials
that are applied to the scene may require
adjustment once you start adding lights.
Now, let’s go through the steps of creating
materials for the gallery.
Lesson 2 – Add Materials to the Gallery 11

Create the Wall material:


The first material you’ll create is a simple,
white, matte material that will be assigned
to the walls of the gallery. You’ll create this
using a mental ray DGS material.
Tip: For more information regarding the DGS
Material, refer to the “DGS Material (mental
ray)” topic in the Autodesk VIZ 2005 User
Reference.
The DGS material allows you to specify the
Diffuse, Glossy and Specular components of
a material. Diffuse sets the diffuse color, or
the color the object reflects when it’s been
illuminated. Glossy sets the color of glossy
reflections. Specular sets the color of the
mirrored reflections.
Note: If Specular is set to white, the material
becomes 100% reflective – like a mirror.
If Specular is set to black, reflection is
eliminated.

1. From the main toolbar, open the


Material Editor.
3. In the Basic Shaders group of the Material
Tip: You can also open the Material Editor
Shaders rollout, click the Surface map
by pressing the keyboard shortcut, M.
button.
2. With the first sample slot selected,
It currently shows None.
click the material type button to open
the Material/Map Browser dialog and
double-click mental ray.
By default, the material type button is set
to Architectural.
Note: The mental ray materials are not
4. When the Material/Map Browser
listed unless you assign the mental ray opens again, double-click DGS Material
Renderer in the Render Scene dialog. (3dsmax).
12 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

7. With the Color Selector dialog still open,


click the dark gray color swatch next to
Glossy Highlights in the Material Editor.
Change the Value setting in the Color
Selector dialog to 0.0.
Repeat this setting for the Specular value
as well.
8. Since you don’t want the wall to be
reflective, set the Shiny value to 0.0.
Tip: To quickly zero out a value that can be
set by spinner arrows, place your cursor
over the spinner and right-click.

9. Close the Color Selector dialog and


click the Go To Parent button.
5. In the DGS Materials (3dsmax) Parameters
rollout, click the dark gray color swatch 10.Change the material name from 01 -
next to Diffuse. Default, to MR_white_matte.
This opens the Color Selector: diffuse 11.Press the H key to open the Select Objects
dialog. dialog and choose Layer:Exterior_wall
and then click the Select button.
12. In the Material Editor, click the Assign
Material To Selection button.

Make a test render:


1. From the main menu, choose Rendering
> Render.
2. Make sure the Output Size is set to 320x240
and the Viewport is set to Camera01.
6. Change the Value setting to 1.0.
3. Click the Render button.
This results in a pure white color.
Make sure the curved wall to the left has
accepted the white material.
Lesson 2 – Add Materials to the Gallery 13

4. Choose File > Save As and save the scene


as myTulipGallery2.max.

Create the Ceiling material:


The next material you’ll create is going to
be applied to the ceiling of the gallery. This
material will utilize a texture map that shows
acoustical tiles.
1. Click the top, middle sample slot in the
Material Editor.
2. Click the material type button to open the
Material/Map Browser dialog and turn 3. In the Files group, click Open and choose
on Mtl Library in the Browse From group. architectural.materials.finishes.mat located
in the \autodesk viz 2005\matlibs folder.
The architectural finishes library is opened
in the Material/Map Browser. This
library contains a number of convenient,
architectural materials that increase the
speed in which you can dress up a scene.
14 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

requires mapping coordinates, or perhaps


both.

Add mapping coordinates and set the tiling:


The first thing check when a texture map
is not showing up properly on an object
is the mapping coordinates. If mapping
coordinates are present, then you need to
start checking the material that is applied to
the object.
1. Minimize the Material Editor and open
the Modify panel.
4. Choose The Layer:roof object is still selected and is
Finishes.Ceiling.Acoustical.Tile.Exposed listed as Linked Geometry in the Modifier
.Grid.2x2.Fissured.White (Architectural) Stack. It has no mapping coordinates.
and click OK.
Tip: You can resize the Material/Map
Browser so you don’t have to scroll the
material list.
5. Press the H key to open the Select Objects
dialog again and choose Layer:roof and
then click the Select button.
6. In the Material Editor, click the Assign
Material To Selection button.

7. Click the Quick Render button to


create another test render. 2. Open the Modifier List and apply the
Note that you don’t see any actual tiles UVW Map modifier.
yet. This usually means the tiling setting
for the texture map is too low, the object
Lesson 2 – Add Materials to the Gallery 15

3. In the Parameters rollout, make sure


Planar is active in the Mapping group.

Tip: If you want to see the bitmaps


of materials in the viewport, turn on the
Show Maps In Viewports button in the
Material Editor.

4. Click the Quick Render button.


Now you can see part of the texture map
on the ceiling but it is way too big. 7. Minimize the Material Editor and
click the Quick Render button.
Now the acoustical tile texture map is
displayed properly.

5. Restore the Material Editor and click


the Diffuse Map button in the Physical
Qualities rollout.
Although you could have created the
same material using a mental ray material
with appropriate shaders, it was faster
and easier to use a pre-made Architectural
Material.

Create the Floor material:


To create the flooring material, you’ll use
another pre-made Architectural material.
You’ll also improve it by adding bump and
displacement mapping.
6. In the Coordinates rollout, change the U 1. Restore the Material Editor and click the
and V tiling to 16. top, right sample slot.
2. Click the material type button to open the
Material/Map Browser dialog again.
16 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

3. This time, choose


Finishes.Flooring.Tile.Diamond.Red
(Architectural)

7. Minimize the Material Editor and


apply a UVW Map modifier to the
Layer:floorplane object.
8. Make sure its mapping is set to Planar.
9. Restore the Material Editor and click
the Diffuse Map button in the Physical
Qualities rollout.
10.In the Coordinates rollout, change the U
and V tiling to 18.

11. Click the Quick Render button again.


The floor tile texture map is displayed, but
still looks like a smooth sheet of glass.

4. Press the H key to open the Select Objects


dialog and choose Layer:floorplane and
then click the Select button.
5. Click the Assign Material To Selection
button.

6. Click the Quick Render button to


create another test render.
You get a highly reflective floor but no
tiles are rendered.

Improve the Floor material - Bump map:


Now, you’ll give the floor material greater
realism by adjusting the bump map.
Lesson 2 – Add Materials to the Gallery 17

1. Click the Go To Parent button and


open the Special Effects rollout.
This material already has a bump map
added but it’s not rendering as expected.

2. Click the Bump map button to access its


bitmap coordinates and set the U and V
tiling to 18 so it matches the tiling of the
Diffuse bitmap.

3. Click the Quick Render button.


There’s a slight improvement, but still not
what you want.

6. When asked if you want to keep or discard


the old map, choose Keep Old Map As
Sub-Map and click OK.
The original bump map is automatically
placed in the Color #1 slot but you’ll now
change the texture map to one that has
been improved.

4. Click the map type button to open the


Material/Map Browser dialog. The
current map type shows Bitmap.
5. In the Browse From group, turn on New
and double-click Mix in the map list.

7. Click the Map button for the Color #1


slot to access the coordinates and bitmap
parameters for the map.
18 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

8. In the Bitmap Parameters rollout, click


12. Click Go To Parent again and set the
the Bitmap button that shows the current
Mix Amount to 30.
texture map.
This produces a blending of the Color #1
The Select Bitmap Image File dialog is
and Color #2 mapping channels.
displayed.

13. Click the Go To Parent button again


and set the bump amount to 5.

14. Click the Quick Render button.


9. Browse to the \tutorials\ This rendering shows wider grout lines,
gallery folder and double-click per the enhanced bump map, and the
Finishes.Flooring.Tile.Diamond.Red.bump noise results in more distortion in the
.Enhanced.jpg. stairway and statue reflections in the floor.
This texture map has wider grout lines
separating the tile and will produce a
more distinct appearance to the tiles.

10. Click the Go To Parent button and


then click the Map button for the Color
#2 slot. Double-click Noise from the
Material/Map Browser.
11.In the Noise Parameters rollout, set the
Size to 250.
Lesson 2 – Add Materials to the Gallery 19

Improve the Floor material - Displacement map:


With the bump map adjusted, you will
now add further detail by incorporating a
displacement map.
1. In the Special Effects rollout, click the
Displacement map button.

7. In the Physical Qualities rollout, reduce


2. In the Material/Map Browser, double-click the Shininess setting to 50 to further
Bitmap. reduce the reflection in the floor.
The Select Bitmap Image File dialog is 8. Render the scene again.
displayed.
3. Browse to the \tutorials\
gallery folder and double-click
Finishes.Flooring.Tile.Diamond.Red.bump
.Enhanced.jpg.
4. In the Coordinates rollout, set the U and V
tiling to 18 so it matches the tiling of the
Diffuse and Bump bitmaps.

5. Click the Go To Parent button and set


the Displacement amount to 0.2.

9. Choose File > Save AS and save your


scene as myTulipGallery3.max.

Create the Curtain Wall material - Frame:


The Curtain Wall is going to consist of two
different materials. One material for the
6. Click the Quick Render button. structural frame and another for the glass
By adding a displacement map with panels. Both of these will be created using
a low setting, you introduce a little the DGS Material. Start with the framing
roughness to the floor, giving it a more material.
worn appearance. 1. Click the lower left sample slot in the
Material Editor.
20 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

2. Click the material type button to open the


Material/Map Browser and double-click
DGS Material (physics_phen).
3. Click the Diffuse color swatch to open the
Color Selector: diffuse dialog and then
right-click the spinner arrows to the right
of the Value field.
This automatically sets the Value setting
to zero, or black.
4. In the Material Editor, click the Specular
color swatch.
The Color Selector dialog changes to
control the Specular color. 8. Click the Assign Material To Selection
5. Change the Value setting to .15 to produce button.
a dark gray color.
9. Render the scene.
This will result in some shiny reflections
If you render at a higher resolution,
in the rendered image.
you’ll notice some speckling/noise on the
Note: Remember that the Specular color surface of the platform. This effect is due
controls the mirrored reflections. If the to the nature of glossy highlights, which
Specular color is set too high, the rails handle noise from the specular reflection.
will appear light-grey because they
reflect more light. If set to zero, or black,
reflection is eliminated.
6. Close the Color Selector dialog and set
the Shiny value in the DGS Material
(physics_phen) Parameters rollout to 15.
7. Press the H key to open the Select
Objects dialog and select the Curtain
Wall <Standard> Default Frame object.
Hold down the CTRL key and also
select the Curtain Wall <Standard>
Mullion, Layer:A-Glaz-Curt and
Layer:Rope-Platform objects and then 10.To reduce the speckling/noise, click the
click the Select button. Glossy Highlights color swatch and set its
Value to black.
Lesson 2 – Add Materials to the Gallery 21

If there is still speckling/noise, you


can increase the Shiny setting until the
phenomenon goes away.
11.Rename this material as Shiny Black. 6. Click the Go To Parent button and
name this material Glass Infill.
Create the Curtain Wall material - Glass: 7. Click the shader button next to Shadow
With the material for the structural frame and double-click Shadow Transparency
complete, now you’ll make the material for (base).
the glass panels. The type of glass material This shader allows a light source that’s
you make depends on the look that you’re placed outside the building to cast
trying to produce. For a simple glass, you shadows through the glass on to surfaces
could use the Glass (physics_phen) material, that are inside the structure.
but that won’t give you the right amount
8. In the Shadow Transparency (base)
of reflection. For this scene, you’ll create
Parameters rollout, click and drag the gray
something with a bit of reflectivity so that
Color swatch over the black Transparency
you can see some nice reflections of the stair
color swatch and then click Swap in the
rails.
Copy Or Swap Colors dialog.
1. Click the lower, middle sample slot in the
9. Press the H key to open the Select
Material Editor.
Objects dialog and select the Curtain Wall
2. Click the material type button to open the <Standard> Default Infill object.
Material/Map Browser and double-click
mental ray. 10. Click the Assign Material To Selection
3. Click the shader button next to Surface
button in the Material Editor.
and double-click DGS Material (3dsmax).
11. Render the scene.
4. In the DGS Material (3dsmax) Parameters
rollout, set both the Diffuse and Glossy
Highlights colors to black and the Specular
color to white.
5. Set Shiny to 0 and Transparency to .75.
22 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

shadow casting lights and begin using global


illumination settings for your light sources.

Set up the lesson:


1. Start Autodesk VIZ, and choose File >
Open.
2. Find the \program files\autodesk
viz 2005\tutorials\gallery folder
on your hard drive and highlight
tut_tulipgallery_full_materials.max, then
click Open.

12.Choose File > Save As and save your scene


This is a version of the gallery model that
as myTulipGallery4.max. has all of its materials assigned.

Now you’ve got a good idea of how to create Create an External Light Source – the
and work with mental ray materials. In the Sun
next lesson, you’ll start adding lights to see
Since mental ray does not support
how they effect your scene. Once lights are
Autodesk VIZ’s Daylight system. In this
added, you may have to adjust some of the
lesson you will create a single, very powerful
materials that you created in this lesson.
light source, a Target Direct light, to emulate
the Sun.
Lesson 3 – Add Lights to the 1. Right-click in the Top viewport to make
Gallery it active.

With materials applied to the model, you 2. On the Create panel, click the Lights
start to get a better idea of how the model
button.
will look when it is completed. Lighting is
another factor in making a truly realistic 3. Create a Target Direct light, placing the
looking rendering. In this lesson, you’re light outside the building near the tip of
going to add a background map and new the second finger and aiming the target
lights to the scene. into the space you’ve been studying.

For this scene, you will use two types of


lighting. One type is external light to act as
the Sun. The other is internal lighting, or
artificial lighting designed for indoor spaces.
The lighting you’ve witnessed in the scene
up to this point is the Autodesk VIZ default
lighting.
Note: Keep in mind that rendering times
will greatly increase as you add more
Lesson 3 – Add Lights to the Gallery 23

Note: When you first add the light, the


default shadow type is Advanced Ray
Traced. mental ray does not support this
shadow type so it is necessary to change
to Ray Traced Shadows. Ray Traced
Shadows is the only Shadow generator
that supports transparency or shadows
cast through transparent objects.
7. In the Intensity/Color/Attenuation
rollout, make sure the Multiplier is set to
1.0.
8. In the Directional Parameters rollout,
4. Click the Select And Move button. set the Hotspot/Beam to 25’ and the
5. Right-click the Select And Move button to Falloff/Field to 65’.
open the Move Transform Type-In dialog
and enter following X, Y and Z settings in 9. Right-click the Camera01 viewport
the Absolute:World group. to make it active and then click the Quick
Render button.
• X: = 1’0”
Even though you’ve added a light source,
• Y: = 208’0”
your rendering is virtually black. You can
• Z: = 45’0” see some shadows on the left-hand wall
Note: Your Dolly setting may be slightly but otherwise, a black rendering. There
different because that value is set by the are a number of adjustments you need to
placement of the light’s target. Since make before the scene renders correctly.
this light is acting as the Sun, the target
placement does not need to be that precise.

Set the Background Map


6. Open the Modify panel and in the
General Parameters rollout > Shadows To add more realism to the scene, you’ll
group, open the Shadows drop down list now add a background map so you have an
and then choose Ray Traced Shadows. environment outside the building.
24 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

1. On the main menu, choose Rendering > 6. In the Environment And Effects dialog,
Environment. click and drag the Sky.jpg bitmap into a
2. In the Exposure Control rollout, turn blank sample slot in the Material Editor.
on the Active switch so Logarithmic When the Instance (Copy) Map dialog
Exposure is calculated. appears, choose Copy and click OK.

Logarithmic Exposure Control uses 7. In the Coordinates rollout of the Material


brightness, contrast, and whether Editor, make sure Environ is active and
the scene is outdoors in daylight to the Mapping is set to Screen.
map physical values to RGB values. 8. Do another test render.
Logarithmic Exposure Control is better for The room is still quite dark, but you can
scenes with a very high dynamic range. see the world outside.
Note: The mental ray renderer supports
only the Logarithmic and Pseudo Color
exposure controls.
3. In the Background group, click the None
button under Environment Map. Choose
Bitmap from the Material/Map Browser
and then pick c:\program files\autodesk viz
2005\tutorials\gallery\sky.jpg.

4. Open the Material Editor, if it’s not


already open.
5. Right-click any of the material spheres
and choose 5x3 Sample Windows from the 9. On the Environment And Effects dialog,
flyout menu. in the Logarithmic Exposure Control
Parameters rollout, set Brightness to 90.
You’re going to be working between the
Environment And Effects dialog and the By controlling the brightness from the
Material Editor so having extra available Logarithmic Exposure Control Parameters
sample slots is handy. rollout, you affect the entire scene instead
of only the area where the light is shining.
10.In the Intensity/Color/Attenuation
rollout on the Modify panel, turn down
the light’s Multiplier value to 0.25.
The Multiplier value affects only where
the light is shining. Since a majority of the
building is outside the falloff range of the
light, most of the building would remain
in darkness.
11.Click the Quick Render button again.
Lesson 3 – Add Lights to the Gallery 25

interior lighting so you can see the effect that


photon emitting lights have in the scene.
Keep in mind that rendering time will
increase because Global Illumination is going
to be calculated.

Turn on global illumination:


1. From the main menu, choose Rendering >
Render and open the Indirect Illumination
panel.
2. Turn on Enable in the Global Illumination
12.Save your scene as myTulipGallery5.max. group.

The exterior lighting is set. Next you’ll learn When turned on, the mental ray renderer
about global illumination and add some calculates global illumination.
interior, artificial lighting. 3. At the bottom of the Photons (Caustics &
GI) group, turn on All Objects Generate
Understanding Global Illumination And Receive Caustics & GI.
Before adding artificial light sources inside
the gallery, you need to know a little bit about
Create Artificial Lights – Interior
Lighting
Global Illumination (GI). Global Illumination
is a method of simulating all the light in a For accurate interior lighting, you will use
scene – direct and indirect. photometric lights from ERCO. Photometric
lights use accurate light values, so that you
In a traditional scene, illumination is usually
can approximate how the scene will actually
provided by light objects, spot lights,
look. You can create your own color, wattage,
omni lights, etc. Global Illumination uses
and other characteristics, or you can use
light-emitting and light-receiving surfaces to
actual data from lighting manufacturers, like
create a more realistic feel. In the real world,
ERCO.
light that comes in a window is bounced
off of tables, walls, and other surfaces to Add an interior light using the Asset Browser:
give a room a soft, warm feel; GI simulates
this effect. Photons are emitted by light The main lighting in this scene is supplied by
sources and are affected by everything in the the ERCO 75580.023.03 Luminaire. This light
scene. Some photons are absorbed by the combines two files: the .max file containing
objects they hit, while others are reflected the mesh geometry and luminaire of the light
and refracted. Those that are reflected or fixture, and the IES file containing the actual
refracted off of objects continue on to strike lighting data.
other nearby surfaces.
1. Open the Utilities panel and
So far, the renderings you’ve made do not click on the Asset Browser. Browse to
include GI. Now, you’ll turn on GI and add the \tutorials\gallery folder and select
26 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

ERCO_VIZ4_75580023_1xPAR56_300W_ a Filter Color, in case you want a colored


37deg_18deg.max. light.

Position the light:


You’re going to place three lights in the
ceiling below the second floor to light up the
bank of doors. You will also have to stretch
out the targets so light is properly spread
throughout the area.

1. With the light selected, click the


Select And Move button, if it’s not already
turned on, and then right-click the Select
And Move button to open the Move
Transform Type-In dialog.
2. In the Absolute:World group, make the
2. Left-click and drag the model into the
following settings:
Top viewport and then choose Merge File.
Click OK on the Merge:Raytrace Global • X: = -25’0.0”
Tracks dialog without changing the tracks • Y: = 135’10.0”
setting.
• Z: = 19’10.0”
Note: Since you’re working with the
Note: Be aware that the X: position is a
mental ray renderer, the tracks setting is
negative value.
irrelevant for this tutorial.
This places the first light on the ceiling
below the second floor near the left-hand
wall.

3. Right-click in the Top viewport


to make it active and Region Zoom to
encompass the entire second floor area.
After zooming in, right-click to end the
Region Zoom operation.

3. Click to place the light in the scene and


then minimize the Asset Browser.

4. Open the Modify panel and note the


Luminaire Parameters rollout includes a
Dimmer, for altering the light level, and
Lesson 3 – Add Lights to the Gallery 27

Tip: With Instance turned on, you can


control all three lights simultaneously. If
you want individual control of each light,
you would turn on Copy in the Object
group.
6. Press the H key to open the Select Objects
dialog and highlight the Target for each
light and then click Select.
As you’re selecting the Target objects, hold
down the CTRL key to make multiple
selections.

4. While holding down the SHIFT key, click


on the light and drag it up and to the left,
using the orange railing as a guide to
place a second light about midway along
the top railing.
5. When the Clone Options dialog appears,
set the Number Of Copies to 2, make sure
Instance is turned on in the Object group
7. In the Front or Left viewport, move
and then click OK.
the targets down to the floor.
There are now three lights spaced along
The targets control how far the light is
this portion of the ceiling.
spread, so you have to move the targets to
increase the amount of light in the room.
8. Also, move each target so light will shine
toward the doors instead of just straight
down.
Work between the Camera01 and Top
viewports to move the light targets as
shown in the following illustration.
28 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

2. Right-click in the Camera01 viewport


to make it active and click the Quick
Render button.

Render the scene with photometric lights:


Because you’re adding new lights to the Add ceiling lights above the second floor:
interior that require the calculation of Now that you have the entry door lights
photon emissions for global illumination, the placed and have done a test render, you can
rendering time is increased. Be patient while see that more lights are needed to continue
the calculations are processed. brightening the gallery. The next set of lights
This scene is going to accumulate many more will be placed on the gallery ceiling over the
lights as you progress through the tutorial second floor.
and the rendering time will keep increasing. 1. Press the H key and select the three lights
Note: Refer to the “Tips for Improving mental and their targets.
ray Performance (page 41)” topic for ideas on Tip: Select the first light, then hold down
reducing rendering time. the SHIFT key while selecting the target
1. From the main menu, choose Rendering > of the last light.
mental ray Message Window. Turn on the
Information, Progress and Open On Error
switches if they are not currently active.
As you render the scene, the information
in this window gives you an ongoing
progress report. It will also report
warnings and error messages that you can
use to help diagnose why your scene may
be taking far too long to render.
Lesson 3 – Add Lights to the Gallery 29

2. Click the Select And Move button and


in the Front or Left viewport, SHIFT-drag
the lights upward until they’re near the
ceiling.
3. Click OK on the Clone Options dialog.
4. Using the illustration as a reference,
move the targets for each light so they are
pointing down into the gallery.
You’ll have to use several viewports to
position the targets and don’t forget to
move them down to the main floor.
Add ceiling lights to the main hall:
To brighten the main hall, you need more
lights mounted on the ceiling.
1. Restore the Asset Browser and drag
another ERCO_VIZ4_75580023_1xPAR56_
300W_37deg_18deg light into the Top
viewport.
2. Merge the file and click Use Scene Material
on the Duplicate Material Name dialog.

5. Click the Render Scene button and


open the Common panel.
6. In the Options group, turn off
Displacement.
Doing this will save a little time while
you’re performing test renders.
7. Right-click in the Camera01 viewport and
the click the Render button. 3. On the Merge:Raytrace Global Tracks
dialog, click OK.
The addition of just six lights has greatly
brightened the scene. Now, more lights 4. Drag the light and place it at the foot of
are needed to brighten the foreground. the stairs, as shown.
30 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

You have seven lights running across the


main gallery.

5. In the Move Transform Type-In dialog,


make the following settings in the
9. Open the Modify panel and select
Absolute:World group.
the light and then change the Dimmer
• X: = 25’0.0” value to 60%
• Y: = 146’8.0” Because the lights are instances of one
• Z: = 30’0.0” another, a change to one light affects all
seven lights.
6. Select the target for the light and change
the Z: position setting to 10’0.0”.
10. Select the target for the light at the
7. Select the light again and SHIFT-drag the foot of the stairs and move it so it shines
light down and to the right, near the end about a third of the way up the stairs.
of the stair rail, as shown.

8. In the Clone Options dialog, change the


Number Of Copies to 6 and click OK.
Lesson 3 – Add Lights to the Gallery 31

11.Move the target for the next light so it’s


pointing about two thirds of the way up
the stairs.
Remember to move it in both the Top and
Front viewports so the target is above the
stairs.
12.Move the target for the third light so it’s
over the top of the stairs.
The targets for the first three lights should
closely match the illustration.

15. Right-click in the Camera01 viewport


and then click the Quick Render button.
The rendering is getting better but it’s still
too dark at the bottom of the steps. The
walls along the left and under the stairs
could also use some accent lighting.

13.Move the target for the fourth light to


brighten the foreground in front of the
stairs.

16.Save the scene as myTulipGallery6.max.

Add an accent light:


To brighten up the walls, you’re going to
merge another ERCO light into the scene.
14.Move the targets for the remaining three
This one is an accent light that is mounted
lights to wash across the foreground as
to the wall.
shown.
1. Restore the Asset Browser and drag the
ERCO_VIZ4_85024023_1xT4_90W.max file
into the scene.
32 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

2. Choose Merge File from the flyout menu


and click Use Scene Material when you
see the Duplicate Material Name dialog.
3. On the Merge:Raytrace Global Tracks
dialog, click OK.
4. Drag the light into the Top view and place
it by the corner at the foot of the stairs.

10.Decrease the Dimmer setting to 50%

11. Right-click in the Camera01 viewport


and then click the Quick Render button.

5. Minimize the Asset Browser.


6. Turn on the Select And Move button and
then right-click the button to open the
Move Transform Type-In dialog.
7. In the Absolute:World group enter the
following:
• X: = 22’6.0”
• Y: = 156’5.5”
• Z: = 9’0.0”
Add more accent lights:
8. Click the Select And Rotate button. With the addition of the accent light, you
The Move Transform Type-In dialog should add more to the walls under the
changes to the Rotate Transform Type-In stairway and along the curved wall on the
dialog. left.
9. In the Absolute:World group enter a Z:
1. Select the accent light,
rotation of -35.0 degrees.
ERCO.85024.023, and turn on the
Select And Move button.
Lesson 3 – Add Lights to the Gallery 33

2. SHIFT-drag the light to the left, between


the doors and the first sculpture as shown
in the illustration.

Final Gather:
The scene lighting is complete but you
have only been using global illumination
3. Click OK on the Clone Options dialog. processing for your renderings. global
Illumination calculations, by themselves
4. Use Move and Rotate tools to can cause rendering artifacts such as dark
position and orient the light on the curved corners and the mottled appearance you see
wall. on the ceiling and walls.
5. Click the Move button and SHIFT-drag You can solve this by turning on Final
the light to the right and place it between Gather in the Indirect Illumination panel of
the first and second sculptures. the Render dialog. Final Gather increases
6. Move and Rotate the new light against the number of rays that are used in the
the wall. GI calculations, and will give surfaces a
smoother finish.
7. Repeat these steps to place lights between
each sculpture and along curved wall on Note: Since Final Gather increases the
the left. number of rays used for global illumination
processing, the rendering time is going to
8. Right-click in the Camera01 viewport greatly increase.
and then click the Quick Render button.
The addition of the accent lights give the 1. If it’s not already open, click the
scene greater detail. Render Scene button and then open on the
Indirect Illumination panel.
2. In the Final Gather group, turn on the
Enable switch and then click Render.
Tip: Turn on Fast Lookup and Preview to
quickly preview the scene when using
Final Gather. When these switches are
turned on, the regathering process is sped
up to reduced the overall rendering time.
34 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

Now the mottled appearance is corrected.


Lesson 4 – Stylize the Rendered
Output
The mental ray features and shaders
included in Autodesk VIZ offer many ways
that you can enhance, or completely change,
the quality of your final renderings. This
lesson covers some examples of how you can
further stylize your rendered output.

Set up the lesson:


1. Start Autodesk VIZ, and choose File >
Open.
3. On the Render Scene dialog, click the 2. Find the \program files\autodesk
Common panel and turn on Displacement, viz 2005\tutorials\gallery folder
if you previously turned it off to reduce on your hard drive and highlight
render time, and then click the Render tut_tulipgallery_final_lights.max, then click
button. Open.
Displacement was turned off earlier in the This is a final version of the gallery model
tutorial to reduce render time a little bit. that has all of its materials assigned and
With displacement turned on, you can all of the lighting in place.
see that floor no longer looks like a sheet
of glass. Pencil Rendering
Using this technique will give you a
hand-drawn rendition of the gallery as if you
had used a pencil.

1. Open the Material Editor and click to


the fourth sample sphere on the bottom
row.

4. Save your scene as myTulipGallery7.max.

If you’d like, compare your scene with the


sample file, tut_tulipgallery_final_lights.max
that can be found in the \program
files\autodesk viz 2005\tutorials\gallery folder
on your hard drive.
Lesson 4 – Stylize the Rendered Output 35

2. Click the material type button and select 9. In the Instance (Copy) Material dialog,
Standard from the Material/Map Browser. make sure Instance is active and click OK.
3. Click the gray color swatch next to the 10.In the Render Scene dialog, open the
Diffuse color in the Blinn Basic Parameters Indirect Illumination panel and turn off
rollout. Final Gather.
The Color Selector: Diffuse Color dialog 11.Click the Render button.
is displayed. Material Override allows you to render a
4. Set the Value setting to 255 and then close scene with all its materials replaced by a
the Color Selector dialog. single master material.

5. Change the material name from 18 -


Default to Override.

6. Click the Render Scene button and


open the Processing panel. 12.Save your scene as myTulipGallery8.max.

7. Scroll to the Translator Options rollout


Pen and Ink Rendering
and turn on the Enable switch in the
Material Override group. This technique renders a hidden line image
that presents a sketchy pen-and-ink look.
8. Working between the Material Editor
This format is great if you plan to plot a large
and Render Scene dialogs, click and drag
size drawing and finish the rendering by
the Override material from the Material
hand, using watercolors, markers or colored
Editor on to the None button next to
pencils.
Material in the Material Override group
on the Render Scene dialog. You’ll accomplish this by making a few
changes to the Override material you just
created.

Inked Edges of the Pencil Rendering:


1. Continue from the Pencil Rendering
section.
2. In the Render Scene dialog, open the
Renderer panel.
36 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

3. Scroll down to the Camera Effects rollout Contours render as a post-effect, so be


and turn on the Enable switch in the sure to wait for the rendering to finish.
Contours group. It looks like someone inked the edges of
your pencil rendering.

4. In the Material Editor, make sure the Note: Contours are not supported by
Override material is selected and open the Distributed Bucket Rendering (DBR). If
mental ray Connections rollout. you have access to a group of systems
that let you use DBR, you must turn off
5. In the Advanced Shaders group, click the
Distributed Render on the Processing
None button next to Contours.
panel of the Render Scene dialog. If
The Material/Map Browser is displayed. you attempt to use DBR, only the
6. Double-click Simple (contour) from the buckets rendered by the system running
list. Autodesk VIZ will show the contour
effect.

7. Change the Width setting to 0.13 and leave Pen and Ink against a White Background
the color black. Now suppose you’d like to render only the
8. In the Render Scene dialog, click the contours on a white background, suitable
Render button. for plotting.
Lesson 4 – Stylize the Rendered Output 37

1. On the Render Scene dialog, open the 7. Click the color swatch next to Background
Renderer panel, if it’s not already open. Color to open the Color Selector:
2. Scroll down to the Camera Effects rollout Background.
and click the shader button next to 8. Change the Value setting to 1.0 and close
Contour Output in the Contours group. the Color Selector dialog.
3. Double-click Contour Only (contour) in 9. In the Render Scene dialog, click the
the Material/Map Browser. Render button again.
Now you have the contours showing up
against a white background.

4. In the Render Scene dialog, click the


Render button.
You’ve got the contours, but they’re
against a gray background.

Tip: If you want heavier line work, as if you


used a broader pen tip, increase the width
setting in the Simple (contour) Parameters
rollout of the Override material.
10.Save your scene as myTulipGallery9.max.

Render an Interior Night Scene


To get an accurate impression of how much
scene lighting is actually coming from the
5. Working between the Render Scene and photometric lights, you’ll next set up and
Material Editor dialogs, click and drag the render the scene as if it were night.
Contour Only (contour) shader from the
Set up the lesson:
Render Scene dialog to the fifth sample
sphere on the bottom row of the Material 1. Reset Autodesk VIZ, and choose File >
Editor. Open Recent.
6. On the Instance (Copy) Map dialog, leave 2. Choose tut_tulipgallery_final_lights.max
Instance active and click OK. from the list.
38 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

Interior Rendering on a Moonless Night: 7. Scroll to the Final Gather group and turn
1. In the Top viewport, select the light that off the Enable switch and then click the
represents the Sun, Direct01. Render button.

2. Open the Modify panel and turn off


the On switch in the General Parameters
> Light Type group.
3. From the main menu, choose Rendering >
Environment and click the Color swatch in
the Background group to open the Color
Selector: Background Color dialog.
4. Change the Value setting to 0 and then
close the Color Selector dialog.
Tip: You can set any value controlled by
a spinner to zero by right-clicking the Interior Rendering when the Moon is Full:
spinner arrows. 1. Make sure the light, Direct01, is still
selected.
2. On the Modify panel, turn the On switch
back on in the General Parameters > Light
Type group.
3. In the Intensity/Color/Attenuation
rollout, set the Multiplier to 0.15 and then
click the white color swatch next to the
spinner arrows.
5. Turn off the Use Map switch in the 4. On the Color Selector: Light Color dialog,
Background group and minimize the make the following red, green and blue
Environment and Effects dialog. settings.
• Red = 205
• Green = 220
• Blue = 235

6. Click the Render Scene button and


open the Indirect Illumination panel.
Lesson 4 – Stylize the Rendered Output 39

5. Close the Color Selector dialog and then Set up the lesson:
click the Render button on the Render 1. Reset Autodesk VIZ, and choose File >
Scene dialog. Open.
The difference is subtle but you can see 2. Find the \program files\autodesk
where the bluish light is being cast against viz 2005\tutorials\gallery folder
the bottom of the curved wall to the left on your hard drive and highlight
and the large sculpture shows a bluish tut_tulipgallery_exterior_lights.max, then
tinge. click Open.
This scene shows a view from an exterior
camera and includes lighting around the
perimeter of the gallery.

Exterior Rendering using the Night (lume) Shader:


1. In the Top viewport, select the light that
acts as the Sun, Direct01.

2. Open the Modify panel and turn off


the On switch in the General Parameters
> Light Type group.

6. Save your scene as 3. Right-click in the Camera02 viewport


myTulipGallery10.max. to make sure it’s active and then click the
Quick Render button.
Render an Exterior Night Scene
The perimeter of the gallery is lit, but it’s
Finally, you can add a night (lume) shader as very dark. This can be improved by using
an output shader to see what the building the Night (lume) shader.
looks like at night.
Note: Night (lume) is a mental ray shader that
desaturates colors to appear more realistic to
the human eye. For instance, a bright blue
ball often appears to be a lighter turquoise
in the moonlight. Night (lume) boosts dim
lighting, so the photometric scene lights
will appear differently after a Night (lume)
shader is applied. For this reason, when
using Night (lume) for its desaturation effect,
scene lighting may need to be readjusted.
This shader approximates how people see at
night, not how a camera does, so this shader
isn’t intended for photo-realistic renderings. 4. Click the Render Scene button and
open the Renderer panel.
40 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

5. Scroll to the Camera Effects rollout and 10.In the Night (lume) Parameters rollout,
click the None button next to the Lens change the Multiplier setting to 0.8.
switch in the Camera Shaders group. This parameter sets controls how much
6. Double-click Night (lume) from the shader the dim lighting is increased.
list in the Material/Map Browser dialog. 11.On the Render Scene dialog, click the
Render button.
The lights wash the walls more evenly
with light and they are a bit brighter than
before.

7. Open the Material Editor if it’s not


already open.
8. Working between dialogs, click and drag
the Night (lume) shader from the Render You’ll also notice at the center of the
Scene dialog to an empty slot in the image, there is a half moon shaped light
Material Editor. appearing on the roof. The reason is
due to no radius being specified for the
Global Illumination group on the Indirect
Illumination panel. The default radius is
1/10th of the size of the scene. Since this
scene is large the radius is also large. The
photons that are far away contribute to
the result, and you get the half-circles.
12.On the Render Scene dialog, open the
Indirect Illumination panel.
13.In the Global Illumination group, increase
the number of Photons to 3000, turn on
Radius and set the radius size to 5’0”.
Since the radius size is being set much
smaller than the original default, you need
to increase the number of photons to make
9. Leave Instance turned on in the Instance
up for the smaller radius. By making
(Copy) Map dialog and click OK.
Lesson 4 – Stylize the Rendered Output 41

these changes you’ll remedy the half circle stored. This greatly increases rendering
problem and reduce any blotchy effects time. To avoid the slowdowns related
caused by turning on the Radius switch. to this issue, make sure that every light
14.Click the Render button. points in the direction of a surface (this
is sometimes impossible to do with
Now the half circles are gone and if the omni lights). Another way to avoid this
rendering still seems a little “blotchy”, problem is to add a big sphere around
you can increase the number of photons your entire model.
until the lighting is smoothed out.
• On the Indirect Illumination panel of the
Render Scene dialog, reduce the Photons
setting in the Global Illumination group.
When the photon count is low, the image
will have a blotchy look because, when
there are fewer photons, each one has to
count for a larger area. For previewing
global illumination, a photon setting of
100 works well. Be sure to increase the
photons for your final rendering.
• To quickly preview your scene when using
Final Gather, turn on Fast Lookup (Slower
GI) and Preview (No Precalculations) on
15.Save your scene as
the Indirect Illumination panel. When
myTulipGallery11.max. fast lookup is turned on, the mental ray
renderer computes information to speed
Tips for Improving mental ray up the regathering process. While the fast
Performance lookup computation can take a long time,
Since rendering with mental ray lights and it can greatly reduce the overall rendering
global illumination increase rendering time time.
so much, here are some things you can do With Fast Lookup turned off and Preview
that can help reduce rendering time and turned on, the test system rendered this
improve performance. scene in 45 minutes.
• Turn off options like Displacement or With Fast Lookup and Preview turned on,
Atmospherics in the Options group on the the test system rendered this scene in 32
Render Scene dialog. Make sure to turn minutes.
them back on for the final rendering.
• If you have access to several systems that
• Make sure the model has no gaps where have mental ray licenses, you can use the
photons can escape. If a light is pointed in Distributed Bucket Rendering feature to
a direction where there is no surface, the share the rendering job so it is processed
mental ray renderer might shoot photons faster. This can be turned on from the
forever. In the mental ray Messages Processing panel on the Render Scene
dialog, the mental ray renderer displays dialog.
warnings that photons are not being
42 Chapter 1: mental ray: Introduction to Materials, Shaders and Global Illumination

Summary
In this tutorial, you learned about linking a
drawing to Autodesk VIZ and how to create
and apply mental ray materials to the scene.
To further enhance the model, you added
several lights to the scene, including the use
of pre-made ERCO lighting fixtures and
photometric lighting files. You learned about
global illumination and how it improves
renderings. Finally, you learned about ways
to stylize your rendered output by choosing
different mental ray shaders.

Você também pode gostar