Chapter 9. Lighting and Rendering

There are many holy grails in the world of computer-generated imagery, one of which is to get instant rendering results. The rendering stage is still one of the biggest speed bumps to creativity. You have to render each frame to see what it looks like, and as your scene increases in complexity, so does the render time. One of the huge advantages of Mudbox is that all the rendering it does is instantaneous, or real-time. There is no render button. You can interactively sculpt your model, texture-paint it, change material properties, adjust one or multiple lights, and do all of this with viewport filters on while looking at the final result as you are doing the work.

In this chapter, we will go over how to refine and output your render. We will also cover the different lights and their effects on the model.

This chapter includes the following topics:

  • Rendering and using cameras in Mudbox

  • Lighting your model

  • Applying visual effects with viewport filters

  • Creating turntables and recording sessions

  • Rendering in Mudbox and external programs

Rendering and Using Cameras in Mudbox

The 3D view is your render window in Mudbox. All the results of your work are rendered there in real time. You can look at the 3D view through any of the default four cameras—Perspective, Top, Side, or Front (Figure 9.1)—which you can select to look through in the Object List.

Perspective, Top, Side, and Front default cameras in the Object List

Figure 9.1. Perspective, Top, Side, and Front default cameras in the Object List

If you widen the Object List by dragging the divider on the left, you will see some further information about the cameras to their right, such as the field of vision (FOV), the near and far cutting planes, and whether the display is orthogonal or has perspective.

The camera can be manipulated by its properties (see Figure 9.2). These properties enable you to lock the pan, rotate, and zoom transforms of the camera if you need to do that. The Reset button lets you reset the camera to its original state and to reset all or any of the Roll, Rotate, Track, and Dolly properties.

You can also transform the camera along its 2D view plane. The 2D Transform properties start out unmodified, with default values of a scale of one, zero rotation, and zero shift on either the x- or y-axis. You would need to modify them if you are matching a backplate or real-world camera settings.

If you are working in orthographic diagrams or need to look at your model without perspective of the camera, you would select the Orthographic check box. Note that by default, the Top, Side, and Front cameras have this option turned on, which shows up as a 1 in the Ortho property of the camera in the Object List.

You can set up and use your camera settings in Mudbox or import predetermined camera settings from Maya via FBX. FBX, which is short for Filmbox, is a proprietary interoperability file format (.fbx) owned and developed by Autodesk. Camera settings are interpolated to yield results that are functionally equivalent; even image planes associated with the camera are also imported.

Perspective camera properties

Figure 9.2. Perspective camera properties

Note that you can export only the nondefault cameras from Maya using FBX. The default four cameras are ignored. If you want to export one of the default cameras, you need to make a copy of it by selecting it and choosing Edit → Duplicate. Set the Fit Resolution Gate camera attribute to Vertical in Maya to have a better match of the camera in Mudbox (Figure 9.3).

Each camera has an image plane and stencil associated with it. You can access them and their properties by clicking the plus (+) sign to the left of the camera (Figure 9.4). You can click the stencil or image plane to bring up its properties.

Setting the Fit Resolution Gate option to Vertical in Maya creates a better match to the camera in Mudbox.

Figure 9.3. Setting the Fit Resolution Gate option to Vertical in Maya creates a better match to the camera in Mudbox.

If you have a camera at settings you would like to reuse, you can save it as a bookmark in the Camera Bookmarks tray. You select Add Camera Bookmark from the Camera Bookmarks tray drop-down menu (Figure 9.5) and type a name for your bookmark.

The 3D view also has render modes that you can switch to by right-clicking on the screen and choosing options from the drop-down menu (Figure 9.6). These modes enable you to change the settings of the 3D view and turn on and off settings such as Lighting, Wireframe, and Gradient Background.

When you have a render you are happy with, you can save it in one of two ways:

  • Save your screen as a .psd file by clicking File → Export Screen to PSD. We used this in the previous chapter as a means to projection-paint, but it is also a viable way to export the render of the screen, and you can use the exported layers to composite your image further.

  • Save your screen in one of many formats by clicking Render → Save Screen Image. You have to type in a name and the extension of the file format you need to save your image in.

In effect, the contents of both dialog boxes are the same. The only difference is that the outputted .psd file has multiple layers that you can use to composite the image, and the other file formats are flat images.

Stencil and image plane that correspond to the Perspective camera

Figure 9.4. Stencil and image plane that correspond to the Perspective camera

The reason you have buttons for two or four times the screen resolution is to deal with the aliasing on the edges. If you create an image two or four times the screen resolution, you can then resize the images by half or a quarter in your image-editing application, and get results that give you smoother anti-aliased images.

You can also screen grab, or capture, the image of the 3D view by pressing Alt+P in Windows or Command+Shift+3 in Mac OS X. You will not get any feedback to the 3D view image being captured, but pressing the keyboard combinations will save an image to the following directory on your computer:

  • Windows: <drive>:My DocumentsMudbox2011

  • Mac OS X: /Users/<user name>/Desktop

    Adding a camera bookmark

    Figure 9.5. Adding a camera bookmark

    3D view right-click menu options

    Figure 9.6. 3D view right-click menu options

Lighting Your Model

Mudbox allows you to have one of three light types: point, directional, and image-based light (IBL). The default scene loads with a directional light, which you can manipulate by pressing the L key and dragging your mouse or stylus in the 3D view.

Lights can be created by using the Create → Lights menu, from which you can choose one of the three types of lights to add to your scene. You can add multiple point and directional lights, but a scene can have one and only one image-based light.

Each of the lights has its own properties that you can adjust. The light's properties come up in the Properties window when the light is selected in the Object List.

To turn off a light, set its intensity to 0. To delete a light, right-click on it in the Object List and select Delete Light from the drop-down menu.

Point Lights

Point lights emit light in all directions from a point in space. They are best used when you want to add additional light to a specific area, or simulate a light that decays out from a center.

In the light's Properties window, you can choose various settings (Figure 9.7). You can specify the diffuse color of the light and the intensity (you can choose an intensity value greater than 1 if you type that value into the Intensity text box). The Light Decay option enables you to specify how the light diminishes with distance. The Show Manipulator and Show Light check boxes let you translate the light in 3D. The point light is the only light that you can move by using the translation arrows; the other two lights can only be rotated. The Scale property does not affect the application of the light, only the size of the light's representation sphere, which you can turn on by selecting the Show Light check box. You can have multiple point lights in a scene.

The following steps allow you to see the effects of Point Lights:

  1. Start Mudbox and load the Point Lights.mud file from the Chapter 9 folder of the DVD. This is a simple scene with three meshes lit by three point lights arranged around the Cube and Sphere objects. The cube and the sphere have the same material, and the backdrop has the default material.

  2. In the Object List, click on the key light, and you will see its properties in the Properties tray below. If the Show Manipulator property is selected, and you do not see the light translation manipulators in the 3 view, then unselect and reselect the property to show the translation manipulators of the light in the 3D view. Use the manipulator to move the light around, and notice its effect on the scene (Figure 9.8). Do the same for the other two point lights: bounce and rim. Try to match the lighting of some photographs. When you are finished manipulating the lights, clear all of their Show Manipulator and Show Light check boxes. Note that these lights do not cast a shadow.

    Point light attributes

    Figure 9.7. Point light attributes

    Moving a point light

    Figure 9.8. Moving a point light

  3. Click the cube in the Object List to select it, and click the canvas of the 3D view to remove the yellow highlight. The cube remains selected.

  4. Click the Material Presets tab and start selecting the materials in order to see the effect of the lights on each of them. Note that the material for both the sphere and the cube change at the same time because they are both assigned the same material, while the background is not. Repeat step 1 to see the effects of moving the light on the different materials (Figure 9.9).

    Moving the point light on different materials

    Figure 9.9. Moving the point light on different materials

