Rendering Still Images

In some ways, 3ds Max is like a photography studio. You arrange and manipulate three-dimensional objects, lights, and a camera, with the ultimate goal of producing an image that illustrates your message. The act of creating that image is called rendering. In this lesson, you'll learn some of the different ways you can use 3ds Max to render.


Set up the lesson:
  • On the File menu, choose Open and navigate to the \tutorials\intro_to_rendering folder. Highlight rendering_still_images_start.max and click Open.
    The scene contains a textured model of an apple, plus a shadow-casting spotlight, a fill light, and a ground plane.
Render the scene:
  1. Make sure the Perspective (lower-right) viewport is active; that is, it has a yellow border. If not, right-click anywhere inside the Perspective viewport.
  2. Press Shift+Q or click the Quick Render button on the main toolbar to render the viewport.
    In a few moments, a default rendering of the apple scene appears on the screen.
    This rendering has several characteristics, all of which you can change:
    • It appears in the rendered frame window. The text in this window's title bar tells you that you're currently viewing frame 0 as rendered from the Perspective viewport, and the window is displaying the image at a zoom ratio of 1:1, or normal magnification.
    • Its resolution is 320 pixels in the horizontal dimension and 240 pixels in the vertical dimension, or 320 x 240 for short.
    • It uses the default scanline renderer. This is the renderer that most 3ds Max artists employ, but others are available. One of these is mental ray, a powerful renderer that is included with the software. You'll take a quick look at mental ray shortly.

  3. Close the rendered frame window by clicking the X button in its upper-right corner.
    The most efficient way to work with 3ds Max is to use keyboard shortcuts whenever possible. The default shortcut for the Quick Render command is easy to remember.
  4. On the keyboard, press Shift+Q.
    The scene is rendered again, exactly the same as before.
Use the rendered frame window tools:
The rendered frame window has a number of tools you can use to work with the image and view it in different ways. Most of these are available as buttons in the toolbar, which is highlighted in the illustration above. In this procedure, you'll try out a few of the other, mouse-related functions. You'll find detailed descriptions of all of the controls in the Rendered Frame Window topic.
  1. Click in the window to activate it, and then rotate the mouse wheel forward and back.
    If you're not using a wheel mouse, you can zoom the window by pressing and holding the Ctrl key and then clicking the left mouse button to zoom in, or the right mouse button to zoom out.

    The rendered frame window zoomed in
    This zooms the image in and out about the mouse cursor position. The current zoom ratio appears at the right end of the text in the window title bar. You can zoom between 1/8 and 64 times actual size.
    You can change the window size using standard Windows methods, such as by dragging the lower-right corner.
  2. When zoomed in, you can pan the image by pressing and holding the middle mouse button (or wheel button), and then dragging in the window.
    If you're not using a three-button mouse, pan the image by pressing and holding the Shift key and the left mouse button, and then dragging in the window.
  3. Return to the 1:1 zoom ratio, and then, without holding down any keys, right-click and hold in the image portion of the window.
    A temporary window appears, showing general image data such as the resolution, as well as specific information about the pixel currently under the mouse cursor.
  4. Still holding down the right mouse button, drag the mouse so that the cursor is over a lighter part of the image, such as the specular highlight on the apple.
    The color swatch at the right end of the toolbar changes visibly to a light red color. This color remains when you release the mouse button.
  5. Close the rendered frame window.
Render with a different keyboard shortcut:
Did you notice that the apple is off-center? There are different ways to fix this; you'll do so by moving the apple. You'll also learn about using the Render Last command.
  1. On the toolbar, click the Select And Move button, and then move the mouse cursor into the Top viewport.
  2. Position the mouse cursor over the apple (the round, wireframe object), press and hold the left mouse button, and then drag slowly to the right. As you drag, watch the apple in the Perspective viewport. When the apple is near the center of the viewport, release the mouse button.
    Because you were working in the Top viewport, it is now the active viewport.
  3. Render the image by pressing Shift+Q.
    The program renders the view from the Top viewport. The Quick Render command always renders the active viewport. However, you probably wanted to see the Perspective-viewport image. This is a common error in 3ds Max. Fortunately, the program offers a way around it, called Render Last.
  4. Activate the Perspective viewport and render again.
    The new image replaces the previous one in the rendered frame window.
  5. Close the rendered frame window.
  6. Activate any other viewport, and then press the F9 key.
    This executes the Render Last command, which renders the same viewport that you rendered most recently in the current session, no matter which viewport is active. It's not available from the toolbar, but if you remember the keyboard shortcut, you can save time when working in different viewports.
  7. Press Ctrl+Z to undo the apple move. You might need to press it more than once.
