The Rendering Process

Rendering takes place after you have constructed a 3D model. Hopefully, the preceding chapters have given you the knowledge you need to build models you want to render.

Now it is time to look at how to set up your scenes for rendering. In general, you can follow this simple process to render your scenes:

1.
Create a view of the scene. Most of the views in AutoCAD are orthogonal, such as an SW isometric. For true realism, you must create a Perspective view by using DVIEW.

2.
After setting up the perspective, create and assign the materials in the scene. A material is a set of surface attributes that describe how that surface looks at render time. You must define these attributes and assign them to the appropriate surfaces.

3.
After you apply your materials, create lights for the scene. Without lights, you do not have any illumination or shadows in the scene. Correct placement of lights adds to the realism.

4.
After you have set up the scene, you begin to create test renderings of it. Here you make sure the materials, lights, and geometry are correct. Most of the time, you will create your test renders with the Photo Real method. You might end up creating dozens of test renders before achieving the look you want.

5.
Set up the final Photo Raytrace rendering and save the rendering to a bitmap file for printing or use outside of AutoCAD.

These are the basic steps necessary to create a rendering. Now it is time to take a closer look at each step, starting with creating a view.

Creating a View

Establishing a compelling view of the model is one of the most important steps toward creating an effective rendering. No matter how much effort and time you devote to selecting and applying materials and establishing realistic lighting, a rendering of the model from an uninteresting point of view will detract from your efforts. Put another way, an interesting or even dramatic view of the model can make the difference between an average-looking rendering and a memorable one.

During the construction of the model, you can effectively use the 3DORBIT command to view and study the various parts of the model. 3DORBIT’s ability to dynamically change the viewpoint in real time is useful because it gives you a sense of the model’s spatial relationships. For the final rendering, however, you generally will want more control of the viewpoint. Such flexibility and control are offered by the DVIEW command. Like 3DORBIT, DVIEW allows you to view the model from a perspective projection, which is almost always preferable because it is the way we view objects in the real world. In addition, DVIEW allows you to easily set and fine-tune such factors as the camera to subject distance and the field of view.

To use DVIEW to establish a perspective view of your model, you must know two things:

  • Camera point. The location in the model from which you want to be looking.

  • Target point. The location in the model that you want to look at.

As soon as you establish these points, you can adjust the perspective until you are happy with it. If you have any experience with 35mm photography, many of the terms, such as “focal length,” that are used to adjust viewing angle of the camera will be familiar to you.

Note

AutoCAD 2002’s CAMERA command prompts you for a camera point and a target point. These points only establish a vector along which the camera and target lie; you have little control over the exact placement of the actual camera position. You cannot adjust the focal length or the camera to target distance directly from within the CAMERA command. The DVIEW command gives you more control.


After you set up the view by using DVIEW, you use the VIEW command to save the view so you do not have to re-create it later.

The following exercise shows you how to set up a view using the DVIEW command. You will then save the view with the VIEW command.

Exercise 31.1 Setting Up a View with DVIEW

1.
Load the file 31ex01.dwg from the accompanying CD-ROM. The file contains a model of a 12-story office building, as shown in Figure 31.4. For reference, the roof of this building has an elevation of approximately 154 feet above ground.

Figure 31.4. A model of a 12-story office building shown in an isometric, Gouraud shaded view.


2.
From the View menu, select Shade, then 2D Wireframe. Open the View menu and choose Named Views. In the View dialog box, right-click on view AAA and choose Set Current from the shortcut menu. Click OK to exit the dialog box. The model should now resemble Figure 31.5.

Figure 31.5. A model of a 12-story office building shown in plan view.


In the next three steps, you draw the “sight line,” which will establish the viewpoint for the rendering. You place a line from the intended camera point to the target point.

3.
From the Draw menu, choose Line. When you’re prompted to specify the start point, type .XY and press Enter to indicate that you will specify the X and Y coordinates onscreen. Pick a point near in Figure 31.6. (This point should be near 163', –174'.)

Figure 31.6. The first step in establishing a view is drawing the line-of-sight from camera to target.


4.
When prompted for the Z value, type 8'5" . This establishes the camera position for the view.

5.
When prompted for the next point, again type .XY and pick a point near . (This should be near 24', 33'.) When prompted for the Z value, type 83' .Then press Enter to end the LINE command. The completed line-of-sight will resemble that in Figure 31.6. This line starts 8'5" off the ground and aims at a point a little more than halfway up the building.

In the next steps, you use the Points options of the DVIEW command to establish a view along the line-of-sight.

6.
To start the DVIEW command, at the command line, type dview and press Enter. When you’re prompted to select objects, pick only the line-of-sight line, and press Enter. Note that all the model’s objects except the line you drew in steps 3–5 temporarily disappear.