Directional Lights

Directional lights act as very distant light sources, so that their rays are parallel to each other (Figure 9.10). Directional lights are useful for simulating light from a constant source such as the sun or moon. Directional lights are also the only lights that can cast shadows; you select the Cast Shadows option in the light's preferences. Note that the material in the scene should also have its Receive Shadows property turned on if you want shadows to show up on objects that have the material assigned to them. By default, a newly created Mudbox Material has Receive Shadows and Blur Shadow Edges turned on, with a generic gray color for the shadow. You can change or tint the shadow color by choosing a new one from the Color Chooser.

You can specify a directional light's Intensity, which can be greater than 1 if you type a greater value into the Intensity text box of the directional light's property. As with the point light, you can hide and show the light, which is represented with arrows showing the direction of the light. The manipulator for the light, which you can also show and hide, will bring up the rotate manipulator in the center of the X,Y, and Z coordinates. You can also lock the position of the light to the camera so the effect of the light changes with the rotation or tumbling of the camera.

The following steps allow you to see the effects of directional Lights:

  1. Start Mudbox and load the Directional Lights.mud file from the Chapter 9 folder of the DVD. This is a simple scene with three meshes lit by three directional lights that point in three different directions. The cube and the sphere have the same material, while the backdrop has the default material.

    Parallel arrows depicting the direction of the Mudbox directional light

    Figure 9.10. Parallel arrows depicting the direction of the Mudbox directional light

  2. In the Object List, click the key light, and you will see its properties in the Properties tray below. Select both the Show Light and Show Manipulator check boxes and rotate the light to see its effects on the scene. Note that this light casts shadows because it has Cast Shadows selected in the Shadows section of the properties for the key light. Note that you can change the Depth Map Resolution to a larger size to smooth out the edges of the shadows. Switch it to 2048 × 2048 to see the difference. The other two directional lights can also cast shadows but have Cast Shadows turned off in their properties.

  3. Select and rotate the other two bounce and rim directional lights to see their effect on the scene. Try to match the lighting of some photographs.

  4. Add three more directional lights by clicking Create → Lights → Directional. Adjust the Intensity properties of the lights you add so that you do not get a blown-out specular effect, as in Figure 9.11.

    Decrease the Intensity property of the lights to reduce the blown-out lighting effect.

    Figure 9.11. Decrease the Intensity property of the lights to reduce the blown-out lighting effect.

  5. Rotate the newly added lights so they are at different angles. Note that the lighting gets softer (Figure 9.12). When you are finished manipulating the lights, deselect all of their Show Manipulator and Show Light check boxes.

  6. Click the cube in the Object List to select it, and click the canvas of the 3D view to remove the yellow highlight. The cube remains selected.

  7. Click the Material Presets tab and start selecting the materials in order to see the effect of the lights on each of them. Note that the material for both the sphere and the cube change at the same time because they are both assigned the same material, while the background is not. Repeat steps 2 and 3 to see the effects of moving the light on the different materials.

  8. Add a few point lights and manipulate their Intensity and location to see the effects point lights have on a scene lit by directional lights.

    Softer lighting results due to the addition of multiple directional lights

    Figure 9.12. Softer lighting results due to the addition of multiple directional lights

Image-Based Lights

An image-based light (IBL) applies lighting to a model to simulate the lighting in an environment image, which is a digital picture of a naturally or artificially lit scene. Preferably, the image should be a 32-bit high dynamic range (HDR) environment image, which has a greater range of exposure than a standard 8-bit image. Your model is lit with the color and luminance of the environment in the image, in effect simulating the model being in the environment of the image by creating a very realistic distribution of light, even illumination and a more realistic look.

In the Properties window for the light (Figure 9.13), you can modify the Intensity by using the slider. Like the directional light, the image-based light (IBL) can also be rotated only by selecting the Show Manipulator check box. You can also lock it to the camera as you would the directional light. The Image Based Light File property contains the name of the file you intend to use to light your model. You can point to images that you are given, have shot, or have obtained from various resource sites or vendors on the Internet. Mudbox includes a few HDR images that are in the following directories:

  • In Windows: <drive>:Program FilesAutodeskMudbox2011 exturesLightprobes

  • In Mac OS X: /Users/<username>/Library/Application Support/Autodesk/Mudbox 2011/textures/Lightprobes

A scene can have multiple point or directional lights, but only one image-based light. When you create an image-based light, you also replace the reflection map image for all of the materials in the scene with the image in the Image Based Light File property.

The following steps allow you to see the effects of image-based lights:

  1. Start Mudbox and load the Image Based Light.mud file from the Chapter 9 folder of the DVD. This is a simple scene with five meshes lit by Mudbox3PointDefault.tif, a 32-bit .tif HDR image. The two sets of a cube and the sphere have two different materials, while the backdrop has the default material.

  2. In the Object List, click the IBL light, and you will see its properties in the Properties tray below. Select the Show Manipulator property and rotate the light to see its effects on the scene. Note that this light does not cast shadows (Figure 9.14). Deselect the Show Manipulator property.

  3. Click cube2 in the Object List to select it, and click the canvas of the 3D view to remove the yellow highlight. The cube remains selected.

  4. Click the Material Presets tab and start selecting the materials in order to see the effect of the lights on each of them. Materials such as ReflectiveWhite will show a reflection of the image in the image-based light (Figure 9.14).

  5. Because the default IBL, Mudbox3PointDefault.tif, is made up of an image of three diffused lights, the reflectivity isn't as pronounced. Click IBL Light in the Object List, and from its properties click the button to the right of the Image Based Light File text box to bring up the open dialog box.

    Image-based light properties

    Figure 9.13. Image-based light properties

    Reflective materials reflect the image-based light.

    Figure 9.14. Reflective materials reflect the image-based light.

  6. Navigate to the following folder in your respective platform:

    In Windows: <drive>:Program FilesAutodeskMudbox2011 exturesLightprobes

    In Mac OS X: /Users/<username>/Library/Application Support/Autodesk/Mudbox 2011/textures/Lightprobes

  7. Select the chapel.exr HDR image file. This sets the image-based light to this image, and also changes the reflection map of all the materials to the same image (Figure 9.15).

  8. Repeat step 2 to see the effects of moving the light on the different materials.

    After you create an image-based light, all the reflection map properties of all the materials in the scene change to the image of the image-based light.

    Figure 9.15. After you create an image-based light, all the reflection map properties of all the materials in the scene change to the image of the image-based light.

  9. Repeat step 10 and choose different HDR images as your IBL.

  10. Add a few point lights and a few directional lights. Manipulate their Intensity and location or rotation to see the effects when point and directional lights are added to a scene lit by directional lights. You can have an assortment of point and directional lights, in addition to just one image-based light.

Note

