INSIDE 3DS MAX® 7 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

INSIDE 3DS MAX® 7 [Electronic resources] - نسخه متنی

Adobe Creative Team

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











  • Combining CG and Reality


    This first section will demonstrate how to render an architectural model against a background plate. The objective is to provide the compositor with the components required to join your model with an existing image to create a convincing product. We'll be rendering a model against a static image, but the same principles apply to video backgrounds. Some of the final steps of the compositing process, including masking and color correction, are beyond the scope of this chapter, but they are covered in the compositing chapter later in this book. You also may want to look into the features included in discreet's combustion composition and postproduction software.

    Preparation and Research


    Rendering a CG model or scene in front of a photograph of an actual location requires some knowledge and information regarding when and where the image was taken. What time of day was it and what was the date? What was the cloud cover like? Was additional lighting introduced into the scene by the lighting director or camera operator? Getting as much information as you can will help streamline your decision-making process.

    Understanding the intent and context of the final image can assist in your lighting decisions. In the case of an architectural scene, is the structure a gleaming tower rising out of an area of drab urban blight, or does it need to seamlessly match the neighborhood? Should shadows be cast onto your models from objects or characters in the background plate? This may require you to create stand-in objects, with Matte/Shadow materials applied to them. Will the final scene have the same sky or foreground scenery? This can affect the reflections from your objects as well as the color bleed that creeps into them. Get a clear and complete understanding from the project manager or art director (or the client, if you are a solo shop or a subcontractor) before production begins.

    Let's take a look at two typical scenes in which computer-generated models have been placed into photographs. In each one, the original photo is on the left and the composited image is on the right.

    In the first situation the owner of a shop in a mall was expanding its storefront presence and was seeking approval for a new storefront design. In this scene, the signage, the large new canopy, and the left part of the wall needed to be created and lit in 3ds max (Figure 13.1). Since this is an outdoor scene, the main illumination comes from the sun overhead, and only a small amount of ambient light from a fill light is required. The size and shape of the shadows being cast by the sign's letters is a good indication of the location of the overhead light.

    Figure 13.1. The shadows from the sign's letters help determine the location of the sun in the sky.

    [View full size image]

    In the second situation, the owner of a building wanted to install an ATM inside it, in a rather secluded location. Before committing the money to install and maintain the machine and its necessary ventilation system, the building's manager wanted to see if customers would feel secure about using it, and asked for an image that would simulate the lighting (Figure 13.2). The chief source of light for this indoor scene is bounced light that comes into the scene from above and then fades as it travels from the left to the right. Bounced light from the floor also fades from bottom to top. In this image, the model's lighting needed to match the actual lighting at the ATM and the surrounding area. This was accomplished using an overhead directional light as the key light, a weak directional light from below as a fill light, and an omni as a second fill light off to the left. All lights were colored to match the wall or floor and attenuated to control their intensity over distance.

    Figure 13.2. The more subtle indoor lighting is re-created with a key light and two fill lights.

    Note

    You should always consider the modeling complexity and materials that are applied to the objects in your scenes. Cars may need to be complex when they are designed for up-close viewing, but those same cars will not need that level of complexity when they are peripheral objects in a scene. Not only will they require additional memory assets, but the extra face count of a complex model can drastically increase lighting computations without any noticeable increase in scene quality.

    In the following exercise, you'll be using some of the tools and techniques covered in the previous chapter, as well as some additional tools, to light a CG model in front of a background plate. We'll also see how to render the scene in separate passes so that individual features can be tweaked by the compositor.

    Lighting the Scene


    The image that we will be using as a background plate for our scene is a photograph taken across the street from a parking lot (Figure 13.3). (You can also study the image file called DCP_0220.jpg on the DVD.) We will be replacing the lot with a small condominium complex. The shadows cast by the truck in the foreground and the light posts give us an idea of the location of the sun, and the lack of leaves on the trees helps determine the time of year the photo was taken. First, let's get the basic lighting in place.


    1.

    Open the file entitled Building_Lighting Start.max from the DVD. This consists of a building in a scene with the background plate used as both the Camera viewport's background image and the environment map (Figure 13.4). The background plate is a simple photograph that was taken with a digital camera.

    Figure 13.4. The Cam Corner viewport at the start of the exercise.

    I've made this scene easy to work with by taking care of many of the usual details that have to be dealt with before lighting can begin. The camera is static in the scene; only the front, side, and corner facades of the building have been created. 3D objects are already in place in the same locations as the building to the front left and the car near the center-right of the image. These objects both have a Matte/Shadow material applied to them so that they will mask out the building and car. We're not going to concern ourselves with the other objects (poles, wires, trees, and so on) that will appear to be covered by the model; we'll leave the job of masking them to the compositor. The model has been camera-matched, and both the Cameras and Helpers categories have been hidden from the reader's view by checking both options in the Hide by Category rollout in the Display panel (Figure 13.5).

    Figure 13.5. Objects in the scene can be hidden by category in the Display panel.

    2.

    In the Create panel > Lights > Photometric > Object Type rollout, choose IES Sky. Click near the bottom of the Top viewport to place the Sky light, then drag and release to place the target near the front entrance to the building.

    3.

    With Sky01 still selected, activate the Select and Move tool and use the Transform Type-Ins at the bottom of the user interface to move the light to X = 515, Y = 165, Z = 180.

    Note

    The IES Sky light only works properly when it is pointing downward in the World Z axis. If mental ray is used as the renderer, Final Gather must be enabled.

    4.

    In the Modify panel, check the On check box in the IES Sky Parameters rollout and set the Coverage to Partly Cloudy (Figure 13.6). Leave Cast Shadows unchecked for now; then render the Camera viewport.

    Figure 13.6. The IES Sky light's parameters.

    The model looks extremely washed out (Figure 13.7). We'll enable Exposure Control to lessen this washed-out result.

    Figure 13.7. Without Exposure Control enabled, the scene looks extremely washed out.

    5.

    Choose Environment from the Rendering menu. In the Exposure Control rollout, choose Automatic Exposure Control from the drop-down list. Click the Render Preview button in the same rollout to see a thumbnail image of the scene with the Exposure Control applied.

    6.

    Rendering the scene now would result in a model that is still too bright. In the Automatic Exposure Control Parameters rollout, change the brightness value to 42 and check Desaturate Low Levels to keep your darkest areas from turning black (Figure 13.8). Render the scene (Figure 13.9).

    Figure 13.8. Enable and set the Exposure Control values.

    Figure 13.9. With Exposure Control enabled, the scene looks much more appealing.


    Figure 13.3. The background plate onto which the model will be rendered.

    The scene looks much better now. It's no longer washed out, and the colors are similar to those in the photograph. But there are still areas that need to be improved, such as the dark areas under the canopies (our only light comes from above) and the lack of shadows. To address these issues, we'll turn to max's Light Tracer.

    Using Light Tracer


    The IES Sky light works best in a scene when it is teamed up with one of the advanced lighting plug-ins included in 3ds max. One approach is to use radiosity. Radiosity attempts to create physically accurate lighting by tracing each light ray as it bounces through a scene and loses energy with each bounce. This can create very precise shadows and color bleeding and is very useful in indoor scenes. However, the speed and accuracy of any radiosity solution is dependent on the complexity of the scene geometry; the more complex it is, the longer it takes to generate a solution.

    For outdoor scenes, max's Light Tracer plug-in is often a more practical choice. Light Tracer creates a less accurate but usually faster global illumination and color bleed solution by bouncing a specified number of light rays through a scene for a limited number of bounces. This is best used in brightly lit outdoor scenes that require softer shadows.

    Let's add Light Tracer to our current scene.


    1.

    Continue with your existing scene, or open the file entitled Building_Lighting Light Tracer.max from the DVD.

    2.

    Open the Render Scene dialog, and click the Advanced Lighting tab. Choose Light Tracer from the drop-down list to expose the Light Tracer's Parameters rollout. Leave the parameters at their defaults, and render the scene (Figure 13.10). This may take a while, depending on the system that you are using to render.

    Figure 13.10. Using Light Tracer allows many of the model's features to really stand out in the image.

    Tip

    When you do a standard render to the Rendered Frame Window or to a file, you'll lose the ability to continue working in max, and this can seriously interrupt your work flow. Consider investigating the Backburner feature included with 3ds max. Backburner will allow you to render in the background on your own computer or use any other systems, on a qualified network, as a render farm.

    Now there's a definite improvement in the scene. The balconies really pop out against the building and the brick has lightened up, but we still need to address the dark areas and the lack of shadows.

    3.

    First we'll speed up our renderings a bit by lowering their quality (don't worry, we'll jack the numbers back up for the final shot). In the Parameters rollout under the Render Scene dialog's Advanced Lighting tab, set the Rays/Sample value to 125 and leave the Filter Size at 0.5 (Figure 13.11).

    Figure 13.11. The revised settings for the Light Tracer's parameters.

    The Rays/Sample value represents the number of light rays that are cast for every pixel in the scene. Lower numbers result in a blotchier rendering but at a faster speed. Filter Size refers to the smoothing of the noise that is created when the light rays impact a surface. Lower numbers result in grainer but faster renderings.

    4.

    The areas under the canopies are dark because light is not bouncing up to hit those surfaces. Increase the bounces from 0 (essentially an "off" condition for the effect) to 1. Each light ray will bounce off one surface and illuminate another. In the Rendered Frame Window, click the Clone Rendered Frame Window button so that you will have something to compare to; then render the scene.

    The scene is very blotchy, especially on the left side of the building (Figure 13.12). The bounced light helped the canopies, but the effect could be better. We'll help the scene by increasing the ambient light created by the Light Tracer.

    Figure 13.12. The revised parameters result in a blotchy rendering, but the effect of the bounced light is evident.

    5.

    Under the Advanced Lighting tab, click the Extra Ambient color swatch. When the Color Selector opens, change the RGB values to (15, 15, 15). This will lighten the dark areas without washing out the entire scene.

    6.

    We need to lighten the scene and set the parameters for a better final product. Increase Bounces to 2, Rays/Sample to 250, and Filter Size to 10. Also, increase the Global Multiplier to 1.25. This should give us a nice, crisp image. Turn off Adaptive Undersampling, since we want the light distribution to cover the model evenly. In the Environment and Effects dialog, increase the Brightness to 55. Make sure the Cam Corner viewport is still active; then render the scene (Figure 13.13).

    Figure 13.13. The increase in Bounces, Rays/Sample, and Filter Size as well as Exposure Control Brightness results in a better-quality rendering.

    Tip

    If you are using Light Tracer and not getting the expected results, try checking Show Samples in the Adaptive Undersampling section of the Render Scene dialog's Advanced Lighting tab. When used in conjunction with Adaptive Undersampling, this will render red dots at the locations where samples are taken. The red dots indicate where the light is being concentrated.

    7.

    Finally, we need to add specular highlights to the scene (Figure 13.14). The IES Sky light usually produces good shadow results, but no specular highlights. We'll add a directional light to the scene to create the highlights without adding any diffuse light. In the Top viewport, create a directional light that is roughly parallel to the IES Sky light. In the Front viewport, raise it to the same level as the IES Sky light.

    Figure 13.14. Placing the directional light that will create the specular highlights.

    [View full size image]

    8.

    In the directional light's Modify panel, adjust the Hotspot and Falloff values so that the light is cast over the entire building model. If necessary, switch one of the viewports so that its view looks directly down the light's negative Z axis. This will give you visual feedback about the scope of the light's influence.

    9.

    In the Advanced Effects rollout, uncheck the Diffuse check box (Figure 13.15). We want this light to contribute only to the specular components in this scene.

    Figure 13.15. Unchecking Diffuse turns this component off for the directional light.

    10.

    Render the Camera viewport one more time (Figure 13.16).

    Figure 13.16. The condominium complex with the addition of shadows and specular highlights.


    As this exercise has demonstrated, lighting a CG scene to match a background plate requires forethought and attention to the many aspects that real-world lights contribute to an environment. In the next section, we'll examine 3ds max's Render Elements feature, which enables you to extract lighting elements from the rendering.

    Rendering Light Elements


    As mentioned earlier, we need to provide the compositor with as many images as necessary to properly complete the project. This often means generating several images, each representing a different component of the rendering, rather than handing over a single well-lit image. With a variety of images, the compositing artists can edit or emphasize individual components according to the requirements of the art director, without the need to rerender the entire project. Having a distinct image of just the scene's shadows, for example, allows the compositor to lighten, darken, or tint those shadows without touching the other elements.

    3ds max 7 allows you to render each element in a separate pass to generate unique images or animation files. There are several different rendering elements available:

    • Diffuse
      This element renders the diffuse aspects of the scene and is the closest to what you see in the Rendered Frame Window.

    • Specular
      This element renders only the specular highlights found in the scene. The highlights appear as white against a black background.

    • Blend
      The Blend render element is the most adaptable element. Using Blend, you can select which elements will be combined into a single image. For example, if reflections will be edited, but no other components, you can use Blend to render all the other elements into one pass, then render the reflections separately.

    • Reflection and Refraction
      Reflections and refractions in a scene can be rendered out as individual components.

    • Shadow
      One of the most common elements to detach from a scene. The ability to edit shadow elements in their own image enables the comp artist to alter the viewer's perception of the objects' location, size, density, and overall presence in the scene.

    • Atmosphere
      Atmosphere effects such as Volume Light and Fire Effect can be rendered in separate passes for later tweaking.

    • Z Depth
      The Z Depth element creates a grayscale depiction of the objects in the scene. Objects in the foreground will appear lighter, while objects that are more distant will be shown as increasingly dark. This element can be used to make objects more apparent in the scene as they approach the camera or viewport.

    • Alpha
      Often used as a tool to mask CG elements against a background plate. Opaque objects appear as white in the element; completely transparent objects, or areas where no objects exist, appear as black. Semitransparent objects are rendered as shades of gray, depending on their opacity.

    • Background
      Don't forget to provide the background as its own element, in the same context that was used to create the other elements.

    • Lighting
      The Lighting element shows where the lighting and shadows affect the scene.


    Additional render elements that can be pulled from your scene include Self-Illumination, Matte, Ink, and Paint (for use with the Ink 'n Paint material). These elements do not affect the lighting of the scene and won't be covered here. Feel free to explore them on your own.

    Let's create a quick render with separate elements for Alpha, Reflection, Shadow, and Specular.


    1.

    Continuing with the previous exercise, open the Render Scene dialog, then click the Render Elements tab (Figure 13.17).

    Figure 13.17. The Render Scene dialog's Render Elements tab and the Render Elements dialog showing the available render elements.

    2.

    Expand the Render Elements rollout, if required, and then click the Add button.

    3.

    Select Alpha, Reflection, Shadow, and Specular from the list (Figures 13.18, 13.19, 13.20, and 13.21). Choose OK to close the dialog.

    Figure 13.18. The Alpha element from the condominium scene.

    Figure 13.19. The Reflection element from the condominium scene.

    Figure 13.20. The Shadow element from the condominium scene.

    Figure 13.21. The Specular element from the condominium scene.

    [View full size image]

    4.

    By default, there is no file name or output path assigned to these render passes. To save the images, select each element and enter both a file name and a location. If you are rendering a sequence of still images, max will append sequential numbers to each file name.


    By pulling the individual elements out of this rendered scene, you have provided the compositor with the information needed to fine-tune the project in postproduction, so it will look its best in the final film or video version.


    • / 193