Chapter 9

Rendering, Lighting, and Materials

Once you have created a model in ZBrush, no doubt you will want to show it off to the world. Whether you are sharing your work online, presenting a model for approval from a director, or building up your portfolio, you’ll want to make sure your models look as good as they possibly can. To help you accomplish this, ZBrush offers several rendering modes that range from simple to complex. Realistic shadows, transparency, subsurface scattering, ambient occlusion, and other options are all effects that you can take advantage of when rendering your creations.

This chapter covers the basics of working with lights, materials, and the different rendering styles available in ZBrush. Through a series of exercises, you’ll learn how to use all the options available to create amazing images from your models.

This chapter includes the following topics:

  • Render modes
  • Lights
  • Standard materials
  • Material Capture tool
  • Advanced render effects
  • Rendering fibers

Rendering Basics

Rendering in ZBrush involves how the pixols and 3D polymesh objects look on the canvas based on the colors and materials applied, the lights in the document, and the rendering style selected in the Render palette. By default, all models are constantly rendered in Preview mode while you work in a typical ZBrush session. So throughout this entire book, you’ve been using Preview render mode without realizing it. Preview mode features preview shadows, reflection, basic lighting, and simplified materials (Figure 9-1).

Figure 9-1: A model displayed in Preview rendering mode, which is the default rendering mode

f0901.tif

Figure 9-2: Use the Flat, Fast, and Best buttons in the Render palette to switch between render modes.

f0902.tif

The three other standard render modes are activated using the Flat, Fast, and Best buttons, which are on the Render palette (see Figure 9-2). You can see examples of the render modes in Figure 9-3. Flat render mode renders only the color of the pixols and 3D polymesh objects. It is quick and it allows you to view the colors applied to a polymesh, through polypainting or through textures, without the distraction of lights, materials, and shadows. Fast is similar to preview rendering; however, no shadows are visible. Best mode renders accurate shadows, reflections, global illumination, and other effects. It takes more time than the other modes and is used most often for finalizing a completed composition in ZBrush. Rendering a 3D polymesh is useful for when you want to present your digital sculpture as part of a portfolio.

Figure 9-3: Clockwise from the upper left, a model is displayed using Flat, Fast, Preview, and Best render modes.

f0903.tif

ZBrush 4 introduces a fifth render mode known as Best Preview Render (BPR). The purpose of this render mode is to offer you better-quality rendering than the standard Preview mode but without the computational overhead of Best mode. Best Preview Render also offers several advanced effects, including subsurface scattering, transparency, and ambient occlusion (see Figure 9-4).

The following sections provide a brief overview of how to use the Render palette. Rendering is very closely tied to lights and materials. After you have a basic understanding of how to use the Render palette, you will learn more advanced rendering issues in the sections on lights and materials.

Save Often while Rendering

When rendering documents, save often. It is easy to accidentally create a setting that can crash ZBrush, causing you to lose your hard work.

Figure 9-4: A model rendered using Best Preview Render (BPR)

f0904.tif

Choose a Render Mode

So which render mode should you use? There are many reasons for choosing one mode over another, but here are some general guidelines you can use. As you become more comfortable rendering in ZBrush, you may develop your own workflow for rendering and how you use the different modes.

Flat Use this mode when you want to see just the colors applied to a model. It is just like applying the Flat Color material to your model. You may want to switch to this mode when you just want to see the silhouette of your model or when you want to see the colors on the surface without the influence of shadows or material attributes.

Fast Use this render mode to optimize the performance of ZBrush while working on very high-resolution models.

Preview This is the default render mode. This is the most common mode to use while rendering because it displays the colors on the surface, simple shadowing, and BasicMaterial properties. Each of these features is a helpful visual aid while modeling, They help you see the contours of the surface and how the model will look when it has been polypainted.

Best Preview Render (BPR) This render mode offers the easiest way to get a great-looking image of your model. It offers the most advanced options of any of the render modes. Using BPR, you’ll get excellent anti-aliasing along the edges of the model. You can easily render transparency for individual SubTools as well as realistic ambient occlusion and subsurface scattering. Many of the techniques demonstrated in this chapter rely on Best Preview Render, and you’ll see how you can take advantage of its advanced features when rendering your own models.

Best Use this when you want to have more control over specific material properties, document layers, and shadowing effects. It generally takes longer to render in Best mode and a little more work to get good-looking results than using BPR.

This exercise demonstrates how to render using these different modes:

1. Start a new session of ZBrush. Use the Open button in the File palette to open the dragonHeadRender.ZPR project from the Chapter 9 folder on the DVD.

2. Place the Render palette in a tray so that you can easily access the controls.

3. Rotate the view of the dragon head until you have a view that you like.

4. Press the Flat button in the Render palette.

Flat render takes almost no time at all. You can clearly see the color painted on the model but not the shadowing or any light effects.

5. Press the Fast button.

Fast render takes no time at all. You’ll see very basic shadowing on the surface but no material effects.

6. Open the Light palette and drag on the large sphere to change the position of the light (see Figure 9-5). You’ll see the lighting change on the model, indicating the direction for the light.

7. Try choosing another material from the materials fly-out library. The model won’t look any different regardless of the material you select.

8. Select SkinShade4 from the materials fly-out library. Click Preview in the Render palette.

The model looks just like when you loaded it. When you change materials, the model updates. If you change the position of the light, the model updates as well as long as you have one of the standard materials applied. If you switch to one of the MatCap materials, the lighting of the surface will not update when you change the light direction in the Light palette. This is because of how MatCap materials are made. You’ll learn more about lighting and the standard and MatCap materials later in the chapter.

9. Click the Best button in the Render palette.

Figure 9-5: Drag on the sphere in the upper left of the Light palette to change the light direction.

f0905.tif

Figure 9-6: The progress bar at the top of the interface indicates how long it takes to create a Best render.

f0906.tif

When you use the Best button, the screen takes longer to refresh. The progress bar at the top of the interface indicates how long the render is taking (see Figure 9-6). Note that the shadows look much softer. It may not seem like a massive improvement over the Preview render, but at the moment you are using just the default options, simple lighting, and the SkinShade4 material. As you start to adjust the options and as you create more complex lighting and materials, you’ll see that the render time increases.

10. Rotate the view of the head. The canvas switches back to Preview mode automatically.

11. Press the Render button in the Render palette to create a new render at Best quality.

12. Press the BPR button on the top of the right shelf (see Figure 9-7).

Figure 9-7: Press the BPR button at the top of the right shelf.

f0907.tif

You’ll see the progress bar appear again as the screen refreshes. When the render is complete, you’ll see that dragon head appear in Best Preview Render quality. The shadows will look a little different, and note that the edges of the model are at a higher quality. It may not seem like a dramatic difference, but as you learn more about the options available for Best Preview Render, you’ll see that you can achieve very different effects using this mode instead of Best render mode. Just keep in mind that to create a render with Best Preview Render, you need to either press the BPR button on the right shelf or press the Shift+R hotkey combination. There is also a BPR button at the top of the Render palette.

That’s all there is to creating a render. The following sections go into more detail about how to adjust the features for each render mode.

Rendering Sequences

Render modes in ZBrush are designed for rendering still images so you can show off your models or so you can create an illustration. You can render movies using Best and BPR quality render modes by using the settings in the Movie palette. This palette is discussed in Chapter 10.

Render a Region

Best rendering mode can often take a long time to calculate, and you may find yourself waiting around for the screen to refresh while you’re developing the materials and lighting for your model. ZBrush gives you the option of rendering a small portion of the screen, which can make it faster to work on specific parts of the objects on the canvas. Note that the render region option is available only when you are using Best render mode. This exercise demonstrates how to use this feature:

1. Continue with the file from the previous section or load the dragonHeadRender.ZPR from the Chapter 9 folder on the DVD.

2. Open the materials fly-out library on the left shelf and choose the ColorizeGlow material (see Figure 9-8).

Figure 9-8: Choose the ColorizeGlow material from the materials library.

f0908.tif

This material has some features that are visible only when Best render mode is used, so it works well as a way to demonstrate how to render a region.

3. In the Render palette, click the Best button. As the image renders, the model turns bright yellow. This is the effect created by this particular material (see left image in Figure 9-9).

4. Rotate the view of the model. The mode switches back to Preview render mode.

5. Click the Cursor button in the Render palette. Drag the mouse pointer from the Cursor button to a spot on the dragon’s head (see right image in Figure 9-9).

A small square section will render. You’ll see that the dragon’s head within the square is bright yellow while the rest of the model remains in Preview render mode. The area within the square has been rendered using Best mode. To choose another area, drag from the Cursor button in the Render palette to another part of the model. To refresh the area within the square, press the Cursor button.

Figure 9-9: The dragon head renders in a bright yellow color when the Colorized Glow material is used at Best render quality (left image). Use the Cursor button to render a small section of the model at Best render quality (right image).

f0909.tif

Render Options

In the Render palette, below the render mode buttons you’ll see a number of buttons that activate various options (see Figure 9-10). The confusing thing about these buttons is that each option may or may not be available for each render mode. In the following list, I describe each option and which render mode it is used for. Remember that you can hold the mouse cursor over each button while holding the Ctrl button to see a pop-up box with more information about the option.

Figure 9-10: Render options are found below the render mode buttons

f0910.tif

Shadows (BPR and Best) This enables the calculation of cast shadows. Shadows rendered in BPR will look different than shadows rendered in Best quality mode. The quality of BPR shadows is set using the Bpr Shadow options in the Render palette. The quality of shadows rendered in Best quality are set using the Shadow options in the Light palette.

AOcclusion (BPR only) This enables ambient occlusion shadowing. Ambient occlusion shadowing is a soft type of shadow that appears within the cracks and crevices of a model. It is similar to the type of shadowing seen in very diffuse lighting such as on a cloudy day. Using ambient occlusion is discussed in the section titled “Render Using BPR” later in this chapter.

Sss (BPR only) This enables subsurface scattering. This is a way of simulating deep translucency, which is helpful when rendering waxy materials or human skin. Using this feature requires a combination of settings found in the Render, Light, and Material palettes. Using Sss is discussed in detail later in this chapter in the section titled “Render Subsurface Scattering Effects.”

Transparent (BPR only) This enables SubTools to appear transparent when rendering with BPR. Using the Bpr Transparency options in the Render palette, you can adjust the amount of refraction and the quality of the transparency. Note that there are also techniques for rendering transparency using Best render mode, but this requires a different set of options found in the Material palette. Using this option is explained later in this chapter in the section titled “Render Using BPR.”

Fibers (BPR and Best) This enables rendering of fibers to create the look of fur when using the Fiber material. This is explained later in the chapter in the section titled “Render Fibers.”

HD Geometry (BPR Only) This enables the rendering of high-definition geometry when using BPR. HD geometry is an advanced feature and beyond the scope of this book.

Fog (Preview, BPR, and Best) This enables the display of fog, which can add a sense of depth to your images. The Fog settings are found toward the bottom of the Render palette. Using these options is discussed later in the chapter in the section titled “Render Using Best Mode.”

View Blur (all render modes) This is an interesting option that can be used while sculpting. Artists will often squint their eyes when looking at a subject or at their composition as a way to help them focus on the overall forms without the distraction of details. The View Blur option is meant to simulate this on the ZBrush canvas. Once you activate this feature by turning on the View Blur button, you can then adjust the amount of blurring using the VBlur Radius slider at the top of the Render palette.

Depth Cue (Best and BPR) This enables a subtle blurring effect meant to simulate camera depth-of-field effects. Parts of an object that are more distant appear blurrier than parts of the object that are closer to the front of the canvas. To tune the effect, use the options in the Depth Cue section of the Render palette.

Figure 9-11: Double-click the Mnan Scene1.ZPR project in Light Box.

f0911.tif

The following steps demonstrate how to apply Depth Cue:

1. Start a fresh session of ZBrush.

2. Open Light Box to the Projects section. Double-click the Mannequins folder to see the Mannequins projects in Light Box (Figure 9-11). On the Mac, the mannequins are found within the Projects section of Light Box with all of the other project files.

3. Double-click the Mnan Scene1.ZPR. This is the scene that has several mannequins arranged in a restaurant scene.

Figure 9-12: Expand the Depth Cue options in the Render palette.

f0912.tif

4. Rotate the view of the scene so that the waiter with the pizza is in the background.

5. Open the Render palette. Click the Depth Cue option to enable this option.

6. Expand the Depth Cue section in the lower half of the Render palette (see Figure 9-12).

There are two sliders that determine the depth settings for the blurring effect. The Depth1 slider determines where the image will be clear, and the Depth2 slider determines where the image will be blurred. You can enter the settings numerically by adjusting the sliders, but there’s actually a much more intuitive way to do this.

7. Click the Depth1 slider in the Render palette and drag the mouse cursor onto the canvas. Drag it to a part of the scene that is in the foreground, on top of one of the mannequins. This sets the depth for the area that will be in focus.

8. Click the Depth2 slider in the Render palette and drag the mouse cursor onto one of the characters in the background. This sets the depth for the area that will be out of focus.

9. Set Intensity to 100 and Softness to 8.

10. Click the Best button in the Render palette to render the image at Best quality.

The Depth Cue effect is fairly subtle even at the highest settings (see Figure 9-13). You can fine-tune the effect using the Depth Cue edit curve at the bottom of the Depth Cue subpalette of the Render palette. If you want to create an image with a strong sense of depth of field, you may want to export a depth pass along with the image and use a program such as Photoshop to create depth of field. You’ll learn how to export a depth pass later on in the chapter.

Soft Z (Best) This option helps improve the anti-aliasing of edges when rendering with Best render mode is used.

Soft Rgb (Best) This option helps improve the anti-aliasing of surfaces when Best render mode is used.

Flatten (Best) This is on by default. This option flattens all the document layers into a single pass when Best render mode is used. Document layers are different from 3D layers (discussed in Chapter 10).

Figure 9-13: Depth Cue adds a subtle blur to objects in the background.

f0913.tif

Render Using BPR

As mentioned earlier, Best Preview Render (BPR) is a new render mode that has been added to ZBrush 4. BPR tends to render faster than Best quality mode and has a few features, such as SubTool transparency, ambient occlusion, render passes, and subsurface scattering, that are not available in other modes. Because it is easy to use and has so many great features, you may find that it will become your favorite render mode. It’s the ideal choice when you want to export an image for easy compositing in a digital paint program such as Adobe Photoshop. In the following sections, you’ll learn how to use BPR and some of its features.

Subsurface Scattering

Subsurface scattering involves using specific light and material settings, so you’ll learn about it at the end of the chapter in the section titled “Render Subsurface Scattering Effects” after you have acquired a good understanding of lights and materials.

Create a BPR Render

You can create a BPR render at any time by pressing the BPR button on the top of the right shelf (see Figure 9-14) or by pressing the Shift+R hotkey combination. When you start a BPR render, the progress bar at the top of the interface appears, indicating how long it will take to render the image. Note that unlike with Best render mode, you won’t see any change on the canvas until the render is complete. Once it is finished, the render will appear on the canvas and you’ll see a significant improvement in quality versus Preview mode.

Figure 9-14: The BPR button at the top of the right shelf

f0914.tif

You can stop the render at any time by pressing the Esc key on your keyboard. When the render is complete, any tools on the canvas that are in Edit mode remain in Edit mode—they have not been dropped to the canvas. If you move, scale, or rotate the view of the model, the canvas automatically switches back to Preview render mode. You’ll have to create a new BPR render after you change the view on the canvas.

Subpixel Anti-aliasing Quality

As discussed in Chapter 1, anti-aliasing refers to a trick used by graphics software packages to improve the quality of the edges of a digital image. All images created on a computer are made up of tiny colored squares known as pixels. Without anti-aliasing, these tiny squares are clearly visible along the edges of an object on a computer screen, which gives the image a jagged appearance. The process of anti-aliasing blends the colors of the edges together, creating a softer appearance for the edges.

When rendering with BPR you can control the amount of anti-aliasing using the SPix slider on the top of the right shelf (see Figure 9-15). To increase the quality of the anti-aliasing in the rendered image, increase the value of the SPix slider. Note that higher values will increase the time it takes to create the render.

Figure 9-15: The SPix slider at the top of the right shelf

f0915.tif

SubTool Transparency

If you want parts of an object to appear transparent in a render, the easiest and best way to do this is to use the BPR SubTool transparency option. Using the Bpr Transparency options in the Render palette, you can add refraction effects, which can make your surfaces appear like glass or water.

In this exercise, you’ll see how you can create the look of a glass dome on the monster car model.

1. Start a new session of ZBrush. Use the Open button in the File menu to open the MonsterCar.ZPR project from the Chapter 9 folder on the DVD.

This model is a cartoon hot rod created in the style of Ed Roth. The three-eyed monster driving the car has a dome on the top of his head covering his brain. In Preview mode, you can’t see his brain because the dome is opaque.

2. Place the Render palette in a tray so that you can easily access the render options while working on the model.

3. Turn on the Transparent button (see Figure 9-16). This enables SubTool transparency when rendering using BPR. Keep in mind that this option only affects BPR renders. It has no effect when rendering in any of the other render modes.

Figure 9-16: Turn on the Transparent button in the Render palette.

f0916.tif

Now that Transparency is enabled, you have to indicate which SubTool or tools you want to be displayed as transparent in the BPR render. To do this, you’ll activate a flag in the SubTool subpalette of the Tool palette.

4. In the Tool palette, expand the SubTool subpalette. Find the SubTool that has been labeled Dome.

5. Click the intersection icon, shown in Figure 9-17. This lets ZBrush know that you want this object to appear transparent in the render.

Figure 9-17: Turn on the intersection icon for the Dome SubTool.

f0917.tif

You can make any number of SubTools transparent. SubTool transparency is completely independent of any material settings. So even if every SubTool uses the same material, only the SubTools that have the intersection icon activated will appear transparent.

6. Press Shift+R to render the model using BPR. After a few moments, the model will appear at a higher quality. You can clearly see the brain through the glass dome (see Figure 9-18).

Figure 9-18: The brain is visible behind the transparent dome.

f0918.tif

Adjust SubTool Transparency

The quality of the SubTool transparency seen in the BPR render is determined using the Bpr Transparency settings in the Render palette. The level of transparency is determined by either the direction of the face normals or the color applied to the SubTool or a combination of both.

This exercise demonstrates how to take advantage of these settings using a very simple model.

1. Start a fresh session of ZBrush.

2. Use the Open button in the File menu to load the SToolTrasparency.ZPR project from the Chapter 9 folder on the DVD.

This project has a PolySphere surrounded by a twisted torus (see Figure 9-19).

3. Place the Render palette in a tray so you can easily access the controls.

4. In the Render palette, click the Transparent button to activate transparency for SubTools. Turn off the Shadows button.

5. Expand the Bpr Transparency subpalette of the Tool palette.

Figure 9-19: The SToolTransparency project contains a PolySphere surrounded by a twisted torus.

f0919.tif

Surface Normal Transparency

For the moment, you’re only interested in seeing how the normal direction of the objects affects the transparency of the SubTools. To see how this works, you want to turn off color transparency and refraction in the Bpr Transparency subpalette of the Render palette (see Figure 9-20).

1. Set the ByColor and CFactor sliders to 0.

2. Set Refract to 0.

3. Set the Strength slider to 1.

Figure 9-20: Adjust the settings in the Bpr Transparency subpalette of the Render palette.

f0920.tif

Strength determines how much the transparency of the SubTool is affected by the NFactor slider. NFactor determines how the direction of the surface normals affects the transparency.

Facing Ratio

Facing ratio is a term commonly used in 3D graphics to describe the angle of the surface relative to the view of the object. This is also referred to as angle of incidence. The parts of an object that are perpendicular to the viewing angle have a high facing ratio. So the front of the sphere, for example, has a high facing ratio. The parts of the surface that turn away from the viewing angle have a low facing ratio. So the sides of the sphere as they turn away from the view have a low facing ratio.

The NFactor slider sets the amount of transparency based on the facing ratio of the surface. This will be much easier to understand using the following demonstration.

1. In the SubTool subpalette of the Tool palette, select the Torus SubTool. Turn on the intersection icon as shown in Figure 9-21.

Figure 9-21: Turn on the intersection icon for the Torus SubTool

f0921.tif

2. In the Bpr Transparency subpalette of the Render palette, set NFactor to 0.5.

3. Press Shift+R to create a render with Best Preview Render.

The resulting render shows that the parts of the torus that are perpendicular to the view are transparent (see left image in Figure 9-22). The parts of the surface that turn away from the view are opaque.

4. Set NFactor to 0.1 and create another BPR render.

You can see now that when NFactor is low, only the very edges of the torus are opaque. Most of the surface is now transparent (see right image in Figure 9-22).

Figure 9-22: The parts of the torus that are perpendicular to the view are transparent (left image). Most of the torus is transparent except for the very edges (right image).

f0922.tif

5. Experiment with different settings for NFactor and create a BPR each time to see the result.

6. Continue using this file in the next section.

At an NFactor setting of 0, the surface is invisible. At an NFactor setting of 1, the surface is opaque. If Shadows are turned on in the Render options, it will affect the transparency so that the edges of the sphere are always visible.

You can adjust the Strength setting in conjunction with the NFactor setting to create a variety of transparency styles.

Color Transparency

Now let’s take a look at how color can be used to determine transparency. The color of a SubTool determines how transparent the surface appears when it is rendered using BPR. Darker values make the surface appear transparent; lighter values make the surface appear less transparent. It is important to understand that in this case the transparency effect takes into account the color of the SubTool as it appears on the canvas. This means that colors painted on the surface, the shadows, the reflectivity of the material, and any textures applied to the surface are all part of how transparency is calculated. This short exercise will help clarify this point.

1. In the SubTool subpalette of the Tool palette, make sure the Torus SubTool is selected.

2. In the Texture Map subpalette of the Tool palette, click the large square in the upper left to open the texture library. Select Texture 03, which is the checkerboard texture (see Figure 9-23)

Figure 9-23: Choose the checkerboard texture from the Texture Map subpalette of the Tool palette.

f0923.tif

3. In the Bpr Transparency subpalette of the Render palette, set Strength to 0.

The Strength slider determines transparency based on normal direction. While you are experimenting with color-based transparency, you don’t want this option influencing the result. Setting Strength to 0 disables normal-based transparency.

The ByColor slider determines to overall level of transparency of the SubTool based on the color of the object.

4. Set ByColor to 1.

The CFactor setting determines how the color influences the transparency of the SubTool. Think of it as a way to set a threshold value. When CFactor is at a low value, colors darker than white will make the surface appear transparent. When CFactor is at a high value, the darkest colors will appear transparent. Let’s take a look at how this works.

5. Set CFactor to 1 and press Shift+R (see Figure 9-24). The black areas of the checkerboard texture are completely transparent. The white areas are semitransparent (see Figure 9-25).

Figure 9-24: Set CFactor to 1 in the Bpr Transparency subpalette of the Render palette.

f0924.tif

If you want the white areas of the checkerboard to appear opaque, increase the CFactor value.

Just as with normal-based transparency, you can adjust the ByColor slider to determine the overall transparency of the surface. Try different combinations of settings for ByColor and CFactor.

Figure 9-25: The black areas of the texture are transparent; the white areas are semitransparent.

f0925.tif