Note that you have to deselect the Show Manipulator check box before you move off a light to another object, to do anything besides move the light. If things appear stuck after you manipulate lights, go back and make sure you have all the Show Light and Show Manipulator check boxes deselected in all properties of the lights.

Applying Visual Effects with Viewport Filters

Viewport filters are visual effects that you can apply individually or in aggregate to enhance your sculptures and their assigned materials. Provided that your graphics card supports them, visual effects are applied in real time to your 3D view. However, they do consume computing resources and can make working with your model sluggish depending on your hardware configuration, especially if you have more than one viewport filter active at the same time. As a best practice, turn viewport filters off if they don't benefit your workflow, and then back on again to see their effect.

You can add multiple instances of viewport filters by clicking the drop-down menu of the Viewport Filters window (Figure 9.16). The effect of viewport filters is an aggregate of all the filters that are on. You turn the filters on by clicking their name in the list, or adding them from the New Filter menu in the Viewport Filters drop-down menu. The circle to the left of the filter name indicates whether a filter is on or off. You can also click the circle to toggle the filter on and off.

You may notice that there are more filters in the New Filter list than are listed in the Viewport Filters window. There are two extra filters you can add that are specific to features in Nvidia video cards. The nVidiaAOViewPortFilter and the CgViewPortFilter can be added to your list of filters if your video card supports these features. You can go to the Autodesk Mudbox website (http://images.autodesk.com/adsk/files/autodesk_mudbox_2011_system_requirements_us.pdf) to find out the system requirements for Mudbox and the features that are supported for various video cards.

Nvidia AO filter

Figure 9.16. Nvidia AO filter

The main reason to use viewport filters is to re-create an environment that mimics some of the attributes of how your sculpture will be rendered in its destination application. You can also use them to create different versions of your 3D view to composite in a 2D application.

Note that viewport filters and their settings will not save with your scene file. If you want to save the settings, you should make note of them by either writing them down or capturing the screen with the settings by using a screen capture utility.

Ambient Occlusion

The Ambient Occlusion (AO) filter adds realism to your sculpture by approximating the attenuation of light due to occlusion. The result is the darkening of fine detail areas and corners. When you click on the filter, its properties appear in the Properties window below the Viewport Filters window (Figure 9.17).

Ambient Occlusion properties

Figure 9.17. Ambient Occlusion properties

Ambient occlusion is calculated by sampling the results of casting rays in every direction from the surface. Points on the surface that are surrounded by geometry obstructing the cast rays are rendered darker, while others that aren't are rendered lighter. The Strength property controls the intensity of the ambient occlusion. Adjust the Sample Radius based on how detailed your model is. For example, if you have a model in which you see no AO on some details, you need to try a smaller radius. Adjust the Cutoff Radius to specify the distance the rays are cast from the model to calculate occlusion.

You can adjust the number of occlusion samples with the Quality property. Adjust all the other settings before going to a higher-quality setting, because the more occlusion samples you have, the more impact there is on the responsiveness of the model and the refresh rate of a change in the 3D view while manipulating other AO settings.

The second type of Ambient Occlusion filter in Mudbox is the nVidiaAOViewPortFilter, which is referred to as the Nvidia AO filter. The properties of the Nvidia AO filter are different from those of the Mudbox AO filter. Some of the properties in both AO filters might stand for the same measurement; however, they are named differently to address the naming convention of the Nvidia video card hardware feature.

One advantage of the Nvidia AO filter is that it enables you to select the Show AO Results check box to see its effects (Figure 9.18). It is extremely useful to individually see the AO results independent of the lighting and texturing of your sculpture, because you can see the effects of the AO unobstructed by textures or lights in the scene, or you can capture an image of it to use as a layer in your final composite.

In the properties of Nvidia AO filter, if the Randomize Dirs setting (which randomizes the direction of the occlusion) is on, the Nb Dirs and Nb Steps settings are ignored. The Randomize Dirs option gives you good results, but you can get results that are better, but more computational, which of course translates to slower interaction with the model. While experimenting, I found that deselecting the Randomize Dirs property and using settings of 100 for both Nb Steps and Nb Dirs, a radius of 1.35, Attenuation of 1, a Contrast of 2, a Blur Radius of 20, and an Ambient Blend of 0.5 produced the results I was going for with this model (Figure 9.19). Try different settings on your own model to see what works best.

Try these two Ambient Occlusion viewport filters together or separately to get the desired look.

The third way to add ambient occlusion to your model is through an ambient occlusion texture map. Extract the map from the Maps → Extract Texture Maps menu command and select the Ambient Occlusion Map option from the Maps to Generate list box (Figure 9.20).

Nvidia AO results on the model

Figure 9.18. Nvidia AO results on the model

Smoother AO by changing the Nvidia AO properties

Figure 9.19. Smoother AO by changing the Nvidia AO properties

Extracting an ambient occlusion map on a model's UVs

Figure 9.20. Extracting an ambient occlusion map on a model's UVs

This is not a viewport filter, but ambient occlusion results applied to, or commonly referred to as baked on to, the UVs of your model and output as a texture map. If you leave the Preview as Paint Layer check box selected before extracting the map, the map is extracted and placed at the top of the Diffuse channel set and multiplied to show only the darkened areas.

Extracting an ambient occlusion map as a texture map has yet another list of settings you need to tweak to get the desired look. As with other texture maps, the image size determines the detail, with the bigger texture maps containing more detail. The Quality setting can range from Fastest to Best and is based on the shadow maps used for the calculation of the map.

The Shadow Map Resolution is the size of the shadow maps that are used in the calculation. Shadow Darkness sets how dark the shadowy areas are on the map, ranging from 0 for no shadows to 1 for very dark shadows. The average default of 0.5 should be fine for most uses. Shadow Contrast determines the contrast between the dark and light colors of the extracted ambient occlusion map. It can range from −1 to 1, where the midpoint and default value of zero is again fine for most uses.

The Filter option sets the sharpness or softness of the shadows. The filter ranges from 0.0001 for sharp and finely detailed shadows to higher values to produce softer and blurry detailed shadows.

To get fast results, set the Quality to Fastest and Image Size to a small resolution. Adjust the other settings and regenerate the ambient occlusion map until you get the results that work for you. After you are happy with the results, bump up the Quality and increase the image size. The map extraction will take longer, but you will have to wait that long only once or a few times instead of having to wait that long while changing the other settings.

The benefit of this method of getting ambient occlusion results is that you can composite the generated map with other texture maps in other 3D programs, such as Maya or 3ds Max. The benefit of the Ambient Occlusion viewport filters is that you can composite them onto 2D images.

Tonemapper

The Tonemapper viewport filter remaps the color values displayed in the 3D view. If you turn on the Tonemapper filter, it will recalculate and readjust itself every time you move the camera and change the contents of the 3D view.

You can adjust the Tonemapper properties to compress, expand, or shift the tonal range of the contents of the 3D view. The Tonemapper is useful for changing the overall brightness of an image to evaluate how the result would look in other environments such as different monitors, films, or games.

Note that if you have the Tonemapper on, it could generate anomalies when you render your scene by using the Render menu.

Screen Distance

Screen Distance, which is also called a depth map, generates a grayscale image that is shaded from black to white based on the object's distance from the camera's origin point (Figure 9.21).

Screen Distance viewport filter results

Figure 9.21. Screen Distance viewport filter results

Depth maps are useful for image capturing and then using as a layer in a composite 2D image to give it more depth. It is best used with the Multiply layer blend.

It is also useful for creating stencils, stamps, or displacement maps from sculpted objects. You can then use the captured depth map image to sculpt a 2D relief of your object.

Try this by creating a scene with a sphere. In the Front camera view, turn on the Screen Distance viewport filter and save your screen by either clicking Render → Save Screen Image or by pressing the Save 16-Bit Image button in the properties of the Screen Distance viewport filter. Load the image as a stencil or stamp and use it to sculpt. You will notice that it will create hemispheres.

The Properties for the Screen Distance viewport filter enable you to invert and increase the contrast of black and white values of the depth map.

Depth of Field (DOF)

The Depth of Field (DOF) viewport filter simulates the depth-of-field effect of an optical camera lens: a designated area of your subject appears in focus, while objects before and behind it appear blurry and out of focus. You specify the near and far range from the camera (Figure 9.22).

In Mudbox, the DOF filter helps reduce the sharpness and aliased nature of edges and makes your subject look like a real-world photo shot with optical lenses.

Depth of Field filter results

Figure 9.22. Depth of Field filter results

The DOF viewport filter has three properties: Depth of Field, Focus Distance, and Blur Amount. The Depth of Field setting is the distance, in centimeters, that specifies the range of sharp focus; everything within that range will appear sharp and in focus, while anything outside that range will appear blurry and out of focus. The Focus Distance, also in centimeters, is the distance between the camera and the center of the Depth of Field area. The best way to adjust these two settings is to turn the grid on, if it isn't already, and see the effect of the sliders for these two settings on the grid, where the grid line at the Focus Distance is crisp and the blurriness range shows on the gridlines straddling it. When using this filter, I tend to set the Focus Distance first, and the set the Depth of Field setting second. The Blur Amount enables you to set how blurry the area is that is outside the Depth of Field.

Note that your DOF settings are particular to your camera location and will have to be redone if you move the camera.

Normal Map

The Normal Map viewport filter shades objects by using RGB color values to represent the orientation of their surface normals. Like the DOF filter, it is useful as a quick way to create normal maps from your 3D view as a 2D image. You can then use the normal map on surfaces in other 3D software packages.

Non-Photorealistic (NPR)

The Non-Photorealistic viewport filter makes the objects in the 3D view appear as if they were hand-drawn on textured paper (Figure 9.23). It is a great way to represent various angles of your image as a 2D sketch.

You can experiment with the different settings. But most simply, you can turn on this filter and set all the settings to zero and get a convincing-looking sketch of your sculpture. Note that turning textures on for your sculptures influences whether they appear as a subtle tint, and having them off makes your model look more like a drawing.

You can add multiple NPR filters to get a compounded look.

Non-Photorealistic viewport filter results

Figure 9.23. Non-Photorealistic viewport filter results

Creating Turntables and Recording Sessions

Besides the Save Screen Image option, the Render menu has two other options that enable you to make movies of your work. The Record Movie option lets you record either the contents of the 3D view or the entire Mudbox window to view or share your work. The Create Turntable Movie option lets you create a turntable animation of your sculpture and save it as a movie file in one of many movie formats.

Record Movie

To record a movie of a work session, click Render → Record Movie.

In the Record Movie dialog box (Figure 9.24), you specify the Width and Height of the movie in pixels. Entering values different from the Actual Size will add either horizontal or vertical padding to fit the aspect ratio of your screen size to the Width and Height you specify. If the Width and Height sizes you specify are larger than the resolution of the user interface, the movie will appear pixelated as the images are sized up.

Record Movie dialog box

Figure 9.24. Record Movie dialog box

You specify the timing your movie will record at from the drop-down menu that gives you options at 5, 10, or 15 frames per second (fps), and playback timing of your animation from the drop-down menu that gives you options at 5, 10, 15, and 30 fps.

Numerical countdown before recording

Figure 9.25. Numerical countdown before recording

If you set the record and playback rates to identical values, the resulting movie will reflect your actions on screen in real time. However, setting the Record At setting to a lower frame rate and Playback At to a higher rate produces a movie that is more choppy and accelerated and that looks more like a time-lapse video shot at intervals.

You can select the Automatically Pause Recording When Idle check box, which is on by default, to stop the recording whenever the tool cursor is inactive. Recording will continue when the tool cursor is moved again. Make sure to turn this option off if you intend to narrate your work session after the fact in a video-editing program, and are pausing to explain something.

When you click the Start Recording button, a numerical countdown window will appear in the lower-right corner of the application window to indicate that recording is about to begin (Figure 9.25). When it counts down to zero and the recording begins, two new buttons will appear in the lower-right corner of the status line. These buttons will enable you to Pause, Continue, or Stop the recording.

After you press the Stop button, you will get the Screen Recording Complete dialog box (Figure 9.26), which enables you to either abort the session by clicking the Delete Recording button, or save it in one of many movie formats by selecting it in the drop-down menu and clicking the Save As button.

The movie formats that are available are MPEG-4, Adobe Flash, Small Web Format, QuickTime, or File Sequence.

Dialog box to input file path and save your recording after you click Stop

Figure 9.26. Dialog box to input file path and save your recording after you click Stop

Record a Turntable Movie

Turntables are a great way to show a sculpture from many points of view, because your model rotates 360 degrees. The turntable movie will record a turntable of your model in the state it is in, whether it is at lower or higher subdivision level, or has visible textures or hidden parts. Mudbox renders each movie frame during this process, so it is possible to produce high-quality movies at resolutions greater than the actual image size in the 3D view.

To record a turntable, click Render → Create Turntable Movie. This brings up the Create Turntable Movie dialog box (Figure 9.27).

Create Turntable Movie dialog box

Figure 9.27. Create Turntable Movie dialog box

To create a turntable, your model or scene needs to be centered at the origin so it rotates on its vertical axis uniformly; otherwise, you will get a more elliptical rotation. Note that turntable movies are automatically rendered with a solid color background that you can specify by using the Viewport Flat setting color preference in Windows → Preferences in the Windows version, and Mudbox → Preferences in Mac OS X.

You can specify the Width and Height, Number of Frames, and Playback timing of your animation, as well as the movie format it is rendered in. The combination of these will determine how long your movie takes to render, in addition to the file size of your movie file.

To save time, choose smaller sizes and a small number of frames to see the results of your animation, and then add larger sizes, more frames, and antialiasing if you are satisfied with the results. Antialiasing gives you better-quality movies, but your movie render will take longer.

Rendering in Mudbox and External Programs

To show off your Mudbox work, you need to have your result rendered. Your render could be a single still image, multiple still images showing your subject at different angles or in different environments and lighting, or a sequence of images that make up a movie.

There is a wealth of rendering engines outside of Mudbox that you can use to render your image. Some renderers such as RenderMan by Pixar lend themselves better to animation. Some others simulate the precision of physical cameras by using practical camera settings. Some support different lighting technologies, and some provide a vast array of real-world materials you can apply to your models.

In this section, you will use the render output of Mudbox to create still image renders in Mudbox, and then export them and composite them in Adobe Photoshop. We will also use a software package I have found to be excellent for rendering high-resolution sculptural mesh models called KeyShot by Luxion. KeyShot is a great way to showcase your model as a sculpture without any textures. Finally, as you did with the egg in Chapter 1, "Getting Your Feet in the Mud: The Basics of the Mudbox Production Pipeline," you will export a lower-resolution version of a model with its displacement and texture maps and render it in Maya by using mental ray.

Compositing Mudbox Render Images in Adobe Photoshop

As you have seen, the rendering engine in Mudbox is unlike traditional render engines you are used to, where you compose your scene and then start a render process. Mudbox renders your image in real time, with real-time viewport filters and real-time lighting. You also have the option to use backdrops in your render by adding the camera image plane.

To create high-quality 2D images from Mudbox, you need to use the Render → Save Screen Image, or File → Export Screen to PSD options to output the contents of the screen as 2D images. Although the Export Screen to PSD option is intended for projection painting in Photoshop, you can also use the multiple layers it outputs for compositing purposes. The layers, all of which except one are locked for editing, can be duplicated and used as layers in a composite image. The Save Screen Image outputs only a single layer.

You can also output the depth map and the Show AO results screen for the Nvidia Ambient Occlusion viewport filter as layers to composite as well. In this next exercise, you will create these multiple screens and create a final 2D composite image in Adobe Photoshop:

  1. Start Mudbox and load the Athena.mud file from the Chapter 9 folder of the DVD. This is the final results of the work we started in Chapter 5, "Digital Sculpting Part I."

  2. Click Create → Camera to add a camera to your scene. In the Object List, the camera is added at the bottom. Right-click on your newly created camera and call it RenderCam.

  3. Right-click on the RenderCam camera and select Look Through from the drop-down menu. Use camera navigation to position your camera so that you frame the model in the position that you want to capture as your image.

    Lock the Pan, Rotate, and Zoom camera properties

    Figure 9.28. Lock the Pan, Rotate, and Zoom camera properties

  4. When you are happy with the camera positioning, click the Lock Pan, Lock Rotate, and Lock Zoom options to lock your camera (Figure 9.28). Because even a slight motion in the camera can disrupt the composition in the next few steps, locking the camera is an extra step that will save you the frustration of accidentally moving the camera and having to recapture all your screens. Creating locked cameras is also a good way to save views of your model that you can jump to quickly.

  5. Click the Camera Bookmarks tab in the South Frame tray, and from its window drop-down menu select Add Camera Bookmark (Figure 9.29). Type RenderCam and click OK; this creates an icon image of your screen as a button that you can click in the Camera Bookmarks tray. Now you have a bookmark that you can use to quickly go to the camera view you just created. Note that you have to be looking through the RenderCam for the camera bookmark to get back to your original view.

    Adding a camera bookmark

    Figure 9.29. Adding a camera bookmark

    The edges of models in the Mudbox 3D view are jagged (Figure 9.30). These edges could be on the fringes of the model or within the model itself. When you capture your screen to a 2D image, the jagged edges will detract from the polished look of a composited image, and you would need to get rid of them. There are a few methods at your disposal to do that. The most obvious, of course, is to use the Blur brush in Photoshop and soften the edges. Another option is to use the Depth of Field viewport filter and dial in the three sliders in the filter to blur out some of the edges. Another very effective method is to save your image at a higher resolution than what is in the 3D view and then resize the image to its original size in Photoshop. Or you can use a combination of all three of these methods.

    Jagged edges in the 3D viewport

    Figure 9.30. Jagged edges in the 3D viewport

  6. Click the Viewport Filters tab and select the Screen Distance filter. Note that instead of getting a depth map, you get more of a silhouette image. The reason is that the depth map is calculated within the bounding box, or area around all the visible models in your scene. In this case, Mudbox is calculating the distance between the back and front of the backdrop, of which the character takes very little space, and that is why there is no gradation of shading on her body. Even though there is a depth map on the character, the gradation on her covers one or two colors of the range of colors between black and white, and so you see more of a silhouette. To get a more diverse gradation, in the Object List deselect the Visibility circle of the backdrop mesh to hide it. You will now see the difference, as demonstrated in the first two variations in Figure 9.31.

    Screen Distance variations

    Figure 9.31. Screen Distance variations

  7. Click the Depth of Field viewport filter and adjust the Focus Distance, Depth of Field, and Blur Amount settings to give your depth map an area of focus and to blur out the closest and farthest areas on the character, as seen in the third variation in Figure 9.31.

  8. Click Render → Save Screen Image. In the Save Screen Image dialog box (Figure 9.32), click the Use 4× Screen Size button. Save all your screens at 4× resolution to get rid of the jagged edges. You can then change their image sizes to get the resolution you need. Click the Save Image button and save your image as screen_distance.bmp.

  9. With the Screen Distance and Depth of Field viewport filters still on, click the Ambient Occlusion viewport filter to turn it on. Adjust the Ambient Occlusion settings, and make sure you choose Best in the Quality property when you are finished making adjustments. On a textured model, I find that adjusting the AO settings is easier with the Screen Distance filter on (Figure 9.33). Click Render → Save Screen Image, and in the Save Screen Image dialog box (Figure 9.32), click the Use 4× Screen Size button and save your image as mudbox_ao.bmp.

    Saving the screen image at 4x screen size

    Figure 9.32. Saving the screen image at 4x screen size

  10. Turn off the Ambient Occlusion, Screen Distance, and Depth of Field viewport filters, and, if you have a supported Nvidia video card, turn on the Nvidia AO Viewport filter by selecting it from the Viewport Filters window drop-down menu. Click the Show AO results check box to view only the ambient occlusion on the image. Adjust the settings of the Nvidia Ambient Occlusion filter to fine-tune the occluded areas on the character. Turning off Randomize Dirs enables you to bump up the Nb Steps and Nb Dirs and adjust the settings to get a smoother occluded image. When you get an image where the occluded areas are darkest and the transition between the dark and light areas are subtle, click Render → Save Screen Image. In the Save Screen Image dialog box, click the Use 4× Screen Size button, and save your image as nVidia_ao.bmp. You can and should save multiple versions of these screen renders with different settings to try them out in your composition.

    Adjusting AO with the Screen Distance viewport filter on

    Figure 9.33. Adjusting AO with the Screen Distance viewport filter on

  11. Turn off all the viewport filters and make sure that the Grid and Gradient Background are off by right-clicking on the canvas of the 3D view and deselecting them from the drop-down menu. Click Render → Save Screen Image. In the Save Screen Image dialog box, click the Use 4× Screen Size button, and save your image as beauty.bmp. This is the beauty pass. Close Mudbox.

    At this juncture, you should have four images to load into Adobe Photoshop to composite into a final image.

  12. Open Adobe Photoshop and click File → Scripts → Load Files into Stack, which enables you to load all your files as layers in the same image. In the Load Layers dialog box (Figure 9.34), click the Browse button, navigate to the location on your hard drive where you saved the composition images, and select all four files. Photoshop will load all files as layers, and also align your images so they are on top of each other. However, these layers will not stack up in the correct order.

    Opening all four files in Photoshop

    Figure 9.34. Opening all four files in Photoshop

  13. Click Layer → New → Layer and call the new layer background. Use the Fill tool in Photoshop to fill the background with a bluish-gray color.

  14. Drag and drop the layers to order them in the following order:

    nVidia_AO, Mudbox_AO, screen_distance, beauty, background (Figure 9.35).

  15. Use the Crop tool and draw a rectangle around the character (Figure 9.36). Click the checkmark on the toolbar to finalize the crop operation.

    Images in Photoshop layers

    Figure 9.35. Images in Photoshop layers

  16. Hide all the layers except the beauty layer by clicking the eye icon in front of them. Select the beauty layer by clicking it in the Layers window. Select the Magic Wand tool and set its Tolerance to 1. Click on the background to select it (Figure 9.37).

  17. With the selection on, click the Delete button to delete the background. This should make the background transparent by displaying Photoshop's checkered pattern (Figure 9.38).

    Cropping the image around the character

    Figure 9.36. Cropping the image around the character

  18. With the selection still active, click the eye icon in front of the screen_distance layer in the Layers window, click the layer to select it, and press Delete. This makes the background of the screen_distance layer transparent by displaying Photoshop's checkered pattern and removes the black background around the character. Repeat this step for the Mudbox_AO and nVidia_AO layers. You are now left with just the character in all the layers except the background layer.

    Select the background of the image by using the Magic Wand tool with a Tolerance of 1.

    Figure 9.37. Select the background of the image by using the Magic Wand tool with a Tolerance of 1.

  19. Click Select → Deselect to deselect the background area.

  20. Select the nVidia_AO layer and change its blend mode to Multiply. Do the same for the Mudbox_AO and screen_distance layers.

  21. Use the opacity slider for the multiplied layers to get a blend that will show off the character.

  22. When you are satisfied with the image (Figure 9.39), save it as a composite image. You can flatten the layers, or leave them for future editing. You can also choose to resize your image into a smaller one if needed.

    Delete the background to make it transparent.

    Figure 9.38. Delete the background to make it transparent.

You can now add background images or use the wealth of Photoshop image-processing tools to adjust and refine your image. All the files for this exercise, including the final composite Photoshop .psd file can be found on the DVD in the Chapter 9composite images folder for you to examine and compare.

Composited image

Figure 9.39. Composited image

Rendering Mudbox High-Resolution Models in Luxion KeyShot

I have chosen to include Luxion KeyShot in this chapter because of its ability to load multimillion-polygon high-resolution models such as the models created in Mudbox, and to easily render them with speed and photographic results.

KeyShot is a stand-alone, interactive, raytracing, and global illumination program that works more like a digital camera than a rendering application, and is available for Windows (both 32- and 64-bit) and for Mac OS X.

To go through the steps in this section, you can download a 15-day trial version of KeyShot from www.keyshot.com. If you intend to showcase your sculpture as only a sculpture, using KeyShot is a great way to get quick and beautiful results.

Follow these steps to render a model with KeyShot:

  1. Start Mudbox and load the Athena.mud file from the Chapter 9 folder of the DVD. This is the final result of the work you started in Chapter 5.

  2. All the meshes should be at their highest subdivision level. From the Select/Move Tools tray, click the Objects selection tool and select the Body, Head, Eye_rt, and Eye_lt meshes in the scene by clicking on them in the 3D view. They should all be highlighted in yellow (Figure 9.40).

    All four objects in the scene selected

    Figure 9.40. All four objects in the scene selected

  3. Click File → Export Selection, give it a name, and export the meshes as a combined .obj file. Notice the progress bar in the bottom-left corner of the status bar as it completes the export. Note that you have exported a 7,263,232-polygon model, which has resulted in a file of a little more than 800KB. You are not exporting the textures for this section, although you could, and KeyShot is capable of rendering textures. The reason for this is that you are just going to render the model as a sculpture and not a painted sculpture.

  4. Close Mudbox and start KeyShot (Figure 9.41).

    KeyShot interface

    Figure 9.41. KeyShot interface

  5. Click the Import Model icon and import the .obj model from the location you saved in step 3. After you select your model, click Open, and you will get the Import Model dialog box (Figure 9.42). Make sure Calculate Normals is the only option selected and click OK. KeyShot will take a little while to load your model. Because this is a rather large model, it will take a few minutes to load depending on your system configuration.

  6. When your model gets imported, it will be lying down on the ground, and you will need to prop it up. First, you need to position the camera; you move the camera in KeyShot exactly the same way as you do in Maya or Mudbox. Position the model in the middle of screen (Figure 9.43).

    Import Model dialog box settings

    Figure 9.42. Import Model dialog box settings

  7. Right-click on the model and select Move Object (Figure 9.44) to bring up the Move Object dialog box.

  8. All you need to do to prop up your model is to rotate it 90 degrees around the x-axis. Type 90 in the X Rotate text box and click Apply (Figure 9.45). Note that shadows are emanating from the model's hips because she is intersecting the ground plane at the location of the shadow. Click the Snap to Ground button in the Move Object dialog box. This positions the model on the ground, and you will now see the shadow at her feet.

    You will notice that the resulting image starts out pixilated, or blocky, and the squares on the screen start getting smaller and smaller until you get a grainy look that after a while becomes a very clear image. Whenever you make a change in the settings of KeyShot, your image will re-render. The render speed is based on the complexity of the scene, including the resolution of the model, the lights, and the materials you choose.

    Model centered in the interface

    Figure 9.43. Model centered in the interface

    Right-click on the model and select Move Object.

    Figure 9.44. Right-click on the model and select Move Object.

    Rotate 90 degrees around x-axis.

    Figure 9.45. Rotate 90 degrees around x-axis.

  9. By using the same camera navigation tools as Mudbox and Maya, frame the model. Again KeyShot will re-render the image after you stop. When you are happy with the position, click the Open Environment Image button. This opens up the KeyShot Environments folder, where you can load an image-based light. As in Mudbox, these images will light your model based on the lighting in the image. As in Mudbox, these images are HDR images. Select the HDRLightStudio_car_studio_medium.hdz file. This will light your model.

  10. Use the up and down arrows to change the brightness of the light in large increments, and the left and right arrows to change the brightness in smaller increments. Press Ctrl and click and drag your mouse on the model to rotate the environment image, which is similar to pressing the L key in Mudbox. However, the environment lighting image can be rotated around only the z-axis.

  11. Press the E key to hide the environment background. The environment light will still light the model, but it will not be visible. You can also still rotate the background image by pressing Ctrl and clicking and dragging on the model even though it is not visible.

  12. Click the Open Backplate image button. From the Studio folder in the KeyShot Backplates folder, load the studio_SpotFloor.jpg backplate (Figure 9.46).

  13. Click the Display Material Library button to bring up the Material Library (Figure 9.47). Drag and drop some materials onto your model to see what they look like. When you are finished experimenting, click the Other tab and drag and drop the Matte White material onto your model. Use the left and right arrows to change the brightness in small increments until the lighting is not blown out and you can see the fine sculptural detail on the surface of the model.

    Model with environment image-based light and backplate

    Figure 9.46. Model with environment image-based light and backplate

    The KeyShot Material Library

    Figure 9.47. The KeyShot Material Library

  14. Click the Image tab, and change the Resolution to a larger size depending on your screen size—for example, 1280 × 720. Click the Environment tab and select Ground Shadows and Ground Reflections (Figure 9.48).

    Ground Shadows and Reflections options on the Environment tab

    Figure 9.48. Ground Shadows and Reflections options on the Environment tab

  15. Make some finer adjustments to the camera and environment light until you are satisfied with the look of the image. Click the Render tab and type the render Width and Height in pixels. Choose an Output Format from the drop-down list. You can choose a .jpg, a .tif, or an .exr file and select the path where you would need to store the image. You can click the Render Image button in the Render tab, or click the Render Image button in the Main tab to render your image. The Rendered image will be placed in the folder you specified in the Save As property in the Render tab (Figure 9.49).

    Render tab properties

    Figure 9.49. Render tab properties

In the Pro version of KeyShot, you are also able to create turntables from rendering a sequence of images, which you can then composite into a video in applications such as Adobe After Effects.

I have found KeyShot to be extremely quick and useful for generating very high-quality renders of multimillion-polygon models in full sculpted fidelity without having to rely on displacement maps and normal maps.

In the Chapter 9images folder, you will find some examples of high-resolution image renders from KeyShot using models made in Mudbox (Figure 9.50).

In the Chapter 9Videos folder on the DVD, you can watch the movie Athena_KeyShot.mov. In this turntable render sequence, I have added only a simple stand to the character you have been working with.

Rendered image

Figure 9.50. Rendered image

Rendering in Maya

There are plenty of rendering solutions on the market. Some, like Luxion's KeyShot, are stand-alone. Others are made specifically for one 3D application, such as SplutterFish Brazil for 3ds Max, or for multiple 3D applications, such as Chaos Group's V-Ray for 3ds Max and Maya. Some applications have some powerful and fast renderers, such as the renderer in Luxology's Modo. In addition to all of these renderers, Autodesk Maya, 3ds Max, and Softimage have their built-in renderers, and of course all three also have Nvidia's powerful and versatile mental ray renderer. You have plenty of choices of applications and renderers to take your Mudbox work into for rendering purposes. The methodology and steps of the operation in these applications might be different, but the concepts are the same.

In this section, you will take your character into Maya, and use mental ray to render it. Unlike the preceding section, you will not be taking the high-resolution multimillion-polygon model into Maya, because Maya is aimed at a variety of applications, most notable of which is animation, and animating a multimillion-polygon model is not feasible with today's technology. Just as you did with the egg in the first chapter, you will use a displacement map to depict the detail you sculpted on a lower-resolution version of the model.

You will need to export the following out of Mudbox:

  • Low-resolution models of the head and body, exported as .obj files, or .fbx files. The .fbx format has advantages over .obj in that you can export the models as well as the textures.

  • Displacement maps for the head and body so you can use them to depict the high-resolution detail on the low-resolution mesh models you exported.

  • A flattened version of the Diffuse, Specular, and Gloss texture channels.

To export the models individually, you need to select them by using the Objects selection tool, and click File → Export Selection. Note that you need to have your model in the lower subdivision level, because this command will export the model in its current subdivision level. You can select and export multiple objects that will load as a single .obj file, but then you would need to separate them in Maya to assign different materials to the individual parts. You can export these models as .obj or .fbx files by selecting the format from the Save As Type drop-down menu that comes up when you click File → Export Selection.

You have seen the .obj file format, and its ability to have both the geometry and the UV data. The .fbx format will export both of those in addition to some other features of the model, such as materials, textures, cameras, sculpting layers as blend shapes you can animate in Maya, and more. Some of these features are an exact transfer, and some are modified by the host application.

FBX is a proprietary interoperability file format owned and developed by Autodesk. FBX plug-ins are available for Maya 3ds Max and supported by other Autodesk products such as MotionBuilder and Softimage using Crosswalk.

There are two topics in the help files called Importing Using FBX and Export Using FBX, and both have tables of the features of your scene that transfer in and out of Mudbox using the .fbx file format. You will note that just like the .obj file format, you get perfect compatibility with models and their UVs. However, materials, paint layers, sculpt layers, cameras, image planes, and joints go through conversions that result in functionally equivalent features during the import or export operation. You will also notice that lights do not transfer.

In this scenario, you need to export models, textures, and displacement maps, so you can use .obj, .fbx, or the new and extremely simple Select File → Send to Maya feature, which uses FBX and automates many of the steps and helps speed up your workflow. If you select Preview as Bump Layer when you extracted your displacement map, or imported your displacement map into a bump channel, the Send to Maya option also exports the bump map and adds it as a displacement map in Maya.

  1. Start Mudbox and load the Athena.mud file from the Chapter 9 folder of the DVD.

  2. You will need to go down in subdivision on both the body and the head to export the lower-subdivision version of them. Use the Objects selection tool to select the body. Press the W key to bring up the wireframe. Move your mouse pointer to anywhere on the body mesh that is highlighted in yellow and press Pg Dn while keeping your pointer on the body until you are at subdivision level 1. Note in the Object List that the model is at 5,088 faces, or polygons.

  3. Select the head and move your mouse pointer to anywhere on the head mesh that is highlighted in yellow (Figure 9.51). Press Pg Dn while keeping your pointer on the body until you are at subdivision level 1. Note in the Object List that the model is at 8,008 faces, or polygons.

  4. Click Maps → Extract Texture Maps → New Operation to bring up the Extract Texture Maps dialog box. Type head_disp as the name for your extraction operation and select the Displacement Map check box.

  5. In the Target Models section, click Add Selected, which should add the Head mesh, but the default is to add it at the lowest subdivision level. Click on the words level 0 to the right of Head, and select level 1 (Figure 9.52). Note that the drop-down list indicates that level 1 is the current level. Select the Smooth Target Model check box.

  6. In the Source Models section, click Add Selected, which should add the head mesh. Here the default is to add it at the highest subdivision level, which is what you want. Select Smooth Source Models to get a smoother extraction result with fewer jagged lines and fewer artifacts. If you lose detail due to having Smooth Source Models selected, you can always extract another map with it deselected and compare the results in the Image Browser.

    Selected head mesh

    Figure 9.51. Selected head mesh

  7. For the Locate Method, you will use Raycasting because it captures the height differences more accurately, particularly when the vertices on the higher subdivision levels have been translated off of the normal compared to the lower subdivision level. Click the Best Guess button and select Test Both Sides.

  8. To output a 4K displacement map, choose 4096 × 4096 in the Image Size drop-down menu.

  9. Select Normalize to Search Distance. Also select Preview as Bump Layer because we want the generated displacement map to be added to the model as a bump layer, which in turn will be sent into Maya as a displacement map.

  10. Click the folder icon to the right of the Base File Name text box. Save the displacement map as head_disp.exr and choose the OpenEXR [32 bit Floating Point, RGBA] file format in the Save As Type drop-down menu.

    Selecting subdivision level 1

    Figure 9.52. Selecting subdivision level 1

  11. Click Extract to extract your map. You will see the progress of the operation in the map, and subsequently get a Map Extraction Finished Successfully dialog box. Close this dialog box to return to your scene.

  12. Repeat steps 4 through 11, creating another new extraction operation called body_disp. Remember to select level 1 in the Target Models section by clicking on the words level 0 to the right of Body, and selecting level 1. Save the extracted displacement map as body_disp.exr.

    You could at this stage also extrude ambient occlusion maps that you can composite, or bake, onto the texture map. Next you will export the models, the texture maps, and the displacement map, which will be a very simple operation. Before you do that, click Windows → Preferences (Window → Preferences on the Mac), and make sure that you have the link to the Maya executable (maya.exe file) in the Maya text box of the Paths section. In my case, it is C:Program FilesAutodeskMaya2011inmaya.exe.

  13. Click File → Send to Maya. In the Send to Maya dialog box (Figure 9.53), select All Meshes because you need to export them all to Maya. It is important to note that all the meshes will be sent in the subdivision level they are currently in. Also note that you can send individual objects that you should select before clicking File → Send to Maya. This will be useful if you need to isolate a specific object to troubleshoot any anomalies that occur after you get the data in Maya.

  14. You want to get the paint layers too, so select the option Flatten Paint Layers in Each Channel before Sending. This will save you time compositing the layers in Photoshop. This will generate a single paint layer for each channel type (such as one for Diffuse, one for Specular, one for Gloss, and so on). Note that this composite texture image will flatten the layers with their applied layer blend modes.

  15. Because you are not going to use blend shapes for your sculpting layers, select the Flatten Sculpt Layers before Sending option.

  16. Click the Send button, which opens Maya with your exported, textured model. You will get a Maya security warning (Figure 9.54), so click the Allow button to continue the operation. If you have any issues with the transfer, make sure the fbxmaya.mll (or fbxmaya.bundle on the Mac) is loaded in the Plug-in Manager (Window → Settings/Preferences → Plug-in Manager).

    Send to Maya Dialog box settings

    Figure 9.53. Send to Maya Dialog box settings

    Click the Allow button to pass the Maya security warning.

    Figure 9.54. Click the Allow button to pass the Maya security warning.

    Character in Maya in shaded and textured mode

    Figure 9.55. Character in Maya in shaded and textured mode

  17. In Maya, press the F key and navigate the camera to frame the character in the viewport, and then press the 6 key to get a shaded and textured display in the viewport (Figure 9.55). As you can see, the model, UVs and textures have come across.

    Create a Maya project.

    Figure 9.56. Create a Maya project.

  18. Click File → New Project. In the New Project dialog box (Figure 9.56), click the Browse button and find a location for your project. I have saved a version of my project on the DVD in the Chapter 9 folder. Click the Use Defaults button to populate the locations, and click Accept to create the Maya project on your hard drive.

  19. Click File → Save Scene and save your scene as 01_athena_start. This file will be saved in the Scenes folder of the Maya project you just set up.

  20. Click Window → Rendering Editors → Hypershade to bring up the Hypershade. Notice that the shaders for the body, head, the two eyes, and the plates are brought in from Mudbox (Figure 9.57).

    Imported shaders in Hypershade

    Figure 9.57. Imported shaders in Hypershade

  21. Right-click on the head shader and select Graph Network from the marking menu. Examine the shader network that Maya has created with the imported information from Mudbox (Figure 9.58). Notice how all the shaders are directly hooked up to the head shader except the displacement shader, which is connected through a shading engine node. You can see which outputs are connected to which input in the various shaders by hovering your mouse on the line and arrow between them. It is a good idea to see what these connections are so you can troubleshoot them if something does not render correctly. For the most part, the automatic generation of these nodes from the Send to Maya command in Mudbox is perfect and does not need further manipulation. Do the same for the body, eye, and plates shaders.

  22. Click Window → Rendering Editors → Render Settings. In the Render Settings dialog box, select mental ray from the Render Using drop-down menu to select mental ray as the rendering engine. If it is not in the drop-down menu, you need to load it from the Window → Settings/Preferences → Plug-in Manager dialog box. It is the Mayatomr.mll plug-in (Figure 9.59). You should also have the OpenEXRLoader.mll plug-in loaded because you chose 32-bit OpenEXR as the format to save your displacement map.

  23. In the Quality tab, select Production from the Quality Presets drop-down menu (Figure 9.60).

    The head shader network in Maya

    Figure 9.58. The head shader network in Maya

    The Mayatomr.mll plug-in loaded in the Plug-in Manager

    Figure 9.59. The Mayatomr.mll plug-in loaded in the Plug-in Manager

    Change the quality preset to Production in the Render Settings dialog box.

    Figure 9.60. Change the quality preset to Production in the Render Settings dialog box.

  24. Change the quality preset to Production in the Render Settings dialog box.
  25. In the Render view, you will notice that the displacement is applied to the head, but the head looks inflated (Figure 9.61). To resolve this, double-click the file node (Figure 9.62) in the Hypershade to bring up its properties. In the Color Balance section of the attributes for the file node, change the Alpha Gain attribute from 1.000 to 0.100.

  26. Render the scene again and notice that the inflated look of the head is gone, and the resulting image looks closer to what you had in Mudbox. The resulting image does, however, have some pixilated areas, especially around the ears and nostrils (Figure 9.63).

  27. To remedy the anomalies, you need to apply a mental ray approximation node to set up the displacement tessellation settings for mental ray relative to the detail and subdivisions you had in Mudbox. Choose Window → Rendering Editors → mental ray → Approximation Editor to bring up the mental ray Approximation Editor dialog box (Figure 9.64).

    Overinflated displacement render

    Figure 9.61. Overinflated displacement render

    Displacement file node (center) and the Alpha Gain attribute changed to 0.1

    Figure 9.62. Displacement file node (center) and the Alpha Gain attribute changed to 0.1

    Render anomalies on ear and nostrils

    Figure 9.63. Render anomalies on ear and nostrils

    mental ray Approximation Editor

    Figure 9.64. mental ray Approximation Editor

  28. Click on the head model in the workspace to select it, and click the Create button in the Subdivisions (Polygon and Subd. Surfaces) section of the mental ray Approximation Editor. This creates an approximation node assigned to the head and opens up its attributes (Figure 9.65). The simplest approximation method is specifying Subdivision, and luckily a subdivided model is where you started, so you should correspond the N Subdivisions attribute to the highest subdivision level of the head in Mudbox. The lowest-polygon mesh in Mudbox is referred to as subdivision level 1, and it is also the same level at which you exported your low-polygon head. To get to level 5, which is the highest level of subdivision for the head at which we extracted the displacement map, you needed to divide the mesh four times, and that is the value that you need to have assigned to the N Subdivisons attribute.

  29. Render your image again and notice that the anomalies are gone, and you have a near-perfect representation of your high-definition model (Figure 9.66). Note that this does make your render time longer.

    Attributes of the mental ray Approximation Editor

    Figure 9.65. Attributes of the mental ray Approximation Editor

  30. Repeat steps 25 through 29 for the body, using 5 as the value for the N Subdivisions attribute.

You now have the representation of your Mudbox work in Maya, and you can add lights and use any of the mental ray features to render our image. I have added lights, a camera, and render settings in the 03_final.ma file in the Chapter 9AthenaScenes folder of the DVD with renders of the character we created in Mudbox (Figure 9.67).

Render results with the Approximation Editor

Figure 9.66. Render results with the Approximation Editor

Model rendered in Maya using mental ray

Figure 9.67. Model rendered in Maya using mental ray

Summary

The lighting provided with the point, directional, and IBL lights, in addition to the responsive and realistic renderer with viewport filters in Mudbox, will get you well on the way to envisioning your creations. If you need to add to or take your results beyond what Mudbox can produce, Mudbox provides you with ample 2D and 3D export options to load your information into other painting, image-editing, compositing, or 3D applications.

This brings us to the conclusion of this book. Thank you for reading it. It is my most sincere hope that it has been useful to you, and that you have learned what you need to know about Mudbox to create your art.

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

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