7.
Type PO and press Enter to select the Points option of the DVIEW command.

8.
When you’re prompted for the target point, use an Endpoint osnap and pick at in Figure 31.6 to specify the target end of the line. When you’re prompted for the camera point, again use an Endpoint osnap to pick at . Although all the model’s objects seem to have disappeared, DVIEW has established a view looking down the line of sight from camera to target point.

9.
Type D and press Enter to choose the Distance option of the DVIEW command. Press Enter to accept the default distance—the distance of the line-of-sight.

10.
At the next prompt, type Z and press Enter to select the Zoom option. Specify a lens length of 33 mm and press Enter. Then press Enter again to end the DVIEW command. The resulting view of the model should resemble Figure 31.7.

Figure 31.7. The view resulting from looking “down” the line of sight.


11.
To generate a better view of the building, open the View menu, choose Shade, and then choose Hidden. Figure 31.8 shows a hidden line view.

Figure 31.8. A view of the model with hidden lines removed.


12.
Use the VIEW command to save this view under the name Camera1 .

13.
Save this drawing as 31ex01a.dwg on your hard drive. You will use it in a later exercise.

The advantage to using the line-of-sight method with the DVIEW command is that you have complete control of the resulting viewpoint. Fine-tuning of distance, field of view, and target point and direction make establishing the exact view that you have in mind a straightforward matter of adjusting the line-of-sight line and then using the DVIEW command and the method in the preceding exercise to generate the view.

Note

If you’re setting up a view using the line-of-sight method, be careful when adjusting the camera-target distance. If the objects represent a ground plane, increasing the distance using the Distance option of the DVIEW command may place the camera point below this plane. This will result in a rendering in which all the model’s geometry is hidden.


Creating and Assigning Materials

After you establish a view of the model, you can begin assigning materials to the model’s surfaces. A material is a set of graphic attributes assigned to a surface. These attributes include such qualities as color, smoothness, reflectivity, texture, and transparency. When the model is rendered, the rendering engine takes into account those attributes and colors of the image accordingly.

Materials are handled through the Materials and Materials Library dialog boxes in AutoCAD 2002’s built-in rendering engine. The Material dialog box is used to assign, create, or modify materials and their associated set of attributes. The Materials Library is used to store a group of predefined materials or materials you create.

You use the Materials Library to choose materials you want to import into your model for assignment to surfaces or for use as the basis for creating a modified or new material. You access the Materials Library by choosing Materials Library from the Render toolbar, or by selecting View, Render, Materials Library, or by typing MATLIB at the Command: prompt. Figure 31.9 shows the Materials Library dialog box.

Figure 31.9. The Materials Library dialog box.


The Materials Library dialog box is divided into three main sections:

  • Current Drawing list. This lists all the materials currently loaded for use or that are assigned in the current drawing.

    • Purge. Deletes all unassigned materials from the Current Drawing list.

    • Save As. Allows you to save the current drawing list to a material library (MLI) file.

  • Preview window. This is a small window that gives you a preview of what a material would look like if you applied it to a sphere or cube object.

    • <-Import. Adds materials selected in the Current Library list to the Current Drawing list.

    • Export->. Adds materials selected in the Current Drawing list to the Current Library list.

    • Delete. Deletes materials selected in the Current Drawing list or the Current Library list.

  • Current Library list. A list of materials contained in the current library. All material libraries for AutoCAD have an .MLI extension. By default, AutoCAD ships with one library file—the Render.MLI library.

    • Open. Displays a standard file selection dialog box listing MLI files.

    • Save. Saves the changes to the current MLI file in the current folder.

    • Save As. Displays a standard file selection dialog box where you can specify the name of the materials library (MLI) file in which AutoCAD saves the Current Library list.

Note

The small preview window in the Materials Library is a 256-color display. This means the final rendering will invariably look better than this simple preview window. Keep this in mind when selecting materials. If you are not sure how a material will look, use AutoCAD 2002’s Multiple Drawing Environment to create a new drawing with a simple object in it. Use this second drawing to test how a material will appear in the larger model.


You use the Materials dialog box (shown in Figure 31.10) to manage the materials selected for use in your model. You access the Materials dialog box by choosing Materials from the Render toolbar, or by selecting View, Render, Materials, or by typing RMAT at the Command: prompt.

Figure 31.10. The Materials dialog box.