Now consider that changing the material also influences the color transparency, and furthermore, you can combine normal-based transparency and color-based transparency. By using different materials, textures, and a variety of settings for Strength, NFactor, ByColor, and CFactor, you have an almost infinite variety of ways to create a transparent look for SubTools. Even though the same settings in the Render palette apply to all SubTools, keep in mind that each SubTool can have a different color or texture, so through the strategic use of color, you can make some SubTools appear more or less transparent than others.

Figure 9-26 shows how using color-based transparency and different materials and textures affects the way the transparency appears.

Figure 9-26: The torus is rendered using different materials and textures using a ByColor setting of 1 and a CFactor setting of 1.

f0926.tif

SubTool Refraction

Refraction occurs when photons of light passing through a transparent material change direction. This is because the speed of the photons is actually reduced compared to the speed of light traveling through a vacuum. You can create the appearance of thick, transparent materials such as glass or plastic by adjusting the Refract and Refraction Factor sliders in the Render palette.

The Refract slider controls the amount of overall refraction; RFactor controls the quality of the refraction. The Refract slider goes from 0 to 1, where 1 is the most amount of refraction. The RFactor slider goes from 0 to 250, where higher values create the look of thick materials.

In this exercise, you’ll create the look of a thick glass dome for the MonsterCar tool. The reflective quality of the dome will be created using a material, while transparency and refraction will be simulated using the Bpr Transparency settings.

1. Use the Open button in the File menu to load the MonsterCar.ZPR project from the Chapter 9 folder on the DVD.

2. In the Tool palette, expand the SubTool subpalette. Select the Dome SubTool.

3. Turn on the intersection icon for the Dome SubTool.

4. In the materials fly-out library on the left shelf, select the ReflectedMap material. This material will be applied to the entire MonsterCar model, making it look like it is shiny chrome reflecting a desert scene (see Figure 9-27).

Figure 9-27: Choose the ReflectedMap material from the material library.

f0927.tif

5. On the top shelf, turn on the M button. This activates material painting.

6. Open the Color palette and press the Fill Object button. This fills the current SubTool with the material. You won’t see any difference just yet.

7. In the material library, select the SkinShade4 material. The model switches back to the white material except for the dome, which still uses the ReflectedMap material (see Figure 9-28).

The Dome SubTool has been filled with the reflected map material. By using the Fill Object button in the Color palette while the M button is activated, you can fill a SubTool with a material just as you can fill a SubTool with a color. If you turn on the Mrgb button and press Fill Object, then the SubTool is filled with both the main color and the material.

8. Place the Render palette in a tray so that you can easily access the settings.

9. Turn on the Transparent button.

Figure 9-28: The ReflectedMap material is applied to the dome while the rest of the model uses SkinShade4.

f0928.tif

10. Position the view of the model on the canvas so that you can see the dome on the top of the monster’s head.

11. In the Bpr Transparency subpalette, use the following settings (see Figure 9-29):

Strength: 1

NFactor: 0.3

ByColor: 0.45

CFactor: 1

Refract: 1

RFactor: 60

Figure 9-29: The Bpr Transparency settings in the Render palette

f0929.tif

Figure 9-30: Increase the RFactor slider to make the glass appear thick.

f0930.tif

12. Press Shift+R to create a BPR render (see Figure 9-30).

To make the glass appear thicker, try a higher setting for RFactor. You can also make the glass appear more realistic by adjusting the transparency settings. The reflectivity of the dome is controlled by the material. You’ll learn more about working with materials later in the chapter.

Bpr Shadow

When you’re rendering with BPR, the position of the light in the Light palette determines the direction of the shadow, but the quality of the shadows themselves are determined by the settings in the Bpr Shadow subpalette of the Render palette (Figure 9-31).

Figure 9-31: Shadow quality for BPR renders is set in the Bpr Shadow subpalette of the Render palette.

f0931.tif

To change the way the shadows look when rendering with BPR, adjust the settings in the Bpr Shadow subpalette and then render using BPR (hotkey = Shift+R). The following is a description of each setting:

Strength This determines the opacity of the shadows. The slider ranges from 0 to 1. At a setting of 1, the shadows are very dark.

S Color Click the S Color color swatch to open the color picker. This allows you to change the color of the shadows themselves, which can be useful for creating special effects.

Rays This determines the number of rays used to calculate the shadow. Increasing this value improves the render quality but can add to render time.

Angle This determines the angle between each shadow ray. The slider goes up to 360. Higher values create softer shadows (see Figure 9-32). An angle of 360 will create a look similar to ambient occlusion shadowing.

Res This determines the resolution of the shadow in pixels. Higher values produce sharper, higher-quality shadows, which can increase render time. You can save some render time by lowering this value when you plan to render blurred shadows.

Blur This adds a blurring to the edges of the shadows, which softens the overall look.

VDepth This is an offset to the position of the shadow casting lights based on the view. Negative values increase the intensity of the light and the shadows, and positive values create an overall shadow.

Figure 9-32: The left image uses an Angle setting of 0; the right image uses an Angle setting of 20.

f0932.tif

LDepth Similar to VDepth in that this slider creates an offset to the position of the shadow casting light, however this offset is applied to the lights themselves. Negative values increase the intensity of the light and the shadows, positive values create a more overall shadow.

Spd This adds subpixel anti-aliasing calculations to the shadow. Turn this off to speed up the shadow calculation. Turn this on to improve the quality of the shadows.

Ambient Occlusion

Ambient occlusion is a popular way to simulate the look of diffuse lighting in computer graphics by using soft shadows in the cracks and crevices of 3D objects. ZBrush 4 has added this feature as part of the Best Preview Rendering mode. The settings on the Bpr AO subpalette of the Render palette allow you to balance the quality of the ambient occlusion shadows with the time it takes to render them.

To create ambient occlusion shadows, ZBrush creates an array of virtual lights in a sphere around the model. Each light casts a shadow, and the shadows are blended together. You don’t actually see the lights in the scene, just their shadows. Models rendered with ambient occlusion tend to look solid and realistic.

The following is a description of what each setting in the Bpr AO subpalette of the Render palette does:

Strength Controls the opacity of the effect. The slider range goes between 0.01 and 1. Lower values reduce the visibility of the ambient occlusion shadows on the surface of the model.

Color Click on the color to open up the color picker. Choosing a color other than black will tint the ambient occlusion shadows. This can be used to create a stylistic look.

Rays This controls the number of rays used by each light to create the ambient occlusion shadow. More rays mean higher quality but longer render times.

Angle This controls the angle between each light used to create ambient occlusion shadows. Lower values mean that the lights are closer together, causing the shadows to look like blurry cast shadows. The default value of 360 means that the ambient occlusion shadow lights are arranged in a sphere around the model, creating the look of diffuse lighting.

Res Controls the resolution of the shadows cast by the lights in pixels. Higher values produce a stronger, higher-quality shadow but also increase render times. The default value of 500 is usually sufficient for most cases.

Blur This blurs the edges of each overlapping shadow cast by the ambient occlusion lights, which helps to create the look of soft, diffuse shadows. If you want to save render time by using lower settings for Rays or Res, then increase the Blur value to compensate.

LDepth and VDepth These sliders offset the position of the ambient occlusion lights. The result is longer or shorter shadow length. Use positive values for either slider to create larger areas of shadowing. Use negative values to create tighter areas of shadow. The purpose of these sliders is to allow you to adjust the look of the ambient occlusion shadows themselves.

Spd This button activates subpixel calculations, which improves the look of the shadows. Turn this off to save time while you make adjustments to the ambient occlusion and then turn it on when creating a final render to improve quality.

Gamma This is more to control the gray value between the black and white. If you turn this down, you will have more gray values. If you turn it up, then there will be more white and only the blackest areas will remain in the areas shaded by the ambient occlusion effect. The default setting is 5. The slider goes from 0.1 to 25.

The following short exercise demonstrates a useful workflow for adding ambient occlusion to BPR renders.

Figure 9-33: In the Render palette turn off Shadows and turn on AOcclusion.

f0933.tif

1. Use the Open button in the File menu to load the MonsterCar.ZPR project from the Chapter 9 folder on the DVD.

2. In the materials fly-out library on the left shelf, choose the Flat Color material. This will allow you to see just the white color of the surface without the influence of material color or surface shadowing.

3. Place the Render palette in a tray so that you can access the controls.

Figure 9-34: The model is rendered using ambient occlusion and the Flat Color material.

f0934.tif

4. In the Render palette, turn off the Shadows button. Turn on AOcclusion (Figure 9-33). This way you’ll only see the ambient occlusion shadows.

5. Expand the Bpr AO subpalette of the Render palette.

6. Turn off the Spd button. This will speed up the calculation while you tune the settings.

7. Press Shift+R to create a BPR render (see Figure 9-34).

You’ll see the model with just the ambient occlusion shadowing. Try experimenting with the settings to see how you can change the look of the ambient occlusion shadowing. You can use ambient occlusion shadowing with any material. The Flat Color material just makes the effect more noticeable.

Render Using Best Mode

There are a number of settings in the Render palette that are used when rendering in Best quality mode. The anti-aliasing settings improve the quality of the image but can increase render times. Using Fog can add a sense of depth to the images you create on the canvas. The following sections describe how to use these options.

Anti-Aliasing

The Antialiasing subpalette of the Render palette pertains specifically to renders created using Best render mode. If you are using Best Preview Render (BPR), use the SPix slider on the right shelf to adjust image quality.

The following list includes a description of each control and how it affects renders created using Best render mode:

Blur This smooths the edges as well as the transition between different colors on the canvas by blurring the pixels.

Edge This slider sets a threshold value to determine how sharp an edge on the canvas needs to be before it is affected by blurring. Higher values mean that more of the image will be blurred to create the appearance of smooth edges. If this is set to a low value, only the sharper edges will be blurred.

Size (sample size) When you start a Best quality render, ZBrush examines the pixels on the canvas while the render is being calculated. Each pixel is compared to the surrounding pixels to determine how anti-aliasing should be applied. This process of comparing each pixel is known as sampling. By increasing the sample size, you are increasing the number of pixels within the sampling calculations. Larger values increase the render time but create a higher quality image.

Super Sample When you create a Best render, you can use the Super Sample slider to increase the number of times each pixel on the canvas is sampled. Higher values increase image quality but also increase the time it takes to render the image.

Fog

Fog creates a sense of depth by adding a color gradient along the z-axis of the canvas. This means that the parts of the image or model that are farther away from the front of the canvas generally receive more color tinting than the parts of the image or the model that are closer to the front of the canvas. You can adjust and even invert this effect to create stylistic images. This exercise demonstrates how you can use Fog. The Fog settings can be used in images created in Preview, Best, and Best Preview Render modes.

1. Use the Open button in the File menu to load the MonsterCar.ZPR project from the Chapter 9 folder on the DVD.

2. In the Render palette, turn on the Fog button to activate Fog. You’ll see the background turn white.

3. Expand the Fog subpalette of the Render palette (see Figure 9-35).

Figure 9-35: The Fog settings in the Render palette.

f0935.tif

The Intensity slider controls the overall intensity of the fog effect.

4. Set Intensity to 70.

The Depth1 slider determines the point along the z-axis at which the fog starts, and the Depth2 slider determines the point along the z-axis where the fog ends. You can use the sliders to determine these points numerically, or you can drag on the canvas to set these points interactively, as described in the next steps.

5. Click the Depth1 slider and drag the mouse cursor to part of the model that is close to the front of the canvas, such as one of the front tires of the car.

6. Click the Depth2 slider and drag the mouse cursor to part of the model that is far away from the front of the canvas, such as one of the back tires.

This establishes the depth of the fog effect. You can rotate the view of the model; the start and end point of the fog remains consistent regardless of how the model is rotated.

7. Click on the Fog Curve edit curve. Use this to fine-tune the fog gradient.

8. Add a point to the edit curve by clicking on it. Drag the point down to the right to create a curve with a sharp peak on the right, as shown in Figure 9-36.