Explore rendering options and presets:
In this procedure, you'll try a couple of options for rendering objects that don't normally appear. The scene you loaded contains a hidden object and an object that faces away from the camera. Neither has shown up in the renderings so far.
  1. Press F10 to open the Render Scene dialog.
    The dialog opens to the Common panel. Available here are controls for changing output size, rendering to disk, and more. You'll look at some of these shortly. Right now, we're interested in the rendering options.
  2. In the Options group, turn on Render Hidden Geometry.
  3. Render the Perspective viewport. If the Perspective viewport is active, you can do this by clicking the Render button at the bottom of the dialog. If a different viewport is active, first choose Perspective from the Viewport drop-down list to the left of the Render button.
    A second, green apple appears in the rendered image. If your scene contains objects that you want to appear in the rendered image but not in the viewport, you can hide them, and then use this option when rendering.

  4. In the Options group, turn on Force 2-Sided.
  5. Render the Perspective viewport again.
    The ground plane appears in the rendering, with the apples casting shadows on it. This object isn't hidden, but because it's facing away from the “camera,” it doesn't normally show up when you render. This option is a handy way to make sure all objects in the scene show up in the rendered image, no matter which way they're facing.
    A handy feature in 3ds Max lets you save a custom rendering setup as a preset for use with other scenes. You'll try it now.
  6. At the bottom of the Render Scene dialog, click the Preset drop-down list, and then choose Save Preset.
    The Render Presets Save dialog appears.
  7. Enter Hidden+2-Sided, and then click Save.
    The Select Preset Categories dialog appears, with a list of the different panels on the Render Scene and Environment And Effects dialogs. You can store any combination of panel settings in a preset. By default, all are highlighted, but for this exercise, you're interested in saving only the settings on the Common panel.
  8. Click Common, the first item in the list, and then click Save.
    The preset is saved, and then appears in the Preset list.
  9. In the Options group, turn off both Render Hidden Geometry and Force 2-Sided.
  10. Click the Preset list, and then choose the Hidden+2-Sided item.
    The Select Preset Categories dialog appears, showing only the Common item. If you save a preset with multiple panels, you can choose specific ones for selective loading.
  11. Click the Load button.
    The software loads the preset, and according to its settings, turns on both Render Hidden Geometry and Force 2-Sided again.
Change the output size:
Until now, you've been rendering to the screen at a relatively small size: 320 x 240. 3ds Max lets you render at any size up to 32,768 x 32,768, however, and in a number of different file formats.
  1. Still on the Render Scene dialog, in the Output Size group, click the 640x480 button.
    The new output resolution appears in the Width and Height fields.
  2. Render the Perspective viewport.
    The software renders the image at the new, larger size. It takes a bit longer, but is much easier to see.
    The Image Aspect value, below the Width and Height fields, is currently 1.333. This is the ratio of width to height. You can alter it by changing one of the dimensions.
  3. Increase the Height value to 640.
    The Image Aspect is now 1.0, which means that the width and height are the same, resulting in a square image.
  4. Render the Perspective viewport.
    The software divides the added height evenly between the top and bottom of the image, so there are now 80 additional pixels both above and below the original image.
    Tip: When rendering to nonstandard aspect ratios, the Safe Frame option helps you preview exactly how the final render will appear. Right-click the viewport label (“Perspective”), and then choose Show Safe Frame from the menu. The outer frame shows you the area that will render; the others are used when creating video content.
    You can also change the dimensions by adjusting the Image Aspect value; this always affects only the Height value. If you try it now, be sure to set Image Aspect back to 1.0 when you're done.
    You can lock the aspect ratio so that changing one dimension automatically adjusts the other.
  5. Click the lock button to the right of the Image Aspect field.
    Image Aspect becomes a read-only field.
  6. Set the Height value to 480.
    Both Height and Width change to 480.
  7. Render the Perspective viewport.
    The output image is still square, but smaller.