The Materials dialog box contains the following sections and buttons:

  • Materials. Lists the available materials. The default for objects with no other material attached is GLOBAL.

  • Preview. Displays a selected material on either a sphere or a cube.

  • Materials Library. Displays the Materials Library dialog box, from which you can select a material.

  • Select <. Closes the dialog box temporarily so you can select an object with the pointing device and display the attached material. After you select the object, the Materials dialog box is redisplayed with the method of attachment specified at the bottom of the dialog box.

  • Modify. Displays one of four dialog boxes, depending on which material type is selected in the list under the New button: Standard, Marble, Granite, or Wood. Use the dialog box to edit an existing material.

  • Duplicate. Duplicates a material and displays one of four dialog boxes, depending on which material type is selected in the list under the New button: Standard, Marble, Granite, or Wood. Use the dialog box to name the new material and define attributes.

  • New. Displays one of four dialog boxes, depending on which material type is selected in the list under the New button.

  • Attach <. Closes the dialog box temporarily so you can select an object and attach the current material to it.

  • Detach <. Closes the dialog box temporarily so you can select an object and detach the material from it.

  • By ACI. Displays the Attach by AutoCAD Color Index dialog box, from which you can select an ACI to attach a material to.

  • By Layer. Displays the Attach by Layer dialog box, in which you can select a layer to attach a material to.

The following exercise shows you how to load a few materials from the Materials Library and assign them to objects in a scene.

Exercise 31.2 Assigning Materials from the Materials Library to a Model

1.
Load the file 31ex01a.dwg, which you worked on in the last exercise. If you did not complete the last exercise, you can load the file from the accompanying CD-ROM. Display the Render toolbar by right-clicking on any displayed toolbar and selecting Render from the shortcut toolbar list.

2.
From the Render toolbar, choose Materials, or type RMAT at the Command: prompt. AutoCAD displays the Materials dialog box shown in Figure 31.10.

3.
Click the Materials Library button to launch the Materials Library dialog box (refer to Figure 31.9).

4.
Select the material named Blue Glass on the right.

5.
Click the Import button. This places Blue Glass material on the list of materials available for use in the current drawing.

6.
Repeat steps 4 and 5 for the Dark Brown Matte material.

7.
Click OK to return to the Materials dialog box. The materials you just imported now appear in the Materials list. The Materials dialog box should now look like Figure 31.11.

Figure 31.11. The Materials dialog box after you’ve selected materials for use in the model.


8.
Select the Blue Glass material in the list.

9.
Select By Layer and in the Attach by Layer dialog box, select the glass layer from the Select Layer list. Click Attach to attach Blue Glass material to objects on the glass layer.

10.
Repeat steps 8 and 9 to attach Dark Brown Matte material to the concrete layer. The Attach by Layer dialog box should resemble Figure 31.12. Click OK to exit the Attach by Layer dialog box. Click OK again to exit the Materials dialog box.

Figure 31.12. The Attach by Layer dialog box shows current layer/material attachments.


11.
Choose Render from the Render toolbar to display the Render dialog box. Under Rendering Type, select Photo Raytrace. Under Rendering Options, make sure the Smooth Shade, Apply Materials, and Shadows options are all selected. The settings for this rendering are shown in Figure 31.13.

Figure 31.13. The Render dialog box settings.


12.
Click Render, and the scene is rendered, as shown in Figure 31.14. Depending on your equipment, the rendering process may take a minute or two.

Figure 31.14. The rendered model with materials applied.


13.
Save the file as 31ex01b.dwg for use later.

This exercise shows that even with simple “off-the-shelf” materials and no lighting effects, effective renderings are possible. The key to such renderings is the viewpoint. In this example, a perspective viewpoint from near the ground looking upward at the building yields a lifelike view—one you might see if you were standing in front of the building.

In this exercise, you assigned materials on a “by-layer” basis. You can also assign materials on a “by-color” or “by-object” basis. The advantage to assigning materials by-layer is a more orderly material assignment process. Just as using layers in 2D drafting help you organize a drawing, placing objects in your model on layers that share a rendered material makes assigning materials much more orderly and easy. Because the “by-layer” method offers a distinct advantage, you should adopt a layer-conscious scheme as you construct a model.

Materials can be roughly divided into two categories: basic materials and mapped materials. Mapped materials make use of a bitmap, or image, to represent the color or some other attribute of a material. A brick material, for example, may have a bitmap of the brick pattern superimposed along with the other material attributes. Basic materials achieve their appearance without the use of bitmaps. Defining mapped materials may require more effort, but mapped materials can yield more realistic results with materials that exhibit prominent textures or patterns.

Basic Materials

A basic material is a simple material that does not use any sort of bitmap. Generally, these are materials that have no prominent surface textures or significant surface patterns. Examples of such materials include metals, paints, plastics, and glass.

Looking at the Modify Standard Material dialog box shown in Figure 31.15, you see the attributes you can modify. Each is briefly described in the following list:

Figure 31.15. From the Modify Standard Material dialog box, you can assign attributes to a new material.


  • Color/Pattern. This is the general color of the material. It is defined in either the RGB (Red, Green, Blue) color system or the HSV (Hue, Saturation, Value) color system. The color can also be derived from the ACI Color value of the object to which it is assigned. The Value slider is used to control the overall intensity of the color.

  • Ambient. This is the color of the material when it has a shadow cast on it. Generally speaking, this is simply a darker version of the color/pattern color.

  • Reflection. This attribute determines the amount of reflection the material has. The Value slider determines the strength of that reflection. In general, most reflections are subtle and have a value of .20 or less. The Lock check box can be used to lock all the colors together, and the Mirror check box can be used to turn the material into a mirror, based on the color. For example, a true mirror material would have Lock turned on, have Mirror turned on, and have a white Color/Pattern value.

  • Roughness. This attribute adds roughness to the material. The adjustment you make here controls the value of the roughness. The higher the value, the rougher the material appears.

  • Transparency. This attribute is used to determine the amount of light that passes through an object. For example, glass is highly transparent, whereas concrete is not. The amount of transparency is controlled with the Value slider.

  • Refraction. Refraction is the bending of light as it passes through an object. For example, if you look at a pencil in a glass of water, from the side the pencil appears bent or broken. You can set the Value slider to determine the amount of refraction.

  • Bump Map. This is the only attribute that makes reference to a bitmap. A bump map is used to make the surface of the object appear to have more detail or texture, such as mortar joints, without having to model the joints themselves. This detail and appearance of texture comes from a bitmap such as one created from a photograph of a set of bricks.

By setting one or more of these attributes, you can create just about any material you want. In the following exercise, you create a new glass material for use in the model in 31ex01b.dwg from the preceding exercise. Because the new material is a modification of an existing material, most of the material attributes will remain unchanged. Other attributes will be changed slightly to yield a more appropriate material.

Exercise 31.3 Creating a Simple Material

1.
Continue in or open 31ex01b.DWG from the preceding exercise. If necessary, display the Render toolbar. From the Render toolbar, choose Materials, or type RMAT at the Command: prompt.

2.
From the Materials list, select the Blue Glass material.

3.
Select Duplicate. AutoCAD displays the New Standard Materials dialog box.

4.
In the Material Name input box, type Dark Blue Glass .

5.
Make sure the Color/Pattern radio button is active. Verify that the ACI check box is turned off. Then in the Color section of the dialog box, select the Color swatch. This opens the Color dialog box shown in Figure 31.16.

Figure 31.16. From the Color dialog box, you can assign colors to materials.


6.
Set the Red, Green, and Blue values to 0 , 20 , and 160 respectively, which creates a dark blue.

7.
Click OK to return to the New Standard Material dialog box. With Color/ Pattern still selected, set the Value slider to 0.15 .

8.
Click the Ambient radio button and select the Lock check box to place a check in it.

9.
Click the Reflection radio button and set the Value slider to 0.10 .

10.
With the Reflection attribute still selected, select the color swatch in the Color section to display the Color dialog box (as you did in step 4). Set the Red, Green, and Blue values to 0 , 7 , and 77 respectively. Click OK to close the Color dialog box. The New Standard Material dialog box should now resemble Figure 31.17.

Figure 31.17. The New Standard Material dialog box after you define the new Dark Blue Glass material.


11.
Click OK to return to the Materials dialog box. The Dark Blue Glass material now appears in the Material list.

12.
With Dark Blue Glass selected in the Materials list, select the By Layer button.

13.
From the Select Layer list, choose the glass layer, then select the Attach button to assign Dark Blue Glass to all objects on the glass layer.

14.
Click OK to close the Attach by Layer dialog box, and click OK again to close the Materials dialog box.

15.
From the Render toolbar, choose Render to display the Render dialog box. Verify that the settings duplicate those shown in Figure 31.13.

16.
Click the Render button, and AutoCAD renders the model. The model should now resemble Figure 31.18.

Figure 31.18. The office building model with the new Dark Blue Glass material applied to the Glass layer.


17.
Leave this drawing open. You will use it in the next exercise.

As you can see from this exercise, creating a new basic material is not difficult. As in this exercise, you can frequently use a currently defined material and modify one or more attributes to create the new material. The existing material serves as a template for the new material.

After you have created a new material, you may want to save it for use in other models. The following exercise demonstrates how to add a newly created material to the material library.

Exercise 31.4 Saving a New Material

1.
Continue in 31ex01b.DWG from the preceding exercise. From the Render toolbar, choose Materials, or type RMAT at the Command: prompt.

2.
Click the Materials Library button.

3.
In the Materials Library dialog box, select Dark Blue Glass in the Materials list.

4.
Click the Export button to add the selected material to the Current Library.