Figure 9-36: Edit the look of the fog by adding a point to the Fog Curve edit curve.

f0936.tif

Try adjusting the edit curve to create different looks for the fog effect.

You can change the color of the front of the fog by clicking the large white box on the left in the Fog subpalette. This opens a color picker that can be used to choose a color. Click on the large white box on the right to change the color for the back of the fog. For example, if you wanted to create an undersea image, make the front of the fog light blue and the back of the fog dark blue.

9. Click on the space next to the color swatch on the right. This opens the texture library.

10. Select texture 35 from the texture library. This is an image of turbulent noise. You won’t see an immediate change just yet.

11. Click the Best button to create a Best quality render. The fog texture only appears in Best quality render mode (see Figure 9-37).

You can add a different texture to the front and the back of the fog. The left image is applied to the front, and the right image is applied to the back. Keep in mind that you can import your own images to create a custom look for the fog. Just use the Import button in the Texture palette to import an image; then apply it to the fog just like any other texture.

Figure 9-37: Add a texture to the fog to create the look of smoky fog.

f0937.tif

Export a Render

Figure 9-38: Export the canvas using the Export button in the Document palette.

f0938.tif

Exporting the canvas as an image is very easy to do. You can use the Export button in the Document palette to export the canvas in Photoshop, bitmap, or TIF formats (see Figure 9-38). The image will look exactly as it does on the canvas, so if you want to export a high-quality image, render using BPR or Best render mode first, then click the Export button and save the image to your disk.

ZBrush 4 adds additional render options that allow you to export passes, which can then be imported into and composited in another program such as Adobe Photoshop.

The following sections describe some options you can take advantage of when you want to export an image from ZBrush.

Document Size and Background

If you want to export an image at a specific size, use the Width and Height sliders in the Document palette. If the Pro button is activated, the values of the sliders will be linked proportionally, so you only have to adjust one of the values and the other will update automatically. Turn Pro off if you want to set a specific size for both Height and Width (see Figure 9-39).

Figure 9-39: Set the document size using the controls in the Document palette.

f0939.tif

The document will not change in size until you press the Resize button. Keep in mind that any tools on the canvas will be converted to pixols and dropped to the canvas when you press the Resize button. You may want to clear the canvas (Ctrl+N) after resizing and redraw the tool on the canvas after it has been resized.

A large canvas size will affect the performance of working in ZBrush. If you want to export a large image from ZBrush, consider working on your tools in the default document size and then resize the document, draw the tool or tools on the canvas, arrange them where you’d like, and finally, export the image.

The Half and Double buttons are there for convenience so that you can cut the canvas size in half or double it easily. Just as with Resize, using these buttons will convert the active tools into pixols and drop them to the canvas. Many ZBrush artists will create an image that’s twice the size they need and then export the final image at half size to improve anti-aliasing quality. However, with the improvements to anti-aliasing in BPR mode, this workflow is not as necessary anymore.

To change the look of the background, click the Back button in the Document palette and drag the mouse pointer to any part of the canvas to sample a specific color. Drag the mouse pointer down to the color picker on the left shelf to sample a color. Use the Range, Center, and Rate sliders to change to look of the background gradient. Set Range to 0 to get rid of the gradient altogether.

Figure 9-40: Use the Import button in the Texture palette to import an image from your local disk.

f0940.tif

If you’d like to use your own image as a background, use the following steps:

1. Click the Import button in the Texture palette and choose an image from your local drive (see Figure 9-40). You can also use the Import button in the texture fly-out library on the left shelf to do the same thing.

2. Make sure the canvas is clear of any tools.

3. Choose the Flat Color material from the materials library.

4. In the Texture palette, click the CropAndFill button. This will resize the canvas to match the size of the image and place the image in the background (see Figure 9-41).

It is important to remember to choose the Flat Color material before filling the background with an image; otherwise, the color of the material will affect the color of the image.

Figure 9-41: CropAndFill replaces the document with the currently selected texture.

f0941.tif

Figure 9-42: If the tool appears embedded in the background (top image), turn off Edit mode, turn on Move (center image), and drag down on the canvas to bring the tool forward (bottom image).

f0942.tif

Once you have added a background image, you can continue to edit tools on the canvas. You may experience a situation in which the tool appears to be embedded in the image. This is not a bug. What is happening is the tool is being drawn on the back of the canvas and it is actually partially behind the back wall of the ZBrush environment. To fix this, you’ll need to bring the tool forward along the z-axis, which means momentarily leaving Edit mode. Follow these steps:

1. Turn the Edit button on the top shelf off. Don’t drag on the canvas after turning Edit mode off or you will create another instance of the tool.

2. Turn the Move button on. You’ll see the Transform Gyro appear indicating that you are in Move mode (see center image in Figure 9-42).

3. Drag down on the canvas repeatedly to bring the tool forward (see bottom image in Figure 9-42). Don’t drag on the manipulator; just drag down off to one side of the tool.

4. Once the tool is no longer intersecting the back plane, turn Edit mode back on (hotkey = T) and continue to work.

Adjustments

The Adjustments subpalette of the Render palette contains a number of sliders and edit curves that can be used to adjust the colors of the image as it is displayed on the canvas. The changes you make using Adjustments can be applied to all of the render modes before or after rendering the canvas.

To use this feature, expand the Adjustments subpalette of the Render palette and turn on the Adjustments button (see Figure 9-43). Use the Brightness and Contrast sliders to change the overall brightness and adjustments of the canvas. Expand the RGB Levels edit curve to adjust the color levels of the canvas. The left side of the curve adjusts the levels of the darker colors; the right side adjusts the levels of the lighter colors.

Figure 9-43: A number of sliders and curve editors in the Adjustments subpalette of the Render palette can be used to adjust the brightness, contrast, and color channels of the document.

f0943.tif

There are three additional edit curves in the Adjustments subpalette, which are used to adjust the red, green, and blue levels, respectively. You can shift the hues of the colors on the canvas by editing each curve.

To restore the changes you make in the Adjustments subpalette back to the default settings, just press the Clr button in the upper right of the subpalette.

Render Passes

Many ZBrush artists prefer to use ZBrush in combination with digital paint programs such as Photoshop. Using Photoshop’s compositing features, such as layers, blending modes, channels, and color adjustments, many artists start their artwork in ZBrush and finish them in Photoshop. The result is often an amazing illustration.

To make this type of workflow even easier, ZBrush adds the ability to automate the creation of render passes when using Best Preview Render. Render passes create a set of additional images extracted from the information generated during the BPR rendering process. Along with the render you see on the canvas, ZBrush creates separate images for depth, shadow, ambient occlusion, and alpha channel mask. Once the images have been generated, you can export them from ZBrush, import them into Photoshop, and use them to accentuate your initial ZBrush render.

Render passes are very easy to generate; follow these steps to use this feature:

Figure 9-44: Turn on Create Maps in the Render palette. Turn on the Shadows and AOcclusion buttons in the render options.

f0944.tif

1. Use the Open button in the File menu to load the DragonHeadRender.ZPR project from the Chapter 9 folder on the DVD.

2. In the Render palette, turn on the Create Maps button (Figure 9-44).

3. In the Render palette, turn on the Shadows and AOcclusion buttons. If these buttons are not on, a shadow and an ambient occlusion pass will not be generated.

4. Press the BPR button on the right shelf (hotkey = Shift+R). After a few moments, the render will be generated.

5. Open the Render palette. At the top you’ll see icons for the image, shadow, depth, ambient occlusion, and mask passes. Hold your mouse cursor over each icon to see an enlarged preview (see Figure 9-45).

6. Click each image to open your computer’s file browser. Use the browser to save each image to your local disk.

Figure 9-45: Once the BPR render is complete, the render passes are shown in the Render palette. Hold the mouse cursor over the pass icon to see a preview.

f0945.tif

When you save a render pass to your disk, the image will match the current resolution of the canvas. The anti-aliasing quality of each image is determined by the setting of the SPix slider. Here is a description of each pass:

Image This pass contains the color information of the canvas minus cast shadows and ambient occlusion (upper-left image in Figure 9-46).

Depth This pass is a grayscale rendering of the image where lighter values are applied to parts of the image that are close to the front of the canvas and darker values are applied to parts that are farther away. Use this pass in your compositing software as a means for creating depth of field and fog effects (upper-center image in Figure 9-46).

Within Photoshop, you can paste this image into an extra channel and then use the Lens Blur effect to add depth-of-field blurring.

Shadow This pass is a grayscale image that contains shadows. Within Photoshop, this image can be pasted into a layer above the image pass and the blend mode of the layer can be set to Multiply. The advantage of using a separate pass for shadows is that the color, contrast, and opacity of the shadows can be easily adjusted without the need to create another render (upper-right image in Figure 9-46).

Ambient Occlusion This pass is a grayscale image that contains ambient occlusion shadowing effects. Just as with the shadow pass, you can paste this into a separate layer in Photoshop, place that separate layer above the other layers, and set the blend mode to Multiply (lower-left image in Figure 9-46).

Mask This pass consists of a black-and-white image representing the silhouette of the objects on the canvas. Within Photoshop, this image can be copied and pasted into the alpha channel in the Channels palette and used as a mask for selection or separation from background elements (lower-right image in Figure 9-46).

Figure 9-47 shows how a render of the dragon head has been composited in Photoshop using the render passes. A copy of this file can be found in the Chapter 9 folder on the DVD. Feel free to open this image in Photoshop and examine how the passes have been used to create the image.

Keep in mind that each time you create a BPR image, the images in the render pass slots of the Render palette will be replaced by the images created for the most recent render.

Figure 9-46: The image, depth, shadow, ambient occlusion, and mask passes generated by the BPR render

f0946.tif

Figure 9-47: The passes are used to create a composition in Photoshop.

f0947.tif

Using ZBrush Lights

Lights in ZBrush are very simple to use and provide a way for you to change the lighting in a composition at any point during its creation. Lights are also an important aid to the sculpting process. Clay sculptors in the real world will continually move and adjust their lights so that they can literally see their work in a new light. This helps when they are defining forms and also while sculpting details. It’s a good idea to change the position of the light as often as possible while sculpting a 3D model. You’ll notice problems that you might not see otherwise.

Adjust Light Position

The following exercise shows you how to adjust the position of the light on the canvas while working with a 3D polymesh tool.

1. Start a fresh ZBrush session.

2. Use the Open button in the File menu to open the MonsterCar.ZPR project.

3. Choose the Basic material from the materials inventory.

4. Put the Light palette into a tray so that you can access the settings easily.

5. Set the render quality in the Render palette to Preview.

6. In the Light palette, drag across the sphere icon. This repositions the light. You’ll see the lighting on the surface change accordingly. If it doesn’t change, make sure you have BasicMaterial selected in the Materials palette (see Figure 9-48).

Figure 9-48: Dragging across the preview sphere in the Light palette will change the position of the light on the canvas.

f0948.tif

Lighting and BasicMaterials

Only the Standard materials in the lower section of the material inventory will react to the settings in the Light palette. The MatCap (Material Captured) materials at the top of the material inventory are created with the lighting information built into the material. All materials made with the MatCap tool contain their own lighting information. Repositioning the light has no effect on tools using MatCap materials. Materials are discussed later on in this chapter.

Send the Light to the Front or Behind

g0901.tif

If the preview sphere in the Light palette goes dark, it means that the light has gone behind an object on the canvas. There is a trick you can use to toggle the position of the light to place it in front or behind the 3D objects on the canvas. Open the Light palette and click in the upper-right corner of the light position window. Clicking in this corner toggles the light position so that it acts as a front light or a back light.

Select and Add Lights

There are eight lights available to light the ZBrush canvas. By default, all but one of them are turned off. To select a light, click a lightbulb icon in the Light palette so that the icon border turns gray. To turn on a light, click the icon twice so that the icon turns orange.