Change the output location:
Until now, you've been rendering only to the screen. In this procedure, you'll learn about rendering to a disk file, and find out how to turn off screen output.
  1. In the Render Output group, near the bottom of the Common Parameters rollout, click the Files button.
    The Render Output File dialog appears.
  2. If necessary, change the output location to \3dsmax9\images\.
  3. Click the drop-down-list next to Save As Type, and choose BMP Image File (*.bmp).
    This is the Windows Bitmap file format, commonly used for image files in Windows.
  4. Click in the File Name field, and type apples. Press the Enter key.
  5. The BMP Configuration dialog appears. Accept the default choice, RGB 24 bit, by clicking OK.
    The dialog closes. Nothing has rendered yet, but in the Render Output group, Save File is now available and enabled, and the read-only below it shows the output path and file name. These features become available only after you specify file output properties with the Files button.
  6. Render the Perspective viewport using any of the methods you've learned so far.
    The software renders the image to both the rendered frame window and the specified file. You can see the latter with the View Image File command.
  7. From the File menu, choose View Image File. Use the View File dialog to open the apples.bmp file.
    A new window opens showing the rendered image. It's exactly the same as the rendered frame window, except that its title bar shows the name of the file rather than the rendered viewport.
  8. Close both windows.
    The software automatically appended the .bmp filename extension when you specified the file type. You can also specify the file type explicitly by including the extension in the file name.
  9. Click the Files button again, and change Save As Type back to All Formats (at the top of the list). Then change the file name to apples.tga. Press Enter.
  10. The software recognizes that you want to render the image in Targa format, and displays the Targa Image Control dialog. The Targa image format supports the alpha channel, which allows transparency effects when compositing the rendered image.
  11. Click the OK button to accept the Targa image defaults.
  12. Near the bottom of the Render Output group, turn off Rendered Frame Window.
  13. Render the Perspective viewport.
    The software renders the image to the specified file, but not the rendered frame window. You can see the Targa image file with the View Image File command.
    If you click the Display Alpha Channel button on the window toolbar, you can see a tiny bit of transparency (black) in the upper-right corner. This is where the ground plane ends, showing the background, which is usually transparent.
  14. Close the image window.
Use a different renderer:
Included with 3ds Max is a powerful, sophisticated renderer called mental ray. Full exploitation of its capabilities is beyond the scope of this tutorial, but basic usage is straightforward.
  1. In the Render Output group, turn off Save File and turn on Rendered Frame Window.
  2. Scroll down to the Assign Renderer rollout and click the rollout title bar to expand it.
  3. Click the top Choose Renderer button, to the right of Production.
    The Choose Renderer dialog appears.
  4. In the list, click the mental ray Renderer entry to highlight it, and then click OK.
    ”mental ray” appears as the production renderer.
  5. Render the Perspective viewport.
    The software renders the image to the rendered frame window. During the rendering process, you can see the small rectangles, or “buckets,” into which mental ray subdivides the image, appear one by one.
    In the final image, the red and green apples and the ground plane all appear, because mental ray supports the same options as the default scanline renderer.
    Other renderers are available as plug-ins; after installation, they appear on the Choose Renderer dialog.
  6. Restore Default Scanline Renderer as the production renderer.

Next

Rendering an Animation

Rendering an Animation

There are some specific techniques to learn for rendering your animation into a movie file. You can render directly to a movie format such as AVI, or you can render a sequence of still image files to file formats such as TGA and then use the RAM Player to save them into a movie. The latter method is the recommended choice. It's a few steps more than rendering directly into a movie, but it gives you more control over file size and quality of output, plus if you have frames with artifacts or other errors, you can repair or remove them.
Warning: The next lesson will take a long time to render. Depending on the speed of your PC, it can take several hours or more to render the individual frames.
Set up the scene:
  • From the \tutorials\full_house directory, open full_house_walkin_start_render.max.
    If you get a Units Mismatch dialog, choose Adopt The File's Unit Scale and click OK. In general, when encountering this dialog, choose Adopt Unit Scale.
    This is a large file, so it will take a while to load. This file has stored all the radiosity rendering information, so the render times will be quicker.

    This file is similar to the one created in the earlier walkthrough lesson. It has been reduced from 730 frames to 257 frames to shorten the total rendering time.