5.
In the Current Library list box, scroll down to find Dark Blue Glass added to the list.

6.
Click OK. In the Library Notification dialog box, select Save Changes to save the modification. Then click OK to close the Materials dialog box.

7.
You can save and close this drawing.

Mapped Materials

A mapped material varies from a basic material because one or more of the attributes is replaced with a bitmap image. For example, by replacing the color/pattern attribute with a photograph image of a wood pattern, you can make the surface of an object appear to have that wood pattern.

In AutoCAD, working with mapped materials is slightly more complicated because you also need to supply mapping coordinates. Mapping coordinates tell the rendering engine where and how to place the map on the surface of the object. Without correct mapping coordinates, the texture may not appear at the desired orientation or will not be on the same scale as the rest of the scene.

When you look at the Modify Standard Material dialog box in Figure 31.19, you will see the bitmap controls below and to the right of the color controls. If you choose the Find File button, you can navigate to any directory on your system and select a bitmap file for use in the material. You can use any bitmap file format supported by AutoCAD. These include the BMP, JPG, PNG, TIF, TGA, PCX, and GIF formats.

Figure 31.19. The Modify Standard Material dialog box. The bitmap controls appear near the bottom right.


Note

To use a particular bitmap in your scene, that bitmap should reside in either the same directory as the drawing or one of the directories listed under Texture Maps Search Paths in the AutoCAD options. Otherwise, AutoCAD may not be able to find the file.


After you select the bitmap, you can click the Adjust Bitmap button to crop and trim the bitmap as needed. Figure 31.20 shows you the dialog box that appears when you click this button.

Figure 31.20. The Adjust Material Bitmap Placement dialog box.


Although in many instances, you will not need to adjust the bitmap, in some circumstances, you will have to adjust the bitmap to obtain the effect you want. If, for example you need to create a “decal” map—such as the label on a bottle of wine—you can set the tiling to crop instead of tile, and only one copy of the image will appear on the object. Figure 31.21 shows you the difference between a tiled material and a cropped material. You will learn more about mapping materials to objects later in this chapter.

Figure 31.21. A tiled material (left) and a cropped material (right).


The following exercise shows you how to create a wood grain material with a bitmap.

Exercise 31.5 Using a Bitmap to Create a Wood Grain

1.
Start a new drawing.

2.
Open the Materials dialog box by choosing Materials from the Render toolbar or by typing RMAT at the Command: prompt.

3.
Choose New to create a new material.

4.
Name the material by typing Wood2 in the Material Name input box.

5.
With the Color/Pattern radio button selected, choose Find File in the lower-right corner. AutoCAD displays the Bitmap File dialog box. Make sure that the Files of Type input box is set to display *.tga files.

6.
Navigate to the Textures directory in your AutoCAD 2002 installation.

7.
Choose Teak.tga and click Open to open the file. At this point, you are returned to the New Standard Material dialog box.

8.
Set the Value slider to 1.00 and choose Preview to view the teak bitmap. Figure 31.22 shows the dialog box at this point.

Figure 31.22. The New Standard Material dialog box displaying the new Wood2 material.


9.
Click the Bump Map radio button.

10.
Click OK to accept the new material and return to the Materials dialog box. The new Wood2 material now appears in the Materials list.

11.
To save the new material and add it to the materials library, first click the Materials Library button.

12.
In the Materials Library dialog box, select Wood2 from the Current Drawing list. Then select the Export button to add the material to the current library. Save the changes to the library by clicking the Save button.

13.
Click OK twice to close the Materials Library dialog box and the Materials dialog box. Close the drawing without saving.

This exercise demonstrates that creating a mapped material is easy as long as you have the bitmap file and know its location. You can also supply your own bitmaps for use in defining new materials. Several libraries of third-party bitmaps suitable for use in making new materials are available. You can also create bitmap files by scanning photographs of materials such as metals, woods, and construction materials, to mention just a few. You can use bitmap files of various types, including BMP, PNG, JPG, TGA, TIF, GIF, and PCX file types.

Applying Mapping Coordinates

As was mentioned earlier, when you use materials that are composed wholly or in part of bitmap images, you usually have to apply mapping coordinates to the object. To do so, use the Mapping icon on the Render toolbar or type SETUV at the Command: prompt. You are then prompted to select the objects to which you want to apply the mapping coordinates. Select the appropriate objects, and the Mapping dialog box shown in Figure 31.23 appears.

Figure 31.23. In the Mapping dialog box, you select the type of mapping to apply to an object.


AutoCAD supports four types of mapping: planar, spherical, cylindrical, and solid. The first three generally refer to how the bitmap is wrapped around the object to which the mapping is applied. Figure 31.24 shows the various mapping types.