1. In the Light palette, click the lightbulb icon that is colored orange. This will turn the light off. Click it again to turn it back on.

The border around the icon indicates that the light is selected. Changing settings such as Intensity and Light Type in the palette will affect the selected light only, even if the light is off.

2. Click the next lightbulb icon in the Light palette once to select it and again to turn it on (Figure 9-49). A second light is turned on for the canvas. You can turn on up to eight lights at a time.

Figure 9-49: To turn a second light on, click a lightbulb icon in the Light palette.

f0949.tif

3. With the second light selected, set the Intensity slider to 0.25.

4. Click on the color swatch next to the Intensity slider to open the color picker. Use the color picker to choose a blue color.

You can see that the lighting preview icon in the Light palette has been tinted with a blue color. This is indicating the color change in the second light. However, the light color in the document has not changed—it’s just dimmer. To see changes in light color, render with Best quality mode. BPR will not render light color. You can render in BPR first and then Best render so you can take advantage of both render systems.

5. Press the Best button in the Render palette to render with Best quality. You’ll see that blue lighting is tinting the color of the model on the canvas.

Light Settings

There are a number of settings available in the Light palette. Keep in mind that many of these settings adjust the properties of the selected light, which is the light that has a gray border around the icon in the Light palette. It is possible to adjust the settings for a light that is selected but turned off. When this happens, you won’t see any change on the canvas until you turn the light on by clicking its icon until it turns orange. This is an easy mistake to make!

The following is a description of how these settings affect the light on the canvas:

Intensity edit curve The Intensity edit curve is found below the ambient and intensity sliders in the Light palette. This curve adjusts the intensity of the selected light. The left side of the curve refers to the intensity falloff. Reversing the curve can create some interesting negative exposure effects (Figure 9-50).

Figure 9-50: Reversing the edit curve for the Intensity slider can create some interesting effects.

f0950.tif

GDI The GDI slider controls the global diffuse intensity. The Light palette limits you to eight lights in a scene; however you can use the Global Diffuse Intensity slider to create an overall diffuse light for all strokes and tools on the canvas.

GSI The GSI slider controls the global specular intensity. It adjusts the specular highlights on objects that have a shiny, standard material applied to them.

DefaultDiffuse The sphere icon labeled DefaultDiffuse lets you apply a texture to the default diffuse color. When you click this icon, it opens the Texture inventory, allowing you to choose a texture for the global color. The effect created by applying a texture to DefaultDiffuse is only visible when Best render mode is used.

DefaultSpecular The DefaultSpecular icon works just like DefaultDiffuse. It allows you to select and apply a texture to the specular highlights on the surfaces of objects that use shiny standard materials. The effect is only visible when rendering with Best render mode.

Figure 9-51 shows what happens when the star texture is applied to the DefaultSpecular option. The model is rendered in Best quality mode using the Chrome2 material.

Figure 9-51: Adding a texture to the DefaultSpecular option can create additional lighting effects.

f0951.tif

Light Types

ZBrush uses four types of lights to illuminate the strokes and 3D tools on the canvas. By default, there is a single sun light that is turned on when you start a ZBrush session. Sun lights have no point source—all of their rays are cast in parallel to simulate light coming from a distant source. You place sun lights using the sphere icon in the light window.

The other three types of lights are point, spot, and glow. To change the type of light you are using, click one of the buttons in the Type subpalette (see Figure 9-52). This will change the type of the currently selected light. Remember that the lighting you see on the canvas may not be coming from the currently selected light. Make sure the currently selected light is turned on when you change the settings if you want to see the lighting update accordingly.

Figure 9-52: Change the light type for the selected light by clicking the buttons in the Type subpalette of the Light palette.

f0952.tif

The Radial button changes the behavior of the currently selected light so that the areas of the strokes or 3D tools that face away receive the light. This creates a good fill lighting effect. Radial lights can’t cast shadows. Any of the light types can be modified using the Radial button (see Figure 9-53).

Figure 9-53: The Radial option turns the selected light into a fill light.

f0953.tif

Sun Light

The following exercise will illustrate some of the differences between the types of lights.

1. Start a fresh ZBrush session.

2. Use the Open button in the File menu to open the DragonHeadRender.ZPR project.

3. Choose the Basic material from the materials inventory.

4. Place the Light palette in a tray so the settings are easily accessible. Make sure only one light is on by clicking the orange highlighted lightbulb icon in the Light palette (if it turns off, click the icon again to turn it on).

5. Drag across the sphere icon in the Light palette to change the position of the light. Set the position so that the dragon head is lit from the upper right.

6. Set Intensity to 2.

7. Set the Ambient slider below the Intensity slider to 0. This removes ambient light from the lighting on the canvas.

8. Click the second lightbulb icon until it turns orange to turn it on.

9. Make sure the second lightbulb icon is selected; there should be a gray border around the icon.

10. In the Type subpalette, turn on Radial. This makes the second light into a fill light.

11. Click the color icon next to the Intensity slider to open the color picker. Choose a red color.

12. Drag on the sphere icon in the light palette to change the position of the second light. You’ll see a red band of light on the sphere. Position the light so that the red band illuminates the bottom of the preview sphere. Figure 9-54 shows the settings for the light.

Figure 9-54: The second light is set to a sun light type with the Radial option activated.

f0954.tif

13. In the Render palette, click the Best button to create a Best quality render. Figure 9-55 shows the result.

This is a typical setup using the sun light type. In the next section, you’ll see how to use the point light type. Keep the same project open for the next section.

Figure 9-55: The dragon head is rendered using two sun lights.

f0955.tif

Point Light

The point light type works slightly differently than the sun type light. To place the light, you’ll use the settings in the Placement subpalette of the Light palette instead of the preview sphere. Keep in mind that the point light type works only when rendering in Best and BPR quality modes.

1. Turn the second light off. Make sure the first light is on.

2. In the Render palette, select Preview render mode.

3. Select the first lightbulb icon in the Light palette, and make sure its Intensity value is set to 2.

4. In the Type subpalette, click the Point button to set the light to the point type.

5. Expand the Placement subpalette. To change the position of a point light, drag from the P button in the Placement subpalette to a spot on the front of the dragon head, on the tip of the nose.

6. In the Placement subpalette, set the radius to 2.5 (see Figure 9-56).

Figure 9-56: Adjust the Radius slider in the Placement subpalette of the Light palette.

f0956.tif

The point light emits light in all directions from a single point in space, like a candle. The radius determines how far the light from the point light travels in the scene.

7. Click the Best button in the Render palette to create a render using the point light. Figure 9-57 shows the result.

Figure 9-57: The point light type lights the tip of the dragon’s nose.

f0957.tif

You can combine point lights with other light types as a way to accentuate parts of the model or create mood lighting in a ZBrush illustration. In the next section, you’ll see how to use the spot light type. Keep the same project open for the next section.

Spot Light

The spot light type is positioned using both the preview sphere and the Placement subpalette. The preview sphere in the Light palette is used to position the light. The controls in the Placement subpalette are used to aim the light. Keep in mind that the spot light type works only when rendering in Best and BPR quality modes.

1. In the Render palette, click the Preview button to switch to Preview mode.

2. In the Type subpalette of the Light palette, click the Spot button.

3. Drag from the P button in the Placement subpalette to the forehead of the dragon head tool to set the position where the spot light hits and illuminates the tool.

4. Drag across the sphere icon in the Light palette to set the source of the spot light—the position where the light comes from. Drag it to the upper left of the preview sphere.

5. Change the Radius slider to change the cone size of the spot light. Set Radius to 4.

6. In the Render palette, click the Best button to render in Best quality mode. Figure 9-58 shows the result.

Figure 9-58: The dragon is rendered using the spot light type.

f0958.tif

The spot light is similar to the point light. The main difference is how the lights are positioned. In the next section, you’ll see how to use the glow light type. Keep the same project open for the next section.

Glow Light

The glow light type adds ambient light that can tint parts of the model, adding an interesting look to the rendered image.

1. In the Render palette, click the Preview button to switch to Preview mode.

2. In the Type subpalette of the Light Palette, click the Glow button.

3. Click on the color swatch next to the Intensity slider to open the color picker. Use the color picker to choose an orange color.

4. In the Placement subpalette, click the P button and drag back to the dragon’s neck to a place behind one of the horns.

5. Set the Radius slider in the Placement subpalette to 0.5.

6. Click the Best button to create a render in Best quality mode. Figure 9-59 shows the result.

Figure 9-59: The dragon is rendered using the glow light type.

f0959.tif

Spend some time experimenting with different light types. Combine sun, spot, point, and glow lights in different combinations and test the results using Best quality render mode. Compare the results with BPR renders using the same lights.

Using Shadows in Best Render Mode

Sun, spot, and point lights can all cause strokes and 3D tools on the ZBrush canvas to cast shadows. Since a ZBrush document is not the same as a 3D scene in a 3D animation program such as Maya, the way ZBrush tools cast shadows may seem a little different. However, with some work, you can create convincing shadows on a ZBrush canvas that will add to the depth of your compositions.

1. Use the Open button in the File menu to load the MonsterCar.ZPR project from the Chapter 9 folder on the DVD.

2. From the material fly-out library, select the BasicMaterial.

3. In the Render palette, click the Best button. ZBrush will take a couple moments to render the image. Notice the soft shadows cast on the base by the model (see Figure 9-60).

Figure 9-60: Soft shadows appear on the base when the canvas is rendered using Best quality mode.

f0960.tif

If you change the position of the light in the Light palette, the shadows will update to match the position of the light. At the moment, this may be difficult to notice because the shadows are very soft. You can create sharper-looking shadows by changing the value of the Aperture slider.

4. Set Aperture in the Shadow subpalette to 10 and render the canvas again. The shadows are more defined (left image in Figure 9-61).

5. Set the Length slider to 400. This increases the length of the shadow, which can create a more realistic-looking shadow (right image in Figure 9-61).

Figure 9-61: Adjust the aperture of the shadow to reduce blurring and increase the definition (left image). Adjust Length to create longer, more realistic shadows (right image).

f0961.tif

Increasing the Rays slider improves the accuracy of the shadows, but the image will take longer to calculate.

ZMode produces more accurate shadows by considering the Z Depth of shadow-casting pixols when calculating the shadow. Sometimes a shadow created with ZMode on will have holes in it if shadow-casting strokes on the canvas intersect shadow-receiving strokes.

Best Render Shadows Versus BPR Shadows

Shadows rendered in Best quality mode will look different than shadows rendered using BPR. They will appear softer in Best mode when using the default shadows settings for the lights, but they can be adjusted to look more or less sharp. Shadows rendered using BPR are easier to use than shadows rendered with Best mode, but you have more options when using Best mode.

The choice to use one render mode over another is usually determined by how you want the final image to appear. To cast shadows, a selected light must have the Shadow option in the Light palette activated regardless of whether you are using Best or BPR render modes.

The Uni slider adjusts the unified shadow setting. This slider is available when ZMode is on and can help to reduce artifacts and decrease render time.

Creating convincing shadows often requires a fair amount of experimentation with these settings. The Shadow edit curve and the Blur slider can also help tune the look of the shadows. The edit curve controls the fade of the shadows. The x-axis of the graph represents the distance from the shadow-casting object, and the y-axis of the graph represents the amount of fade.

6. In the Shadow subpalette of the Light palette, set Rays to 500, Aperture to 5, and Uni to 100. Edit the Shadow curve so that the orange portion nearly fills the graph as in Figure 9-62.

Multiple Lights and Shadows

Remember that the shadow settings are for the selected light. Another light can have a completely different arrangement of shadows at the same time when rendering with Best quality.

Figure 9-62: Realistic shadows can be created by experimenting with combinations of the shadow settings in the Light palette.

f0962.tif

Understanding Materials