Render to an image sequence:
  1. If the Camera viewport isn't active, right-click in it to activate it.
  2. From the Rendering menu, choose Render.
    Next, you'll define the animation range.
  3. On the Common tab of the Render Scene dialog, in the Time Output group, choose Active Time Segment.
    This option automatically renders all currently playable frames. Alternatively, you could choose Range or Frames and set the frame range to render.
  4. In the Render Output group, click the Files button.
    The Render Output File dialog opens.
  5. Navigate to a directory where you want to save your work. You can use the Create New Folder button to establish a new location, if necessary.
    Warning: Make sure you don't choose a directory on a DVD drive or some other write-protected location. Also make sure you choose a location with plenty of free space.
    Next you'll define the type of still image file to render.
  6. In the Save As Type field, click the drop-down arrow and choose Targa Image File, (*.tga ...).
    This is a high-quality file type, good for this kind of rendering.
  7. In the File name field, type my_walkin.tga, then click Save.
    After you click Save, you see a format-specific dialog that asks you to specify attribute and information settings. You can accept the default values, and then click OK.
    When you render an still-image sequence, as in this case, the software automatically appends the first part of the file name with a four-digit frame number. So the first frame will be my_walkin0000.tga, the second will be my_walkin0001.tga, and so on.
  8. Make sure Save File is turned on in the Render Output rollout, and that the Viewport field at the bottom of the Render Scene dialog reads Camera03 (not Top, Front, or Left), then click Render.

    The Rendering dialog appears, or you may first see a Raytrace Messages dialog. Wait for a short while as the first frame is rendered. You will see the Last Frame Time, Elapsed Time, and Time Remaining values change after the first frame finishes.

    If you did see the Raytrace Messages dialog, click the Raytracer tab of the Render Scene dialog, and then turn off Show Messages.
  9. Allow at least four frames to render.
  10. At this point, you can go away and return once your rendering is complete.
    Tip: You could also sit and watch the rendering for errors or improvements. In the real world, this can be a good idea; to study what you are creating.

    When the rendering is finished, the target directory contains the 258 output files.
Convert an image sequence into a movie:
  1. From the Rendering menu, choose RAM Player.
    The RAM Player loads still image sequences into memory and plays them so you can watch them as a movie. It actually lets you load two different sequences and then compare them visually, but you won't use that functionality here. You'll simply use the RAM Player to save the files into an AVI file.
  2. On the RAM Player toolbar, click Open Channel A.
  3. In the Open File Channel A dialog, navigate to the sequence of TGA image files. Highlight the name of the first file in the sequence, then turn on Sequence, and click Open.

    Now the RAM Player will load the sequential image files, rather than just the first one.
    The Image File List dialog appears. Here you can use the Every Nth and Multiplier fields if you need to speed up or slow down your animation. If your animation is too slow, change Every Nth to 2 or 3. If your animation is too fast, increase the Multiplier.
  4. Click OK.
    The RAM Player Configuration dialog appears. Here you can observe and adjust your memory usage. Loading this sequence takes about 57 MB. There are also tools here to resize your animation, specify a range of frames to use, and split the alpha (transparency) information into a separate file.
  5. Increase the Memory Usage to its maximum for your system, then click OK.
    The RAM Player loads the file into memory. In the Loading dialog, observe how much memory is being used and remains available.
    If it looks like you are about to run out memory, click Stop Loading. If you have a low-memory system, reduce the number of frames to load and try again.
  6. On the RAM Player toolbar, click the Play button and watch the movie play.

  7. On the RAM Player toolbar, click the Save Channel A button.
    The Save File dialog appears.
  8. Choose AVI as the file type, and give the animation the name my_walkin.avi. Click Save.
    The Video Compression dialog appears. Here, you can choose a codec (compression/decompression type) and adjust the quality of the file. To reduce file size, lower the quality.
  9. Click OK to continue.
  10. When the file conversion is finished, close the RAM Player, and then from the File menu, choose View Image File. Play your finished AVI file and observe the results.

Summary

You have learned how to render your animation to a sequence of still image files. This allows you better control for later correction of your animation. You also learned how to assemble the still image sequence into a movie file, such as AVI or QuickTime, using the RAM Player.

Next

Creating an Animated Shadow Study

Creating an Animated Shadow Study

In addition to animating a camera, you can animate the Daylight system's time of day. This is a good way to create a shadow study.
Set up the scene:
  • From the \tutorials\high_rise\ folder, open cityscape.max. If you encounter a File Unit Mismatch message, choose Adopt Unit Scale, the second choice.
    This is a scene of nine city blocks, with a skyscraper at the center. The scene contains a Daylight system. The Daylight system is set to position the scene at the latitude of San Francisco, California, and the sun is set at 0700 hours, about the time of dawn on a winter day.