Figure 31.24. The four mapping types in AutoCAD: planar, cylindrical, spherical, and solid.


The last mapping type is called a solid mapping type. This type of mapping is intended for use with procedural materials such as wood, marble, and granite. These materials are generated based on mathematical formulas and do not make use of bitmaps. The solid mapping coordinates are used when you have a procedural material assigned to an object with highly varying geometry, such as a box with a sphere subtracted out of it. The curved inner portion of the subtracted area stretches the bitmap due to the Mapping coordinates, but a solid procedural material always appears correct.

After you select the type of mapping you want to use, you can select the Adjust Coordinates button to fine-tune the mapping. Which specific dialog box appears depends upon whether you choose a planar, cylindrical, spherical, or solid mapped object. As an example of the scope of adjustments available for mapping and adjusting coordinates, Figure 31.25 shows the Adjust Planar Coordinates dialog box.

Figure 31.25. The Adjust Planar Coordinates dialog box for adjusting mapping settings on planar objects.


In the dialog box, you can select the World Coordinate System plane along which the mapping coordinates are aligned. You can also pick your own 3D plane by picking three points on that plane, much like you can define your own User Coordinate System (UCS).

In the Center Position section of the dialog box, you will actually see a wireframe representation of the selected object. A light blue outline, called the Mapping icon, appears around this box as well.

The blue outline represents the mapping coordinates and indicates the size of one copy of the bitmap on the surface of the object. By adjusting the slider to the right and bottom of the preview, you can control the position of the bitmap on the surface of the object. At the bottom of the dialog box, you can control the offset and rotation of the Mapping icon. If you want to control the scale of the bitmap, click the Adjust Bitmap button.

The combinations of geometric shapes and mapping planes make adjusting bitmapped materials a somewhat complex operation due principally to the number of choices available. The procedures are relatively straightforward, however, and by adjusting the offset, rotation, scale, and coordinates of bitmapped materials, you can exert a great deal of control over how materials based on bitmaps will appear in the rendered model.

Creating Lights

After you select and perhaps create and then apply materials to the objects in your model, the next logical step is to add sources of light. Lighting is one of the most important aspects of creating an effective rendering. Without realistic lighting, the surfaces and materials of an otherwise realistic model will appear “flat” looking. Lighting also provides the means for adding realistic shadows to your model.

You create lights by selecting the Lights button from the Render toolbar or by typing LIGHT at the Command: prompt. Either method displays the Lights dialog box, shown in Figure 31.26.

Figure 31.26. From the Lights dialog box, you can create, adjust, and manage all the lights in a model.


In the Lights dialog box, you will see a list of all the current lights in the scene, as well as the Ambient Light controls, the Light Creation controls, and the North Location button.

The ambient light is the overall brightness of the scene. By adjusting the ambient light, you can set the overall brightness of the scene. Higher ambient values are good for outside light, whereas lower values are good for interior or night scenes. Strive to avoid extreme settings of ambient light. Usually, values between 30 and 70 yield suitable amounts of ambient light. You can also adjust the ambient light color to provide basic color tinting to the scene. Keep ambient light color variations very subtle for the most realistic effects. Ambient light exhibits no source and, therefore, is not capable of casting shadows.

The North Location button allows you to set the north direction in your models. By default, north coincides with the positive Y direction. You may want to alter the north direction in architectural models.

Types of Lights

AutoCAD supports three types of lights:

  • Point. This type of light is similar to a single light bulb. Light is radiated from a single point in all directions. You can specify no attenuation or attenuation that is inverse linear or inverse square.

  • Spotlight. This type of light is similar to the light emitted from a flashlight. The spotlight has a source and a target location. Light from a spotlight is cast in a cone fashion and you can define the angle of the cone. You can specify no attenuation or attenuation that is inverse linear or inverse square.

  • Distant. A distant light emits parallel light beams in one direction. Distant light sources cannot exhibit any attenuation; the light intensity remains constant regardless of its distance.

Typically, point lights are used for general illumination in the scene, spotlights are used to add special highlighting in a relatively small area, and distant lights are used to simulate sunlight.

Creating a Light

As you can see in the Lights dialog box shown in Figure 31.26, you create a light simply by choosing the type of light from the drop-down list next to the New button and clicking the New button. Each of the three light types has its own dialog box for specifying the attributes of the light. The dialog box for a spotlight is shown in Figure 31.27.

Figure 31.27. The New Spotlight dialog box, where you create and set the attributes of a spotlight.


Every light that you create in an AutoCAD model must have a name. You enter the name in the Light Name input box. Choose a name that is descriptive, such as Spot1 or Point-main.