Materials in ZBrush determine the quality of the surface of a model and pixols drawn on the canvas. For example, if you want to create a purple shiny ball in ZBrush, the purple color is determined by the color or texture applied to the ball and the material determines the shiny quality. Of course in some cases, such as when you use a material such as the ReflectRed material, the red color of the material will be mixed with the colors applied to the surface. This may seem confusing at first, but as you gain an understanding of how materials work, it should start to make more sense.

For the most part, materials are meant to be used in ZBrush and cannot be exported directly from ZBrush for use in other 3D programs. All of the settings you create for materials exist only within the ZBrush document. You can save your materials and special material files (.ZMT); however, this file format can only be used within ZBrush.

Exporting Materials

There are some tricks that you can use for exporting materials if you really want to. For information on how to do this, watch Joseph Drust’s “Baking MatCaps to Texture Maps” tutorial at www.pixologic.com/zclassroom/homeroom. Keep in mind that this is not a standard ZBrush workflow and requires a good understanding of materials, textures, and other ZBrush features.

There are two major categories of material: Standard materials and MatCap materials. The materials library separates these types of materials. MatCap materials are in the upper section; Standard materials are at the bottom (see Figure 9-63). Standard materials are largely determined by the settings in the Modifiers section of the ZBrush palette.

Figure 9-63: The materials library is separated into two major sections. MatCap materials are in the upper section, and Standard materials are grouped at the bottom.

f0963.tif

MatCap (Material Captured) materials are created by sampling parts of an image. You can import a photo into ZBrush and use it as the basis for a MatCap material. Typical MatCap materials do not react to changes in lighting in a ZBrush document. They have their own set of modifiers. The section on MatCap materials in this chapter shows you how you can create your own MatCap materials.

Materials can add realism or special effects to the images you render in ZBrush. They can also be used as a sculpting aid. Different materials can reveal different aspects of your 3D tools. Changing materials every once in a while during the sculpting process can help you to see aspects of your sculpture you might not otherwise notice. And you can create your own material presets for use in future projects. For example, you’ll notice a material named xray1 in Figure 9-63. This is a custom material I created myself; it will not appear in your version of ZBrush. Later in this chapter you’ll learn how to create your own material presets.

A shader is a collection of settings that determine how the material looks on the canvas. Each material uses at least one shader. You can combine more than one shader into a single material and adjust how the different shaders work together. In fact, you can even create a complex material by combining the shaders that make up MatCap and Standard materials so that you get the best qualities of both types of shaders. A single material can combine up to four shaders.

ZBrush 4 now gives artists more options for combining shaders. Now you can create complex subsurface scattering effects as well as experimental and stylistic materials.

In the following sections, you’ll learn how to use the different types of shaders.

Standard Materials and Shaders

This section introduces you to the Standard materials. They are found in the lower half of the material inventory. A Standard material uses one or more standard shaders. Changes you make to materials are saved with ZBrush documents. They are not saved with ZBrush tools.

Figure 9-64: Choose the BasicMaterial from the material library.

f0964.tif

1. Start a new ZBrush session.

2. Use the Open button in the File menu to load the DragonHeadRender.ZPR project from the Chapter 9 folder on the DVD.

3. From the materials inventory, select the BasicMaterial (Figure 9-64).

4. Place the Material palette into a tray.

The top of the Material inventory shows the current material in the large icon. The smaller icons represent more recently used materials. Hold the mouse pointer over any of the material icons and you’ll see a preview of what the current tool will look like with the material applied (Figure 9-65).

5. Click the Show Used button below the icons. This will reduce the upper palette to show only the materials currently in use.

6. Expand the Modifiers subpalette for the BasicMaterial. Modifiers alter the settings of a material. Notice at the top there are four slots labeled S1, S2, S3, and S4. Only the S1 slot in the BasicMaterial is available. The others are grayed out.

Figure 9-65: Hold the mouse pointer over a material to see a preview of the mesh with that material applied.

f0965.tif

A material is made up of one or more shaders. The settings for each shader are displayed when one of the shader buttons is activated. The shader buttons are labeled S1, S2, S3, and S4 at the top of the Modifiers subpalette.

The shaders are sets of modifier settings. The long list of settings and sliders you see in the Modifiers subpalette of the BasicMaterial are essentially its shader (Figure 9-66). The BasicMaterial has only one shader available; other materials may have up to four.

Figure 9-66: A shader is a group of settings within a material.

f0966.tif

7. Select the TriShaders material at the bottom of the materials inventory and expand its Modifiers subpalette. The shader is immediately applied to the entire dragon head.

8. The TriShaders material has three of the four shader slots available. Click the S2 button and set the Diffuse slider to 1 (see Figure 9-67). You’ll see the dragon become slightly darker.

Figure 9-67: Select the S2 shader and set the Diffuse slider to 1.

f0967.tif

9. Click the S1 button and the Diffuse slider changes. However, the material on the model does not.

What’s going on here is that you are switching between two of the three shaders that make up the TriShaders material. The TriShaders material uses three sets of the basic shader settings loaded into slots S1, S2, and S3. These settings are initially identical. When the dragon is rendered at Preview or Best quality, the settings from the three slots are combined.

Copy and Paste a Shader

You cannot add or remove shader slots from a material, but you can change the settings in each slot. You create multi-shader materials by copying and pasting between shaders from one material to another.

1. Click the ReflectedMap2 material and it will be applied to the dragon head.

2. Click the S1 button to view the first shader settings. Notice that the modifiers are different between S1 and S2 of this material.

3. Click the CopySH button. This will copy the shader settings to memory (Figure 9-68).

Figure 9-68: Click the CopySH button in the S1 settings of the ReflectedMap2 material.

f0968.tif

4. Expand the materials inventory. You’ll see that the TriShaders material has been moved to the top section, labeled User Materials. Click the TriShaders material again. The dragon head switches back to the TriShaders material.

5. Click the S1 button in the TriShaders’ Modifiers subpalette.

6. Click the PasteSH button to replace the TriShaders’ S1 settings with the shader settings from the ReflectedMap material which have been copied to the clipboard. This replaces all of the settings as well as the sliders available in the TriShaders material’s S1 slot.

So to create a new material, you can copy shaders from one material and paste them into the shader slot of another material, such as the TriShaders material.

Copy and Paste a Material

You can also paste all the shaders of a material at once by copying one material and pasting it over another material.

1. Click the CopyMat button in the Material palette. This appears below the inventory (see Figure 9-69).

Figure 9-69: The CopyMat button appears below the inventory in the Material palette.

f0969.tif

2. In the Material palette, select the JellyBean material. This material normally has only one shader slot.

3. Click the PasteMat button.

All of the shaders and settings for the Jelly Bean shader will now be replaced with the shaders and settings from the TriShaders material. Notice that the Jelly Bean material now has three shader slots, just like the TriShaders material.

Save a Material

As you start developing your own materials, you’ll want to save them for use on other ZBrush models. You can quickly develop your own library of custom materials. Custom materials are also saved as part of the ZBrush project (ZPR) and ZBrush document (ZBR) formats but not as part of the ZTool format (ZTL).

To save a material, use the Save button in the Material palette. The material is saved in the ZMT format. If you save the file to the ZMaterials folder in the PixologicBrush 4 folder, the material will appear in the Materials section of Light Box.

Design a Custom Standard Shader

In this section you’ll take a look at some of the specific settings that affect the way a material looks on the model. You’ll start with some of the fundamental settings found in many of the Standard materials.

The Ambient, Diffuse, and Specular settings found within a standard ZBrush shader determine how a surface reacts to the lights that illuminate the ZBrush canvas.

The Ambient slider controls how the surface reflects the indirect lighting of an environment. Indirect lighting comes from the secondary rays of light that bounce around within an environment. The Ambient slider determines how strongly the ambient light in the document will be reflected by the material. It does not change the ambient lighting in the light panel, just how the material reacts to ambient light. Ambient light does not have a source.

The Diffuse slider controls how the material diffuses the light that comes directly from a light source. Higher diffuse values make the lighting appear more intense and the colors brighter.

The Specular slider controls how strongly the surface reflects the light source. A specular highlight on the surface is a reflection of the light source. In the real world, specular highlights are directly related to the reflectivity of a material. In computer graphics programs such as ZBrush, specular and reflectivity channels are often separated into different controls.

Rough materials such as concrete have a high diffuse value and low specular value. Smooth surfaces such as metal have a high specular value but a low diffuse value. Some materials such as glossy paint are made up of layers, which means both specular and diffuse values can be high.

Edit the Diffuse Channel

The best way to get a sense of how to work with shader settings is to use a very simple standard material such as the BasicMaterial. In this section, you’ll start creating a custom material for the dragon head using the BasicMaterial shader as a starting point.

1. Start a new ZBrush session.

2. Use the Open button in the File menu to load the DragonHeadRender.ZPR project from the Chapter 9 folder on the DVD.

3. From the material inventory, select the BasicMaterial.

4. Place the Material palette into a tray.

5. Expand the Modifiers subpalette of the Materials palette.

6. Set Ambient to 0 so that the material is only illuminated from direct lighting. This helps to add contrast to the surface.

7. Set Diffuse to 100.

Many settings in the materials modifiers use both a slider and a curve. The slider sets the overall value of the channel; the curve allows you to fine-tune how the setting is applied. The value of the slider determines the 100 percent value used by the curve.

8. Expand the Diffuse curve and add a point to it. Create a slope like the one shown in Figure 9-70.

The Diffuse curve controls the strength of the diffuse light reflected in the surface based on the facing ratio of the surface. The left side of the graph represents the diffuse strength on parts of the surface that turn away from the view. The right side determines the strength of the diffuse light on the parts of the surface perpendicular to the view. When you create a steep slope, the diffuse light is reflected by more of the surface and the shadows appear darker and tighter, which adds contrast to the material. This helps bring out the shape of the scales.

Continue with this project in the next section.

Figure 9-70: Edit the Diffuse curve to increase contrast in the surface of the model.

f0970.tif

Edit the Specular Reflections

The Specular controls determine how the reflection of a light source on a material’s surface appears.

1. Set the Specular slider to 40.

2. Expand the SpecularCurve below the Specular slider.

3. Add points to the SpecularCurve and experiment with the shape of the curve. See how it affects the look of the highlights on the dragon’s head. Shape the curve so that it matches the left image in Figure 9-71.

4. Below the SpecularCurve, set the Noise slider to 0.2. This adds noise to the curve, which breaks up the look of the highlight by adding random noise (see the right image in Figure 9-71).

Figure 9-71: Edit the Specular curve to change the appearance of the specular highlight on the surface of the dragon. Increase the Noise option for the curve to break up the highlight.

f0971.tif.

5. Set Metalicity to 40. This makes the surface appear more metallic by blending the surface color into the color for the highlights.

6. Scroll down in the Modifiers subpalette and find the AnisotropicSpecular slider. Set this slider to 0.25.

Anisotropy spreads out the edges of the specular highlight to simulate the way light is reflected from a surface that is made up of tiny microfacets.

7. In the Material palette, click the Save button. Save the material as DragonSkin.ZMT. Save the material to the PixologicBrush4Materials folder. The material will appear in the Materials section of Light Box.

Continue with this scene in the next section.

Edit the Reflectivity Channel

You can make the surface appear to reflect a texture using the Reflectivity channel. You can use one of the textures in the texture library or import your own custom texture. This exercise demonstrates how to add reflection to the surface.

1. In the Texture palette, click the Import button. Import the Flames.bmp file from the Chapter 9 folder on the DVD. This is simply a render of a fluid dynamic simulation created in Maya.

2. In the Material palette, click the empty texture slot at the bottom of the Modifiers subpalette. Select the Flames texture from the texture library (Figure 9-72).

Figure 9-72: The Flames.bmp file texture is added to the Reflectivity texture slot of the DragonSkin material.

f0972.tif

3. Set Reflectivity to 80.