Animate the daylight:
  1. Make sure Select Object is active on the toolbar.
  2. In the Left viewport, click the sun object in the viewport to select it.
    Daylight01 appears in the name field on the command panel.
  3. Open the Motion panel.
  4. On the Motion panel, scroll if necessary to the Control Parameters rollout.
  5. Turn on the Auto Key button.
    The button, the track bar, and the border of the active viewport all turn red.
  6. Drag the time slider to frame 5, and then on the Control Parameters rollout, change the Hours value to 8.
    The spinner arrows of the Hours, Minutes, and Seconds fields are now bracketed in red, indicating that you have set a key to animate the time of day.
  7. Drag the time slider to frame 10, and then change Hours to 9.
  8. Continue dragging the time slider in five-frame increments, then increasing the time of day by one hour at each increment. Stop when the time is 17 hours (5 P.M.). This should be at frame 50.
    You have set 10 keyframes (and 3ds Max has automatically set one at frame 0, as well) to track the course of the sun through a day. Drag the time slider and watch the Left viewport. The sun moves smoothly: 3ds Max interpolates from one keyframe to the next so each frame is different, even if it doesn't have a key on it.
Set the animation range:
As the animation only lasts 51 frames (0 to 50), you don't need the full default range of 101 frames.
  1. Click Time Configuration.
    The Time Configuration dialog is displayed.
    (This button is at the extreme lower right of the 3ds Max window.)
  2. In the Animation group, change the value of End Time to 50, and then click OK.
    Now the range of frames is no greater than the length of the animation.
Save your work:
  • Choose File > Save Copy As. In the file dialog, name the file my_shadows.max, and then click Save.
    Important: Save Copy As does not open the copy. The active file is still cityscape.max.
    Tip: Always save your scene file before you render.
Render the animation:
Rendering the animation takes about half an hour on a high-speed system. If you want, you can skip these steps and just view the file shadow_study.avi, provided with the other tutorial files. See “View the animation,” below.
  1. Choose Rendering > Render.
    The Render Scene dialog is displayed, with the Render panel active.
  2. On the Common Parameters rollout, in the Time Output group, choose Active Time Segment: 0 To 50.
    In the Output Size group, make sure that the resolution is 640x480.
    A smaller size would render more quickly, but the shadows don't show up as well.
  3. On the Render Output rollout, click the Files button.
    A Render Output File dialog is displayed.
  4. Enter a name for the animation, and choose one of the animation formats from the Save As Type drop-down list, and then click Save.
    You can render an animation to either the AVI or MOV (QuickTime®) formats. After you click Save, you see a format-specific dialog that asks you to specify the animation's compression. You can accept the default values, and then click OK.
    Note: In practice, it's a good idea to avoid rendering directly to movie formats such as AVI or MOV. Instead render to sequentially numbered still image frames, and then convert them to a movie format as a second step. This has practical value if you need to correct mistakes in individual frames, without having to re-render the entire animation.
  5. Open the Assign Renderer rollout and confirm that the Default Scanline Renderer is the production renderer. If you see mental ray renderer click Choose Renderer and change the renderer back to the Default Scanline Renderer.
    Note: The mental ray renderer does not support the IES Sun lighting.
  6. Leave the other Render Scene settings as they are, make sure Camera02 is the active viewport, and then click Render.
    3ds Max renders the animation. This takes a while (about a half hour on the high-speed system), so this is a good point to take a break.
View the animation:
  1. When rendering is done, choose File > View Image File.
    A View File dialog appears.
  2. Choose the file you just rendered, and then click Open.
    Tip: You can also choose shadow_study.avi, which is provided with the other tutorial files.
    Depending on the movie type, a Media Player or a QuickTime viewer is displayed, which lets you play the animation.

Summary

You can create a shadow study by animating the time of day of a Daylight system. To do so, use the Auto Key button, and change the hour at regular intervals of frames. (The longer the interval, the slower the animation will play.)

1 comment:

  1. It's in point of fact a great and useful piece of info.
    I am glad that you simply shared this useful information with us.
    Please keep us up to date like this. Thanks for sharing.



    Also visit my weblog Food Love

    ReplyDelete