With point lights and spotlights, you need to position the light in the model. Point lights require only the location of the light source. However, because spotlights are directional, you must specify the position of both the source and the target. You specify these locations by choosing the Modify button in the Position section of the dialog box. In the case of spotlights, you are then prompted to pick the target of the light followed by the location of the light. AutoCAD temporarily hides the dialog box to allow you to pick these points in the model. Using point filters (as described in Chapter 28, “Drawing in 3D in AutoCAD”) makes specifying light locations easier. With distant lights, you need to specify the source direction as well as its height above the horizon.

After you position a light, you are returned to the New Light dialog box, where you set the remaining parameters associated with the light, which are explained here:

  • Intensity. Sets the intensity or brightness of the light. Entering 0 turns off a light. The maximum point light intensity depends on the attenuation setting and the extents of the drawing. With no attenuation, maximum intensity is 1. If attenuation is inverse linear, maximum intensity is the value of twice the extents distance. If attenuation is inverse square, maximum intensity is twice the square of the extents distance.

  • Color. You can assign a different color to each light in the scene. For example, florescent lighting often has a slight blue cast, while typical incandescent lighting tends to be slightly yellow. For special effects such as sunrise or sunset, you may want to give a distant light a slightly red color. Keep these color assignments minimal for the best results.

  • Attenuation. In real life, light fades or grows weaker as the distance between source and objects increases. In AutoCAD, lights remain the same strength over a distance unless you specify an attenuation factor. There are two types of attenuation: inverse linear and inverse square. Inverse square drops off much faster than inverse linear does. For point lights and spotlights, inverse linear is the default attenuation factor and generally yields the most effective results. Direct lights exhibit no attenuation.

  • Shadows. All lights in AutoCAD are capable of casting shadows. The type of shadow depends on the current render type (Photo Real or Photo Raytrace) and the settings in the Shadow Options dialog box. The shadow casting capability of any light can be turned on or off with the Shadow On check box in the Shadows section of the new Lights dialog box.

In addition to these basic controls common to all light types, the New Spotlight dialog box allows you to adjust the angle of the cone and its falloff rate and the New Distant Light dialog box provides settings for sun position.

The following exercise shows you how to create a spotlight for use in a model.

Exercise 31.6 Creating a Spotlight

1.
Load the file 31ex02.dwg from the accompanying CD-ROM. The drawing presents a model of a telephone handset unit, as shown in Figure 31.28.

Figure 31.28. Model of a telephone handset before rendering.


2.
From the View menu, choose 3D Views, Plan View, World UCS. This switches you to a Plan view. From this view, you will add a spotlight.

3.
Select Lights from the Render toolbar or type LIGHT at the Command: prompt.

4.
In the Lights dialog box, choose Spotlight from the drop-down list and click the New button.

5.
In the New Spotlight dialog box, type the name Spot1 in the Light Name input box.

6.
In the Position section, click the Modify button. AutoCAD hides the dialog box and displays the drawing.

7.
At the Enter light target: prompt, type in the coordinates 8.5,7.0 . At the Enter light location: prompt, type .xy to indicate that next you will provide the X-Y location of the light location.

8.
At the of: prompt, type in the coordinates - 2,14 . At the (need Z) prompt, type 25 . This places the light location 25 units above the model. AutoCAD returns to the New Spotlight dialog box.

9.
Configure the remaining settings in the New Spotlight dialog box, as shown in Figure 31.29.

Figure 31.29. Settings of the New Spotlight dialog box for the model’s new spotlight.


10.
In the Shadow section of the New Spotlight dialog box, select Shadow Options, and in the Shadow Options dialog box, check the Shadow Volume/Ray Traced Shadows check box. Click OK to close the Shadow Options dialog box. Then click OK to close the New Spotlight dialog box.

11.
In the Lights dialog box, set the Ambient Light Intensity to 0.5 . Click OK to accept the settings and close the dialog box.

12.
From the View menu, choose Named Views. In the View dialog box, select View1 and then Set Current. Click OK to close the dialog box and restore the opening view.

13.
From the Render toolbar, choose Render or enter Render at the Command: prompt.

14.
Configure the settings in the Render dialog box like those shown in Figure 31.30.

Figure 31.30. Settings of the Render dialog box prior to rendering the model.


15.
In the Render dialog box, choose Render. After a few moments, the rendered model appears. The rendering should resemble Figure 31.31.

Figure 31.31. The rendered model is illuminated with the new spotlight.


16.
You may want to render this model again after adjusting the Hotspot and Falloff angles as well as the intensities of the spotlight and ambient light. You can then close this drawing without saving.

As you learned in this exercise, creating lights for a model is not difficult. Proper lighting of a model, however, is an art form in itself. Good results can be produced quickly, but great results take time and a lot of testing and adjusting of the lights in the scene.

