Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
3ds Max 6 Bible (2004).pdf
Скачиваний:
55
Добавлен:
17.08.2013
Размер:
50.02 Mб
Скачать

Chapter 43 Using Render Elements and Effects 1037

In the Focal Parameters section, if you select the Custom option, then you can specify values for the Horizontal and Vertical Focal Loss, the Focal Range, and the Focal Limit. The Loss values indicate how much blur occurs. The Focal Range is where the image starts to blur, and the Focal Limit is where the image stops blurring.

Figure 43-27 shows a beach scene created by Viewpoint Datalabs. For this figure, the Depth of Field effect has been applied using the Pick Node button and selecting some leaves on the tree. Then I set the Focal Range to 100 and the Focal Limit to 200 and set the Focal Loss values to 10 for both the Horizontal and Vertical.

Cross-

The Depth of Field and Motion Blur effects can also be applied using a Multi-Pass camera, as

Reference

discussed in Chapter 26, “Multi-Pass Camera Effects.”

 

Figure 43-27: The Depth of Field effect focuses a camera on an object in the middle and blurs objects closer or farther away.

Summary

Max’s render elements enable you to pick apart the rendering details of your scene. Render effects are useful, because they enable you to create effects and update them interactively. This gives a level of control that was previously unavailable. This chapter explained how to use render elements and render effects and described the various types.

In this chapter, you

Learned how to use render elements

Discovered how to apply render effects

Used the Lens Effects to create glows, rays, and stars

Worked with the remaining render effects to control brightness and contrast, film grain, blurs, and more

The next chapter delves into one of the advanced topics of 3D graphics — raytracing. It also covers the amazing mental ray rendering engine.

 

 

 

Raytracing and mental ray

When computer-generated 3D images started to appear, it was the raytraced images that really got the wow factor. These

images were amazing in their clarity and perfect in reflecting and refracting light through the scene. Raytracing isn’t new in Max, but making sense of all the raytracing features can be confusing.

To help you generate raytraced scenes, you can use the mental ray rendering engine. This engine takes the rendering in Max to a new level, enabling you to render your scenes with amazing accuracy.

Raytracing in Max can be used with the Default Scanline Renderer using the traditional Raytracing materials and controls, or it can be enabled at the renderer level using the mental ray settings.

Understanding Global Raytracing

Settings

Using the Default Scanline Renderer, raytracing is added to a scene to be rendered by applying the Raytrace material found in the Material Editor. Applying a raytrace material to an object sets the local raytracing parameters for the object that the material is applied to, but other settings determine how the raytracing is applied globally to a scene. These settings are found in the Raytracer Global Parameters rollout of the Raytracer panel of the Render Scene dialog box, shown in Figure 44-1. You access it directly using the Rendering Raytracer Settings menu command.

Note

The Raytracer Settings and Raytrace Global Include/Exclude options

 

in the Rendering menu are available only if the Default Scanline

 

Renderer is assigned in the Render Scene dialog box.

44C H A P T E R

In This Chapter

Learning the global raytracing settings

Exploring the raytrace material

Using raytrace maps

Enabling the mental ray renderer

Understanding shaders

Creating caustic and global illumination lighting

1040 Part X Rendering

Figure 44-1: The Raytracer Global Parameters rollout includes raytracing settings that affect the entire scene.

Figure 44-2 gives you an idea of what is possible with the raytrace settings. The scene includes several simple spheres with a bumpy Raytrace transparent material applied. The image on the left was rendered without enabling Raytracing, and the image on the right has Raytracing enabled. Notice that the reflections are much more pronounced in the raytraced image.

Figure 44-2: This simple scene of transparent spheres was rendered without raytracing (left) and with raytracing (right).

Controlling the raytracer

Suppose you have a scene with two mirrors that face one another. If the raytracer is allowed to track the bouncing of light rays through the scene, then it never completes because some light rays would bounce back and forth off the mirrors and never end.

The Maximum Depth setting tells the raytracer how long to follow each ray, or you can set a Cutoff Threshold. (Lower numbers speed up render times at the expense of quality.) You can also specify a color (or select to use the background color) to use for rays that reach the Max Depth, which is useful for identifying lost rays. Lost rays are raytraced lines that don’t bounce as expected and can result in a less-than-accurate solution.

Chapter 44 Raytracing and mental ray 1041

Caution

The movement of a ray through the scene depends on the face normals. If the normals are

 

flipped or pointing in the wrong direction, then the results are unpredictable.

The Global Ray Antialiaser group includes a drop-down list with two options: Fast Adaptive Antialiaser and Multiresolution Adaptive Antialiaser. These two options open separate dialog boxes, shown in Figure 44-3. The Fast Adaptive Antialiaser is quicker than its partner and offers settings for Blur and Defocus. The Multiresolution Adaptive Antialiaser takes much longer than the other option, but you can limit it with the Threshold and Max Rays values.

Note If SuperSampling is enabled for a local raytracing material, then enabling a raytracing antialiasing option isn’t needed, and vice versa, unless you want to apply a blur or defocus effect.

Figure 44-3: Additional anti-aliasing settings are available by clicking the button to the right of the drop-down list.

The Options section includes settings to Enable Raytracing, enable Raytrace Atmospherics, Enable Self Reflect/Refract, and Reflect/Refract Material IDs. There are also options to render the objects contained within raytraced objects, to render Atmospheric effects within raytraced objects, and to enable Color Density and Fog Effects. The Show Progress Dialog and the Show Messages options let you see the progress of the raytracing engine along with any messages that the raytracing image may output. Figure 44-4 shows an example of the Message dialog box. This dialog box contains some useful information, including the total number of rays traced. From this info, you can determine whether the number of rays is too many or not enough.

Raytracing can take a long time, but the Acceleration Controls (opened by clicking the Acceleration Controls button), shown in Figure 44-5, offer you several raytracer options that can control the speed of the process. These settings override the existing settings. Before sending rays into the scene, the scene is subdivided into a tree of nodes called a voxel tree. The complexity of this voxel tree determines the how long the raytracing solution takes. The Face Limit is the number of faces to include in a voxel node before subdividing. The Balance value defines how the scene gets subdivided. The Max Division sets the size of the voxel subdivisions, and the Max Depth value limits how many times a subdivision takes place.

1042 Part X Rendering

Figure 44-4: The Raytrace Messages window outputs all the data from the raytracing engine.

Figure 44-5: The Raytracing Acceleration Parameters options control the speed of the raytracing by limiting the number of faces and divisions that must be processed.

Excluding objects

One of the easiest ways to increase the speed of the raytracer is to reduce the number of objects that it has to deal with. You open the Include/Exclude dialog box for raytraced objects using the Rendering Raytrace Global Include/Exclude menu command (or by clicking the Exclude button in the Raytracer Global Parameters rollout). From within this dialog box, shown in Figure 44-6, you can select objects to be excluded from the raytracer.

Figure 44-6: The Exclude/Include dialog box lets you select objects to be removed from the raytracer.