The Reflectivity slider can be set to positive or negative values. When positive values are chosen, the strength of the reflection of the Flames texture is based on the how much of the surface faces the view. When negative values are chosen, the strength of the reflection is based on the lightness of the surface colors.

4. Expand the Reflectivity edit curve below the Reflectivity slider. Edit the curve so that it looks like Figure 9-73.

The curve determines how the surface reflects the Flames texture. The slope as it appears in Figure 9-73 makes the reflectivity in the parts of the surface that turn away from the view stronger than the parts that face the view.

Figure 9-73: Adjust the slope of the Reflectivity curve so that the left side is higher than the right.

f0973.tif

You’ll also notice that the material has an Env Reflection slider. This determines how the environment is reflected on the object. The environment that is reflected in the surface is determined by the settings in the Environment subpalette of the Render palette. The environment reflection is only visible after the canvas has been rendered in the Best quality render mode.

5. Set Env Reflection to 10.

6. In the Render palette, expand the Environment subpalette and press the Scene button. This means that the objects on the canvas will be reflected in the surface. Note that this reflection is added after the image completes rendering at Best quality mode.

7. In the Render palette, click the Best button to render the canvas at Best quality mode. Figure 9-74 shows the result.

8. In the Material palette, click the Save button. Save the material as DragonSkin.ZMT. Save the material to the PixologicBrush4Materials folder. The material will appear in the Materials section of Light Box.

Figure 9-74: The dragon head is rendered at Best quality mode.

f0974.tif

Additional Material Settings

There are a number of other settings available in the standard shader, which is used by the DragonSkin material created in the previous section. To find out how a setting affects the material, hold the Ctrl button while positioning the mouse pointer over the slider.

The following are some settings that can add interesting effects to the shader. Experiment with these settings using the DragonSkin material.

Noise Noise adds a turbulent noise to the color of the material. Increase Noise Radius to change the scale of the noise. The Noise curve determines the shape of the noise by adding areas of light and dark colors.

When the Noise slider is set to positive values, the noise has a sharp edge, and when it’s set to negative values, the noise appears more cloudy.

Color Bump Color Bump adds a bumpy quality to the surface based on the colors of the surface. The colors painted on the surface and the material, textures, and noise applied to the material all affect how the bumps appear. Positive values for the Noise slider mean that the lighter colors push outward; negative values mean that the lighter values push inward.

Gel Shading The Gel Shading slider adds a translucent quality to the surface. The slider can be set to 0, 1, or 2. A value of 0 turns Gel Shading off. A setting of 1 or 2 creates a different quality of translucency.

High Dynamic Range High Dynamic Range intensifies the colors of the material. The value of the slider is multiplied against the settings of the material to increase the intensity.

Cavity The Cavity settings add a distressed look to the surface by adding color to the recessed areas of the material. You must render with Best quality mode to see the effect of Cavity. You’ll also need to increase CavityRadius and CavityColorize to see the effect. CavityDiffuse and CavitySpecular set the way in which the recessed areas reflect light.

Colorize Diffuse, Colorize Specular, and Colorize Ambient Colorize Diffuse, Colorize Specular, and Colorize Ambient increase the influence of the colors set in the Dif, Spec, and Ambi color swatches at the bottom of the Modifiers subpalette. Click on the color swatches to set the color for each channel; then increase the Colorize Diffuse, Colorize Specular, and Colorize Ambient sliders to see how it affects the material.

PhongBlinn Specular PhongBlinn Specular changes the quality of the specular highlights based on the algorithms used by conventional Blinn and Phong shaders used in other CG programs. Set this to 0 to create Phong-type highlights, which are suitable for plastic and glass materials. Set this to 1 to create a Blinn-type highlight, which is more suitable for skin. Values in between 0 and 1 blend between the highlight styles.

Follow these steps to see how the edited material looks on the dragon head model.

1. Use the Load button in the Material palette to load the DragonSkin_v2.ZMT material from the Chapter 9 folder on the DVD.

2. Apply it to the dragon head model and examine the settings (see Figure 9-75).

3. Render using Best quality to see the effect of the material.

Figure 9-75: Apply the DragonSkin_v2.ZMT material to the dragon head.

f0975.tif

Material Transparency Channel

The Transparency channel of the Standard shaders is a little tricky to use. The transparency effect of the material is only visible when rendering with Best quality mode and it requires the use of document layers. This means that the tool must be dropped to the canvas for material transparency to work. I recommend that you consider using SubTool transparency and render with BPR when you want to create transparent surfaces instead of using the material transparency controls. This workflow is described earlier in the chapter in the section titled “SubTool Transparency.”

Paint Materials

Materials can be painted onto a 3D tool just as colors can. Materials are applied to the polygons of a surface. Unlike with polypainting, materials are not blended, so unless the surface is at a very high resolution, the border between materials can appear somewhat jagged. However, if you use some strategy when painting a material on part of a surface, it is possible to hide the jagged borders between materials.

When you want to paint a material on a surface, you must make sure that the M or the Mrgb button is activated on the top shelf. The M button activates material mode; the Mrgb button activates material and color mode. In addition, polypainting must be turned on for the surface.

As demonstrated earlier in the chapter in the section “SubTool Transparency,” you can fill a SubTool with a material using the Fill Object button in the Color palette.

MatCap Materials

MatCap (Material Capture) materials were originally designed to help artists integrate ZBrush strokes and tools seamlessly into photographs. Using the MatCap tool, the material quality of an object can be sampled directly from a photograph and applied to a 3D tool. ZBrush ships with a number of MatCap presets located at the top of the Material palette. This exercise will take you through the process of creating your own MatCap material.

Use the MatCap Tool

The MatCap tool is used to sample colors from an image. You can then use the tool to determine how the sample colors appear on the surface based on the normal direction of the surface. In this example, you’ll use an image of uncooked chicken to create a fleshy material.

1. Start a fresh session of ZBrush.

2. In the Document palette, press the Open button. Open the matCapStart.ZBR document from the Chapter 9 folder on the DVD.

This document has a photo of uncooked chicken, which has been placed on the canvas.

3. In the Tool palette, press the Load Tool button. Load the Monster.ZTL tool from the Chapter 9 folder on the DVD. Draw the tool on the canvas and switch to Edit mode.

4. From the Material palette, choose the MatCapWhite01 material. This will be applied to the monster tool. You can use it as a guide as you work on creating the MatCap material.

5. Place the monster tool off to the side so that you can see the image in the background (see Figure 9-76).

Figure 9-76: Place the monster tool off to the side so that you can see the image of the chicken in the background.

f0976.tif

6. From the Tool palette, select the MatCap tool (Figure 9-77). You will get a warning asking if you want to switch tools. Click Switch to accept the warning.

Figure 9-77: Choose the MatCap tool from the tool inventory

f0977.tif

When you switch to the MatCap tool, the monster will be converted to pixols and dropped to the canvas. That’s okay. As you use the MatCap tool to edit the MatCapWhite01 material, you’ll see the monster update. This will give you a good idea of how the material looks as you create it.

7. Click on one of the pieces of chicken in the photograph. An arrow with a circle will appear (see Figure 9-78). As you drag the brush, the angle of the arrow will change. The tool will sample the color from the point where you hold the brush.

Figure 9-78: Click on the chicken in the image to sample a color.

f0978.tif

The MatCap tool samples the color where you first click on the image. The arrow indicates how the colors will be mapped to the material surface. The direction of the arrow indicates the normal direction that corresponds to the sampled color. At first this won’t appear to make much sense, but as you continue to sample colors using the MatCap tool, it should become more obvious how the tool works.

8. Release the tool. The sample color is applied to the material. You can see the result on the monster model.

9. Click on another part of the chicken image to sample another color. Hold the brush and drag to change the normal direction. For best results, you’ll want to aim the arrow in the direction the light is coming from if you want the light of the material to match the light in the image.

Each time you create a sample, a preview sphere appears to the right of the sample point. The preview sphere indicates how the sample color will be mapped to the material based on the direction of the arrow. When you release the brush, the second color is mapped to the material.

10. Use this same technique to sample six or seven more colors from the image (see Figure 9-79).

11. Move the brush over the chicken image without pressing on the mouse key or pressing on the tablet, and you’ll see dots appear at the positions where you sampled the image.

If you position the brush over these spots, the arrow will reappear, allowing you to change the normal angle of the sample. You can remove the sample markers by holding the Alt key while clicking on the markers.

12. Sample one of the lighter colors of the image, where the chicken appears wet. Hold the Ctrl key and drag left or right. This reduces the area of the sample color on the material, creating a specular highlight (see Figure 9-80).

Figure 9-79: More colors are sampled from the image and added to the material.

f0979.tif

Figure 9-80: Create a highlight on the material by holding the Ctrl key and dragging to the right.

f0980.tif

13. Use the Save button in the Material palette to save the material as chickenFlesh.ZMT. Save the material to the ZMaterials folder in the PixologicBrush 4 folder on your local hard drive. The material will appear in the Materials section of Light Box.

14. Continue with this document in the next section.

Modifying Mat Cap Materials

You can add a second set of sample points to the material. This second set of samples can be mapped to the cavities of the surface, which creates a sense of depth to the material.

1. Continue with the document from the previous section. Make sure the MatCap tool is still the current tool.

2. Place the Material palette in the tray so that you can access the controls.

3. Expand the Modifiers subpalette of the Material palette.

4. In the Modifiers section, hold the mouse pointer over the picture of the sphere toward the bottom of the palette. An enlarged view appears, showing you how the points that you have sampled so far are mapped to the material (see Figure 9-81).

Figure 9-81: A preview of the samples appears in the Modifiers subpalette of the Material palette.

f0981.tif

5. Click the B button in the MatCap Modifiers subpalette of the Tool palette (see Figure 9-82).

Figure 9-82: Click the B button in the MatCap Modifiers subpalette.

f0982.tif

6. Use the MatCap tool to sample some darker colors from the image of the chicken.

When the B button is active, the colors that you sample are mapped to a second preview sphere. Note that now the material preview at the bottom of the Modifiers subpalette shows two spheres.

The sphere on the left is a shading map for the raised areas on the pixols or 3D tools that have the material applied. The sphere on the right is the shading map for the recessed areas or cavities. While the B button is activated, any samples you take from the image using the MatCap tool will be applied to the sphere on the right of the preview and thus all the recessed areas in the material. You can create an entirely different map for the recessed areas. The MatCap Red Wax material is an example of a material that uses two shading maps.

7. Take a few more samples from the image using the MatCap tool so that the B map looks different from the A map (see Figure 9-83)

Figure 9-83: A second shading map, seen as an additional sphere in the preview, determines the coloring for the recessed areas of a surface with the material applied.

f0983.tif

8. In the Modifiers subpalette, set the Cavity Detection slider to 0.5. This controls the sensitivity of the material to the raised and lowered parts of the pixols or the 3D tool.

9. Set the Cavity Transition slider to -0.5. This setting smooths the transition between the recessed and raised areas.

If you set this slider to 0.5 you will reverse the A and B channels so that shading map A (the preview sphere on the left) is applied to recessed areas and shading map B (the preview sphere on the right) is applied to raised areas.

10. Take a few moments to experiment with the other A and B sliders. These basically fine-tune the look of the A and B shading map channels. Increase the intensity of the B slider to 1.2 to give a translucent look to the material.

11. Use the Save button in the Material palette to save the material as chickenFlesh.ZMT. Save the material to the ZMaterials folder in the PixologicBrush 4 folder on your local hard drive. The material will appear in the Materials section of Light Box. A copy of this material can be found in the Chapter 9 folder on the DVD.

Figure 9-84: The final material as it appears on the monster tool.

f0984.tif

Figure 9-84 shows the final material applied to the monster tool.

The four white swatches can be used to tint the material. Click on each to open the color picker and choose a color.