When testing different light types, positions, and intensities, you can speed up your test renderings in several ways. First, you need not render the complete model or view. Often, rendering a smaller portion of the view will give you the information you need to decide if further adjustments are needed. Referring to the Render dialog box shown in Figure 31.32, in the Rendering Procedure section, the Crop Window option allows you to window a portion of the model for rendering. In a similar way, the Query for Selections option allows you to select portions on the model for rendering on an object-by-object basis. Using one or both of these options can greatly speed the rendering of portions of the model as you make lighting adjustments.

Figure 31.32. The Render dialog box offers methods for speeding up test renderings.


If you need to render the entire model view while making adjustments, you can make “course” renderings using the Sub Sampling options found in the Render dialog box. Sub-sampling reduces rendering time and image quality without losing lighting effects such as shadows by rendering a fraction of all of the pixels. A sub-sampling ratio of 1:1 renders all pixels and takes the most time. A sub-sampling of 3:1, however, renders only every third pixel, greatly reducing rendering times. Shadows also increase rendering times. Turning off the Shadow option in the Rendering Options section of the Render dialog box is yet another way to make successive test renderings more attractive.

Creating Sunlight

Sunlight—in both exterior and interior views of your model—can be the most important light you use. You can manually set a Distant light to simulate sunlight from any direction to yield any effect you want. You can also use AutoCAD’s built-in Sun Angle Calculator to calculate the exact position of the sun for any point on earth on any day of the year at any time of day. Being able to place the sun so precisely is often important in renderings of exterior architectural models where the exact position and extent of shadows cast by buildings or other structures may be important. In the following exercise, you learn how to create precise sun shadows using the Sun Angle Calculator.

Exercise 31.7 Using the Sunlight System to Create a Distant Light

1.
Load the file 31ex03.dwg from the accompanying CD-ROM. This drawing contains a model of an apartment building with an adjoining urban park.

2.
Choose Lights from the Render toolbar. In the Light Type drop-down list, set the light type to Distant and click the New button.

3.
In the New Distant Light dialog box, create a new Distant light. Name this light Sun. Set its intensity to 1.00 .

4.
In the Shadows section, select Shadow On. Select Shadow Options and, in the Shadow Options dialog box, select the Shadow Volume/Ray Traced Shadows. Click OK to close the Shadow Options dialog box.

5.
In the New Distant Light dialog box, select Sun Angle Calculator. AutoCAD displays the Sun Angle Calculator dialog box shown in Figure 31.33.

Figure 31.33. The Sun Angle Calculator dialog box, where you set the geographical location and date/time.


6.
Select Geographic Location to display the Geographic Location dialog box. Select San Francisco from the City list box and click OK to close the dialog box.

7.
In the Sun Angle Calculator dialog box, set the Date and Clock Time as shown in Figure 31.33, then click OK to return to the New Distant Light dialog box. Click OK to close this dialog box.

8.
In the Lights dialog box, check that the Ambient Light intensity is set to 0.90. Click OK to close this dialog box.

9.
Select Render from the Render toolbar or type Render at the Command: prompt.

10.
In the Render dialog box, set the Rendering Type to Photo Raytrace. In the Rendering Options section, make sure the Shadows option is checked.

11.
Click the Render button to begin rendering the model. After a few moments, your rendered model should resemble Figure 31.34. Close this drawing without saving.

Figure 31.34. The rendered building model showing the cast shadows on a specific date and time.


Note

The Sun Angle Calculator takes its north as the current AutoCAD north direction. By default, this is the positive Y-axis direction of the current coordinate direction. You can change the north direction in the North Direction dialog box, which is accessible from the Lights dialog box.


This exercise demonstrates that the Sun Angle Calculator can be ef fectively used to place a Distant light that’s capable of producing accurate object shadows. Of course, a Distant light can also be used more conventionally as a directional light source.

Generating an Output

The Default Rendering method in AutoCAD renders the output to the current viewport. This is the method used in the exercises in this chapter. To print the image or use it in other programs, however, you must be able to save the rendered image to a file. You accomplish this by choosing File from the Destination drop-down list in the Render dialog box. After you select File, click the More Options button to define the file type.

AutoCAD allows you to render the image out to one of five different file types: TARGA, TIF, Postscript, BMP, and PCX file formats. Below the File Type drop-down list, you can select the resolution to which you want to render. Higher resolutions, of course, take longer to render.

Note

There are other advanced features of the Rendering system in AutoCAD to explore. These include fog, backgrounds, vegetation, and several others. This chapter is intended to give you an introduction to the principles of rendering and the basic capabilities of the rendering feature in AutoCAD 2002. Rendering is as much an art as a science, and you use this chapter’s information to serve as a basis for individual exploration of rendering inside AutoCAD.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.37.191