home - about - advertise     
 
 
Sponsors
Navigation
Partners

 
Autodesk VIZTutorial

Creating and Animating with Reflective Materials (VIZ Release 4)

By Nancy Fulton, OpenCAD

    This tutorial, and 160 more step by step tutorials for 3ds max and Autodesk VIZ 4 can be found at http://viz.complete-support.com website.  Visit the site to sign up for a free trial subscription.  
    (c) 2002 OpenCAD International Inc. All Rights Reserved. Permission to publish granted exclusively to TenLinks.com

    Many designers use mirrors to make their scenes look more realistic, or to create dramatic effects. These objectives prove very difficult to achieve with Autodesk VIZ 4 if you don't have a good understanding of how mirrors work in the real world, as well as how to create mirrored materials in VIZ.

    In this lesson, you learn how to:

    • Create materials that incorporate mirrored reflections.

    • Assign mirror materials to objects.

    • Position cameras and objects so that the images and animations you render show the objects you wish to see in the mirrored surface.

    • Replay animations.

    You will find the source files required for this project in the m4006.exe self-extracting executable. To unpack the source files, save the .exe file to a folder on your local hard disk. From the Windows Start menu, choose Run, then select the .exe file. Choose OK, then specify where you want the source files saved.

    Mirror Fundamentals

    Failure to understand how mirrors work can make using them in your scenes a very trying experience. Take a few moments to review these mirror fundamentals before you proceed with the rest of this exercise, or start work on your own scenes.

    The Angle of Incidence Equals The Angle of Reflection

    "The Angle of Incidence Equals the Angle of Reflection" is a complex way of saying that the angle from which you view a mirror determines what you can see in the mirror. If you examine the image below, you can see a diagram illustrating the relationship between where you stand and what you see.

    When you stand right in front of a mirror, you see yourself, because the angle of incidence and the angle of refraction are both 90 degrees. If you move right until you are viewing the mirror at a 30 degree angle from the mirror plane, you are going to see objects to the left of the mirror at a 30 degree angle from the mirror plane. Intuitively, this doesn't make sense, because it means that when you look at the mirror at a very shallow angle, you are seeing almost straight ahead. Nevertheless, it's true. This is illustrated by the pink lines in the image:

    It's important to note that this relationship is valid in two dimensions, which means that if you move up, you will see objects closer to the ground, and if you move down, you will see objects closer to the ceiling.

    So what about the third dimension? If you move closer to the mirror, you see more in the mirror. Move away from the mirror and you see less. Thus, your distance from the mirror controls your field of view.

    What about Objects in the Mirror?

    If you put an object very close to the mirror, you will not see much change in the object's position as you move your camera. If you put an object far from the mirror, however, its position in the mirror will change a great deal. This means that if you want to guarantee that you will see something in the mirror, as a general rule, you should put it close to the mirror.

    However, if you put something directly in the line of site between the camera and the mirror, you won't be able to see it in the mirror at all. You create a line of site by creating a camera and target point. If you place the target point of your camera on a mirror, then place an object anywhere along that line of site, you will not be able to see the object in the mirror because the object will be between you and the the object's reflection.

    Autodesk VIZ Mirrors Bounce Light

    If you want to have mirrored objects in a scene bounce light from a light source onto other objects, you must make sure that you calculate a radiosity solution prior to rendering.

    Mirrors Take a Long Time to Render

    VIZ generates the image that appears in the mirrored by rendering a portion of the scene and applying that portion to the mirror. This greatly increases rendering time, so you should try not to create materials that incorporate ray-traced reflections unless an accurate reflection is required for the rendered image.

    For example, you may not want to use a material that incorporates a ray-traced reflection on a kitchen toaster, unless you plan to spend a great deal of time looking at the toaster and accuracy of reflection is important. Instead, create a "false" reflection on the toaster by using a still image as a reflection map.

    Now that you have reviewed these fundamentals you are ready to create a mirrored material and to see how the position of the camera in the scene determines what is rendered in the mirror.

    Creating a Mirror Object

    In this lesson you create a flat object and apply a mirrored material to it. You also learn how to incorporate reflections into any material.

    Prior to proceeding with this lesson, open the 4006a.max file unpacked from the m4006a.exe self-extracting executable.

    1. Select the object in the scene. This object was created by drawing a line and then smoothing the vertices of the line.

    2. Select the Modify tab.

    3. From the modifier list, choose Extrude.

    4. Type 1 in the Amount box. This will create a thin 3D object.

    Now that you have created a 3D object in the shape of a mirror, you will create and apply a mirrored material to that object.

    Creating and Applying a Mirrored Material

    In this lesson you learn how to create and apply a mirrored material to an object.

    1. Type M to display the Material Editor.

    2. Select the upper-left sample sphere.

    3. Choose the Reset Map/Mtl to Default Settings icon in the Material Editor.

    4. Choose Yes to confirm the reset.

    5. Change the Ambient, Diffuse and Specular colors to white.

    6. Type 90 in the Specular Level spinner.

    7. Type 90 in the Glossiness spinner.

    8. Under the Maps rollout, select the None button associated with the Reflection label.

    9. In the Material Editor, choose Raytrace from the list of map types.

    10. Choose OK to exit this window. This tells VIZ to use the Raytrace procedural map to calculate the reflections for this material.

    11. Select the Go to Parent icon in the Material Editor to return to the top level of this material.

    12. Drag and drop the material onto the mirror object in the design.

    13. Choose OK, if required, to replace the existing material.

    14. Close the Material Editor.

    15. Select the Display tab.

    16. Choose All On to make all the objects in the scene visible.

    17. From the Rendering menu, choose Render.

    18. Remove the check from the Use Radiosity checkbox, if required. For this scene calculating radiosity would take too long.

    19. Choose Render to render the Camera view.

    You will find our version of the file to this point in 4006b.max unpacked from the m4006a.exe self-extracting executable.

      Tip:
      You can use the techniques just demonstrated to apply a reflection to any material. This means you can make wood floors that reflect ceilings, glass walls that reflect rooms, and chrome lamps that reflect the tables they rest on.

    Note that the mirror shows the door. Examine the placement of the camera, the mirror and the door to convince yourself that the "angle of incidence equals the angle of reflection". If you find this confusing, review the previous pages of this project.

    Rendering Reflections

    Now that you have created the mirror material and applied it to an object, you can experiment with the position of the camera to see how its position affects the mirror image.

    1. Type T to display a top view of the model.

    2. Type G to turn the grid off.

    3. Select the Zoom Extents All icon in the lower-right corner of the screen.

    4. Select the Region Zoom icon in the lower-right corner of the screen, and select two points in the Front view to zoom in to the room. Note the appearance of the camera in the upper-right corner of the view.

    5. Drag the Frame Slider to frame 25/100.

    6. Select the Camera.

    7. Select the Animate button to turn it on.

    8. On the Main toolbar, choose the Select and Move icon.

    9. Move the camera to a point directly in front of the mirror.

    10. Drag the Frame slider to frame 50/100.

    11. Move the camera into the upper-left corner of the view.

    12. Select the Animate button to turn it off.

    13. Type C to display the camera view.

    14. From the Rendering menu, choose Render.

    15. Select the Range radio button.

    16. Type 0 and 50 to specify the starting and ending frames.

    17. Type 2 in the Every Nth Frame spinner to specify that you only want to render every other frame.

    18. Select 320x240 to specify that you want to render at low resolution. This reduces rendering time.

    19. Select the Files button and type c:\4006.avi to specify where you want the animation saved.

    20. Choose OK to accept the default compression.

    21. Choose Render to render the animation.

    22. Once the rendering is complete, from the Rendering menu, choose RAM Player.

    23. Select the Open Channel A icon.

    24. Use the File Selection tools to select the 4006.avi file.

    25. Choose Open to load the .avi.

    26. Choose OK to accept the default options for loading the .avi.

    27. Select the Playback Forward icon to play the animation.

    You will find our version of the final animation in 4006.avi.You will find our version of the final project in 4006c.max unpacked from the m4006a.exe self-extracting executable.

    As you review the animation, note that the camera is always on the opposite side of the room from what you see in the mirror. This demonstrates that the angle of incidence equals the angle of reflection.

      Tip:
      If you want a darker mirror, set the diffuse and ambient colors to black in the Material Editor when creating the mirrored material.

    Now that you have learned how to create mirror objects and mirror materials, and you understand how the camera's position effects the drawing view, you should feel comfortable using mirrors in your own images and animations.

    About OpenCAD

    OpenCAD delivers comprehensive training to users, schools and businesses for Autodesk and Discreet products starting at $99/year. For links to their training sites, visit http://www.opencad.com.

     

    Newsletter

    Get all the week's articles
    FREE!
    (current issue)