The base swatch takes away the specified color from the material color to the material, so if you set the base to green, the material will appear purple. The A and B swatches tint the A and B channels with the selected color. The Col swatch tints the material; the strength of the tinting color is determined by the Colorize slider.

MatCap materials can be a lot of fun to make. You can try to match the colors in the initial photograph or just use it as a starting place for creating specialized materials.

Custom Matcap Textures

When you’re using the MatCap tool, you’re essentially creating a spherical color map that appears as a texture. Another great way to create interesting materials is to simply replace the MatCap texture with your own texture. This way you don’t even need to use the MatCap tool. For example, I created a cartoon look for the driver of the monster car by painting a simple image in Corel Painter. Here’s how:

1. Create a square image in a paint program.

2. Create a circle that stretches to the edge of the texture.

3. Paint colors into the circle. Imagine the circle as a sphere; the placement of the colors on the sphere determine where those colors appear on a surface based on the normal directions of the surface. By painting dark edges around the circle, you can create the look of toon lines.

4. Save the image in PSD format.

5. In ZBrush, use the Import button in the Texture palette and import the PSD file.

6. In the Modifiers section for the MatCap material, click on the material sample image at the bottom of the palette to open up the Texture palette. Select the imported image.

7. Save the material. The texture will be saved as part of the material.

The following images show how I painted two circles to use as the A and B channel of the monster skin material and how the material looks on the surface of the model when rendered using BPR. Look in the Chapter 9 folder of the DVD and you’ll find samples of materials I created using this technique.

g0902.tifg0903.tif

There are dozens of free MatCap materials created by artists and available to download at www.pixologic.com/zbrush/downloadcenter/library.

Use the Shader Mixer

When you create a material that uses more than one shader, you can use the settings in the Shader Mixer subpalette of the Material palette to determine exactly how the materials are blended. This means you can build complex materials by blending shaders.

Mix Shaders

In this example, you’ll use the settings in the Shader Mixer to control how two shaders are mixed together. In this case, you’ll layer a Standard material on top of a MatCap material to create a unique look.

1. Start a fresh session of ZBrush.

2. Use the Open button in the File menu to open the MonsterCar.ZPR project from the Chapter 9 folder on the DVD.

3. Place the Material palette in a tray so that you can access the controls easily.

4. From the material library, select the JellyBean material.

5. In the Modifiers section of the Material palette, click the CopySH button to copy the shader into memory.

6. From the material library, choose the DoubleShade1 material.

7. In the Modifiers section of the Material palette, make sure S1 is selected; the S1 button should appear in orange. Click the PasteSH button to paste the JellyBean shader into the S1 slot.

8. From the material library, select the MatCap Sculpy2 material.

9. In the Modifiers section of the Material palette, click the CopySH button to copy the shader into memory.

10. From the material library, choose the DoubleShade1 material.

11. In the Modifiers section of the Material palette, make sure S2 is selected; the S2 button should appear in orange. Click the PasteSH button to paste the MatCap Sculpy2 shader into the S2 slot.

The DoubleShade1 material now uses the JellyBean shader in the S1 slot and the MatCap Sculpy2 shader in the S2 slot. This means that the JellyBean shader is layered on top of the MatCap Sculpy2 material.

12. Continue with the current project in the next section.

Shader Blending Modes

The BlendMode button determines what type of algorithm is used to combine the shaders together. The settings in the Shader Mixer are applied to the selected shader in the Modifiers section.

1. Click the S1 shader in the Modifiers for DoubleShade1.

2. Expand the Shader Mixer subpalette of the Material palette (see Figure 9-85).

Figure 9-85: The Shader Mixer subpalette in the Material palette.

f0985.tif

3. Click BlendMode. A long list will appear. Try selecting various modes and see how the material is affected. Try Screen, Average, and Overlay and notice the difference each time you change blend modes (see Figure 9-86).

Figure 9-86: Choose from the list of blend modes to determine how one shader is layered on top of another.

f0986.tif

When Screen is chosen, the lightest values from S1 are blended with the shader in the S2 slot. This is a good technique for adding specular highlights on top of a MatCap material.

4. Select Screen from the list of blend modes.

5. With S1 selected in the Modifiers subpalette of the Material palette, scroll down the list of settings and set Reflectivity to 30.

6. Scroll to the bottom of the codifiers and click the Txtr00 button to open the texture library. Select Texture01 from the library. This is the desert scene.

7. Scroll back up to the Shade Mixer subpalette. Set Fresnel to 30.

The Fresnel slider determines how the S1 settings are blended with the S2 settings based on the normals of the surface. Positive values mean that the S1 shader is stronger on the parts of the surface that turn away from the canvas. Negative values mean that the S1 shader is stronger on the parts of the surface that face the view.

8. In the Tool palette, expand the SubTool subpalette. Select the Dome SubTool and turn on the intersection icon (see Figure 9-87). This will cause the dome to render as transparent in a BPR render.

Figure 9-87: Turn on the intersection icon for the Dome SubTool.

f0987.tif

9. In the Render palette, turn on the Transparent button.

10. Press Shift+R to create a BPR render. Figure 9-88 shows the result.

Figure 9-88: The monster car model is rendered using the blended shaders and the BPR render mode.

f0988.tif

Try copying and pasting shaders into the TriShader material and see if you can use the Shader Mixer settings to blend three shaders together.

Render Subsurface Scattering Effects

Subsurface scattering is a term to describe the phenomena that occurs when photons of light penetrate the outer layers of a surface, bounce around, and then leave the surface and return into the environment. This effect gives wax, jade, and even human skin its translucent quality.

ZBrush 4 has upgraded many of the rendering and materials settings to enable the ability to create this effect for your models when you render using BPR.

The material setup is rather complex, but fortunately ZBrush has included a number of demonstration files that will help you get started applying this effect to your own models.

To make the subsurface effect visible in a BPR render, several options throughout the ZBrush interface must be enabled:

  • In the Render palette, the Sss button should be turned on.
  • In the Light palette, at least one light needs to have the Sss option enabled. The light does not need to be on but the option does. You can select the lightbulb icon in the lower right of the Light palette and enable the Sss option. Make sure the icon itself is not orange; this means that it is not turned on.
  • The material that is applied to the tool needs to have three shaders. The S2 slot should be occupied by the subsurface scattering shader.
  • The Sss slider in the Shader mixer should be increased for the S2 shader.
  • You must render the tool using the BPR render mode.

Render a Subsurface Scattering Material

The easiest way to apply a subsurface scattering shader to one of your own models is to load your tool into an existing project that is already configured to render this effect. Follow these steps to render one of the dragon models with subsurface scattering.

1. Start a fresh session of ZBrush.

2. Open Light Box to the Projects directory.

3. Double-click on the SSSRhino.ZPR project to load it into ZBrush (see Figure 9-89).

Figure 9-89: Load the SSSRhino.ZPRproject from the Projects section of Light Box.

f0989.tif

4. Turn on the Perspective button and rotate the view of the rhino.

5. Set the main color in the color picker to white.

6. Press Shift+R to render the rhino. The subsurface effect is fairly obvious in the thinner parts of the model, such as the horn where the color is redder and lighter, than it is in the thicker parts of the model (see Figure 9-90).

Figure 9-90: The Subsurface Scattering is visible in the horns, ears, tail, and feet of the Rhino.

f0990.tif

7. In the Tool palette, click the Load button and load the WaxDragon.ZTL tool from the Chapter 9 folder on the DVD.

8. Adjust the view so that you can see the dragon model.

9. Press Shift+R to render the dragon. Again, the subsurface scattering quality is visible in the thinner parts of the model.

If you take a look at the modifiers for the material applied to the dragon, the material has three shaders. S1 and S3 are both standard shaders like the one used by the BasicMaterial. S2 is a special Fresnel Overlay shader that determines the color of the subsurface scattering effect.

10. Click on the Inner Blend color swatch at the bottom of the Modifiers subpalette for S2. Use the color picker to set the color to bright green.

11. Set Outer Blend to bright blue.

12. Press Shift+R to render the dragon. Now the thinner parts of the model take on a blue and green tint (see Figure 9-91).

You can also experiment with the settings in the Shader Mixer to create different effects for the shader. Try applying different blend mode settings to the S2 shader.

Figure 9-91: The dragon is rendered using the subsurface scattering material in BPR render mode.

f0991.tif

The Fiber Material

Rendering hair and fur effects in ZBrush is very easy thanks to the special Fiber material. This material works with both Best and BPR render modes, but you generally get the best results when using BPR.

Render Fibers

To render fibers, you simply need to apply the Fiber material to a surface. Turn on the Fibers option in the Render palette, and then render using BPR. The fibers appear on the surface when the render is complete. There are a number of settings in the Fiber shader that determine the look of the hair and fur.

In this example, you’ll apply the Fiber material to the DemoDog model.

1. Start a fresh session of ZBrush.

2. In the Tool section of Light Box, double-click the DemoDog.ZTL tool. Draw it on the canvas and switch to Edit mode.

3. Press Ctrl+D twice to subdivide the model.

4. In the material library, select the Fibers1 material in the lower right of the Standard Material section of the Material library (see Figure 9-92).

Figure 9-92: Select the Fibers1 material.

f0992.tif

5. In the Render palette, turn on the Fibers option.

6. Press Shift+R to create a BPR render. When it is complete, you’ll see that the dog is covered in fur (see Figure 9-93).

Figure 9-93: The dog is rendered with Fibers1 material applied in BPR render mode.

f0993.tif

7. Place the Material palette in a tray and expand the Modifiers section.

The Fibers1 material has two shaders. The S2 slot uses a standard shader. The S1 slot uses the special Fiber shader. You’ll find sliders that determine the length, density, gravity, waviness and so on for the fibers.

8. Apply these values to the following settings to create a shaggy dog look:

Length: 45

Density: 45

Strand Density: 2

Length Variations: 12

Density Variations: 12

Direction Variations: 5

Gravity: 0.24

9. Press Shift+R to render the model with fibers (see Figure 9-94).

10. Use the Save button in the Material palette to save the material as ShaggyHair.ZMT.

Figure 9-94: The settings are adjusted in the Fiber shader to create the look of a shaggy dog.

f0994.tif

Create a Beard

You can paint the Fiber material onto the surface to create hair on specific parts of a model. In this exercise, you’ll create a beard and eyebrows for the driver of the monster car using the ShaggyHair.ZMT material.

1. Use the Open button in the File menu to open the MonsterCar.ZPR project from the Chapter 9 folder on the DVD.

2. Hold the Option key and click on the head of the driver to select this SubTool.

3. Press the Solo button on the right shelf to hide all of the SubTools except the head.

4. Scale up the view of the head.

5. Set the draw size to 30. Hold the Ctrl key and paint a mask on the face of the model. Paint a mask for the beard area and the eyebrows (see Figure 9-95).

Figure 9-95: Paint a mask for the beard and eyebrows of the head.

f0995.tif

6. Ctrl+click on the canvas to invert the mask.

7. Use the Load button in the Material palette to load the ShaggyHair.ZMT material. This can be found in the Chapter 9 folder of the DVD. Make sure this material is selected in the Material palette.

8. On the top shelf, turn on the M button.

9. In the Color palette, press the Fill Object button.

The Fill Object button fills the unmasked areas of the head with the ShaggyHair.ZMT material. If the head turns black, clear the mask by Ctrl dragging on a blank part of the canvas. Set the main color to white, press the Rgb button on the top shelf, and press the Fill Object button in the Color palette again.

10. In the Material palette, select the SkinShade01 material.

11. In the Render palette, make sure the Fibers button is on. Turn off the Solo button on the right shelf.

12. Press Shift+R to render the model. The driver should have a shaggy beard and eyebrows. Figure 9-96 shows the result.

Figure 9-96: The character uses the ShaggyHair.ZMT to create a beard and eyebrows.

f0996.tif
..................Content has been hidden....................

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