Bonus Content 2

ZScripts and ZPlugins

ZScripts and ZPlugins are tools designed to extend the capabilities of ZBrush and make certain tasks much easier. ZScript is a simple scripting language that is essentially a list of commands. Many ZPlugins have been created using ZScript.

Pixologic offers a number of free ZPlugins, which can be downloaded from www.pixologic.com. The plug-ins are easy to install and use. Some of these plug-ins you’ve already encountered in previous chapters of this book.

This chapter demonstrates how to record, save, and use a simple ZScript. You’ll also learn how to install and use the ZPlugins available from Pixologic. This chapter includes the following topics:

  • Using Quick Sketch ZScript
  • Recording a ZScript
  • Using Projection Master
  • Installing a ZPlugin
  • Using ZPlugins

Using ZScript

ZScript is a simple scripting language designed to automate basic tasks in ZBrush. A good example of a ZScript is Quick Sketch, which is activated when you click the Quick Sketch button on the top shelf.

You don’t actually need to write out a ZScript; ZBrush will create a ZScript for you by simply recording the actions you take within the ZBrush interface.

In this section, you’ll learn how to use Quick Sketch and also how to record and use your own ZScript.

Using Quick Sketch

The purpose of this ZScript is to transform the ZBrush canvas into an environment in which you can sketch out ideas by using the Pen Shadow brush (see Figure B2-1). If you click the button, you’ll see that the screen turns a light gray color. When you drag on the canvas, you’ll see stylized lines appear. Symmetry is activated, so the lines you draw on one side of the canvas are mirrored to the other side.

Figure B2-1: The Quick Sketch button rearranges the interface to make it easy to create symmetrical sketches on the canvas.

bbc02f001.eps

When you click the Quick Sketch button, ZBrush performs several tasks in order to make sketching possible. These tasks include the following:

  • Creating a polygon plane that is parallel to the canvas
  • Switching to Edit mode to ensure that the polygon plane can be edited
  • Activating Symmetry across the x-axis
  • Setting the current material to Flat Color
  • Setting the current sculpting brush to Pen Shadow

These are all tasks you could easily perform yourself, but by recording the tasks as a ZScript, ZBrush makes setting up a Quick Sketch fast and easy.

Getting Out of Quick Sketch
If you accidentally click the Quick Sketch button on the top shelf while working on a sculpture, you may panic a little because it looks as though you’ve lost all your work. In fact, nothing has been lost. If you need to get back to your sculpture, just perform the following steps:
1. Open the tool fly-out inventory in the Tool palette and select the 3D tool you were working on.
2. Open the fly-out material library on the left shelf and find the material you were using.
3. Set the color back to white.
4. Open the sculpting brush fly-out library and select whichever brush you want.
The Pen sculpting brushes (Pen A, Pen B, Pen Dots, and so on) were designed with Quick Sketch in mind, but you can use them on your sculptures if you like. The Pen Sketch brush is useful for creating wrinkles on skin.

After these tasks are performed, the ZScript stops, and you’re ready to start creating your own Quick Sketch on the canvas. The sketch itself is really just a sculpt created on a polygon plane. You can scale and rotate the view of the plane, just as you can with any other tool. If you want to save your sketch as an image, use the Export button in the Document palette.

Recording a ZScript

ZScripts are easy to create. You don’t need to learn the ZScript language; you can simply record the actions you perform on the screen, and ZBrush will create the ZScript for you.

The important thing to understand about recording a ZScript is that the ZScript is very literal. It records exactly what you do while in ZBrush. If you record a ZScript while working on a customized 3D tool, the ZScript will expect to use that same tool whenever you run the ZScript. If ZBrush can’t find the tool, the ZScript will automatically abort. For this reason, it’s best to make your ZScripts as generic as possible.

In this example, you’ll record a ZScript that loads a PolySphere onto the canvas in Edit mode and then subdivides the PolySphere:

1. Start ZBrush. Open the ZScript palette and place it in a tray. The ZScript palette contains the controls for loading and recording ZScripts (see Figure B2-2).

Figure B2-2: The ZScript palette contains controls for loading and recording ZScripts.

bbc02f002.tif
2. Click the Record button to start recording a ZScript. From this point on, everything you do in ZBrush is recorded.
When you click the Record button, a warning pops up asking whether you want to initialize ZBrush. When you initialize ZBrush, all custom tools are removed and the interface returns to its default state. It’s a good idea to initialize ZBrush when you record a ZScript to ensure that the actions you perform are as generic as possible so that the ZScript can function properly.
3. Click the Yes button on the warning to initialize ZBrush.
4. In the Tool palette, click the Load Tool button. Use your computer’s browser to find the PolySphere.ZTL tool. This is in the Pixologic/ZBrush 4 R3/ZTools folder.
5. Drag on the canvas to draw the tool. Press the T hotkey to activate Edit mode.
6. Press Ctrl+D twice to add two levels of subdivision to the tool.
7. Press the X hotkey to activate Symmetry.
8. Click the Floor button on the right shelf to turn on the grid.
9. Rotate the view of the PolySphere so you are looking at the front.
10. Press the F hotkey to center the view of the PolySphere.
11. From the material fly-out library, select the BasicMaterial.
12. In the ZScript palette, click the End Rec button to stop the recording. Your computer’s file browser will open. Save the ZScript as makePSphere.txt. Save the file to the ZBrush 4 R3/ZScripts folder.

When you save the ZScript, three files are saved to your ZScripts folder: a text file named makePSphere.TXT, which is a plain-text file with all of the ZBrush commands recorded in order (see Figure B2-3); a file named makePSphere.ZSC, which is the actual ZScript file; and a file named makePSphere.PSD, which is a screen grab of the canvas that can be used as a ZScript icon.

The long string of letters and numbers that you see in the ZScript text file is a record of coordinates that track the movements you made on the canvas while recording the ZScript.

Figure B2-3: The ZScript is a text file that is a list of the recorded commands.

bbc02f003.tif

The long string of letters and numbers that you see in the ZScript text file is a record of coordinates that track the movements you made on the canvas while recording the ZScript.

Loading and Running Your ZScript

There are a couple of ways to load the ZScript. You can use the Load button in the ZScript palette or double-click the icon in the Scripts section of LightBox. Follow these steps to load a ZScript:

1. In the ZScript palette, click the Load button.
2. Use your computer’s file browser to locate the makePSphere.ZSC file in the ZBrush 4 R3/ZScripts folder. The ZScript is loaded, but nothing is happening. To run the ZScript, you need to click the Play button in the bottom tray.

Figure B2-4: Click the button labeled Play in the bottom tray below the canvas.

bbc02f004.tif
3. Click the Hide ZScript button in the ZScript palette. This expands the tray at the bottom of the interface. The button is a toggle, so when you click the button, the bottom tray is either shown or hidden depending on its current state. You’ll see a little button labeled Play.
4. Click the Play button in the bottom tray (see Figure B2-4).
5. A warning appears, asking whether you want to initialize ZBrush (see Figure B2-5). Click the Initialize And Continue button.

In some cases, you can skip initialization depending on what the script does. In this case, if you skip initialization, the results will be kind of strange.

Figure B2-5: A warning appears asking whether you want to initialize ZBrush.

bbc02f005.tif

When you click the Initialize And Continue button, the script will execute, and you’ll see ZBrush execute the recorded commands. At the end of the script, you’ll have a PolySphere on the canvas ready for sculpting.

If you want to see the text of the ZScript in the ZScript window in the bottom tray, click the Txt button in the ZScript palette. The Cmd button displays a list and description of ZScript commands. This can be helpful if you want to write or edit your own ZScripts.

Using Projection Master

Projection Master is a plug-in that comes preloaded in ZBrush. It is activated by clicking the Projection Master button on the top shelf. The purpose of the plug-in is to let you paint and detail your models by using the 2.5D brushes. Prior to ZBrush 3, Projection Master was used to edit digital sculpts. Since ZBrush version 3 introduced the sculpting brushes, the usefulness of this plug-in has diminished; however, many users still prefer to work in Projection Master. In this section, you’ll get a brief overview of how the plug-in works.

Sculpting a Surface in Projection Master

Projection Master can be used to sculpt details into a surface using the 2.5 dimensional brushes normally used for creating illustrations. Some artists like to use Projection Master when sculpting architectural details. This tutorial demonstrates how Projection Master can be used to create a bas relief for the side of an ancient temple.

1. Open the temple_start.ZPR project from the BonusChapter2 folder on the DVD. This is a simple triangle-shaped temple roof created using Dynamesh.
2. When using Projection Master, the sculpted details are projected onto the surface. For this reason make sure Persp is off on the right shelf so that perspective distortion does not affect the projection. Rotate the model so it is facing you straight on from the front, as in Figure B2-6.
3. Open the Geometry palette and make sure that the SDiv slider is set to 4; this is the highest SDiv level for this model. To ensure that the projected details are high quality, always use Projection Master on the highest SDiv level.

Figure B2-6: Rotate the model so that it is facing the front.

bbc02f006.tif

Figure B2-7: Set the options in the Projection Master window and click Drop Now.

bbc02f007.tif
4. Click the Projection Master button on the top shelf. An option window appears, allowing you to set the type of projection for the model. In this case you’re going to project sculpted details, so turn off Color and turn on Deformation. Make sure Normalized is activated so the projection is based on the normal of the surface. Click the Drop Now button (see Figure B2-7).

When you click Drop Now, the model is temporarily dropped to the canvas. This means you can no longer rotate the model or use symmetry. The model has been converted to pixols. This means that you now can use the 2.5 dimensional brushes to sculpt the model. It also means a number of stroke types are now available that are not normally available for the regular sculpting brushes.

5. Open the tool library and select the DecoBrush (see Figure B2-8).
6. On the top shelf, turn off Mrgb and turn on Zsub. Lower the Draw Size, and draw a series of decorative leaflike shapes along the top edge of the model, as shown in Figure B2-9.

Figure B2-8: Choose the DecoBrush from the tool library.

bbc02f008.eps

Figure B2-9: Draw a series of leaflike designs along the top edge of the roof.

bbc02f009.tif
7. Next select the Sphere 3D tool. Using Projection Master, you can use 3D objects as sculpting brushes. For example, if you want to draw a line of evenly spaced spheres along the roof, you can select the Sphere 3D tool and then set the stroke type to LineII. In the Stroke Type palette, set the Spacing slider to 1. This determines the spacing of the spheres along the stroke (see Figure B2-10).
8. Set the Draw Size to 10, drag out a line of spheres along the top edge of the temple roof, and then create a second line on the opposite side, as shown in Figure B2-11.

Figure B2-10: Select the LineII stroke type and set the Spacing slider to 1.

bbc02f010.tif

Figure B2-11: Draw a line of spheres along the top edge of the temple roof.

bbc02f011.tif
9. Now, to add a heroic frieze to the temple, open LightBox to the Tool section, and double-click the DemoHead.ZTL tool to load it into the current ZBrush session.
10. Draw the head on the large black spot at the center of the roof.
11. After you draw it on the surface, you can adjust its position, size, and orientation by clicking the Move, Scale, and Rotate buttons on the top shelf. Note that this activates the Transform Gyro tool rather than the Transpose tool. This is because you are in 2.5 dimensional illustration mode and not 3D sculpting (Edit) mode.
12. Now for some fun! Open the tool library and choose the Smudge brush. Use the brush to blend the edges of the DemoHead’s hair into the sides of the temple and give him some godlike rays.
13. Try using the DecoBrush in Zadd mode to add more of a radiating design, as shown in Figure B2-12.
14. Have some fun using the other 2.5 dimensional brushes and 3D tools to add more details. Once you are satisfied, click the Projection Master button again. The option window reappears. Click the Pickup Now button.

Figure B2-12: Draw the DemoHead onto the front of the surface. Use the Smudge brush and DecoBrush to add radiating lines coming from the head.

bbc02f012.tif

After a few moments the model is returned to Edit mode, and you can once again rotate it and use the sculpting brushes to shape it. The changes you created while in Projection Master are used to displace the geometry (see Figure B2-13). If the model is low resolution, the resulting model will not look as detailed as it did while Projection Master was active. You may need to use the sculpting brushes to clean up stretched parts on the surface.

Projection Master can be used to paint colors and materials onto a surface. This is useful if you like to use the 2.5 dimensional brushes, but in most cases I think it’s easier to use the polypainting techniques described in Chapter 8. If you do use Projection Master to paint a surface, you will need to create UV texture coordinates and create a blank texture using the New Txtr button in the Texture Map subpalette of the Tool palette.

Figure B2-13: When you leave Projection Master the model is returned to Edit Mode and can be rotated and sculpted once again. The changes made in Projection Master are used to displace the geometry of the surface.

bbc02f013.tif

Using ZPlugins

ZPlugins extend the capabilities of ZBrush, making many tasks much easier. ZPlugins are available for free as a download from www.pixologic.com. Periodically, Pixologic adds new ZPlugins to their website. In addition, the ZClassroom on the website has video tutorials on the use of many of these plug-ins.

In this section, you’ll learn how to install the plug-ins and how to use the ZPlugins that are currently available for ZBrush 4.

Installing a ZPlugin

Installing a ZPlugin is easy. In this example, you’ll see how to install UV Master as an example. The other ZPlugins use the same method. Follow these steps:

1. Make sure your computer has access to the Internet. Open a web browser and go to www.pixologic.com/zbrush/downloadcenter/zplugins. On this page, you’ll find all the ZPlugins that are currently available for ZBrush 4 (see Figure B2-14). All of these plug-ins have versions for Windows/PC and Mac OS.

Figure B2-14: Download ZPlugins from the Download Center on the Pixologic website.

bbc02f014.tif
2. Scroll down the web page and find the UV Master ZPlugin toward the top of the list. This plug-in is designed to make UV mapping in ZBrush fast and easy. This is definitely one ZPlugin that every ZBrush user should have.
3. Below the text describing UV Master is a button to download either the PC or the Mac OS X version of the ZPlugin (see Figure B2-15). Click the link that is appropriate for your operating system.

Figure B2-15: Click the link to download the version appropriate for your operating system.

bbc02f015.tif
You’ll also see a link titled More About UV Master, which takes you to a page with a detailed description and a link to the PDF manual for using UV Master.
4. The ZPlugin will download as a zip archive. After it has finished downloading, double-click the archive to extract the zipped files.
5. The zipped file consists of a folder called UVMaster_PC_4.0 or UV_Master_Mac.4.0. For most ZPlugins, the folder contains a ZScript file with the .zsc extension and usually a folder for storing data while the ZPlugin is in use. For UV Master, the script file is named UVMaster_4.0.ZSC, and the folder is named UVMasterData_4.0. You want to move the file and the folder to the ZPlugins folder within the ZBrush 4R3 directory.
6. Select the UVMaster_4.0.ZSC file and the UVMasterData_4.0 folder. Move both of these to the ZPlugs folder (see Figure B2-16). On Windows, this folder is found in Program FilesPixologicBrush 4 R3StartupPlugs. On a Mac, the folder is found in Applications/ZBrush 4 R3/ZStartup/ZPlugs.
7. Restart ZBrush. Open the ZPlugin palette. You should see the UV Master listed as a subpalette within the ZPlugin palette.

Figure B2-16: Move the files to the ZPlugs directory in the ZBrush 4 R3 folder.

bbc02f016.tif

If you don’t see the ZPlugin installed, make sure that you have moved the ZScript file and the folder to the ZPlugs directory. It’s tempting to put the unzipped UVMaster folder in the ZPlugs folder, but if you do this, ZBrush will not be able to locate the necessary files and the ZPlugin will not load.

Some ZPlugins, such as ZAppLink, will not appear in the ZPlugin palette when they are installed. ZAppLink appears in the Document palette. If you can’t find the ZPlugin, download the appropriate documentation and double-check to see where it is supposed to appear in the interface. The descriptions of the ZPlugins within this chapter will let you know how to find and use them as well. For future ZPlugins released after this book is published, always check the documentation.

If a ZPlugin is not installed correctly, ZBrush could fail to launch. Try holding the Shift key while ZBrush is loading; this skips all ZPlugins, and at the very least ZBrush should open.

UV Master

UV Master is a must-have ZPlugin. Mapping UV texture coordinates is necessary when converting polypainted colors to file textures for use in other programs or when creating normal and displacement maps. Working with UV coordinates is explained in Chapter 8, “Polypainting and SpotLight,” and in Bonus Content 1, “GoZ.” Generally speaking, UV mapping is about as much fun as doing your taxes. Anything that makes it easier and faster is a welcome tool, and that’s exactly what UV Master is meant to do.

UV Master gives you a quick and easy way to generate a UV layout that still resembles the shape of the original surface. It is not meant to be quite as powerful as software such as UVLayout by headus, which is devoted to making advanced UV texturing coordinates. Rather, UV Master should be used when you want to create a UV layout as quickly as possible with a minimum amount of labor. You can use the UV coordinates generated by UV layout as a starting point for further editing in other software. That being said, the UV coordinates created by UV Master are usually very good and certainly usable for most common texturing situations.

The following exercise is a brief overview of the basic controls for using UV Master. The ZPlugin itself is fairly powerful. For more detailed information, consult the UV Master documentation, which can be downloaded from the Pixologic website at www.pixologic.com/zbrush/downloadcenter/zplugins. Follow these steps:

1. Open a new session of ZBrush. From the Tools section of LightBox, double-click the Dog.ZTL tool.
2. Draw the dog on the canvas and switch to Edit mode.
3. Place the ZPlugin palette in a tray so you can easily access the controls.
Let’s pretend for a moment that this is a tool that you have spent a fair amount of time detailing and polypainting. The UV Master plug-in creates UV coordinates by flattening the tool. To speed up the process and prevent any damage to your hard work, it is usually a good idea to perform all of the UV mapping work on a clone of your tool rather than on the original. For this reason, the UV Master ZPlugin has a Work On Clone option.
4. Expand the UV Master subpalette and click the Work On Clone button. This button makes a clone of the original object and sets the clone at the lowest subdivision level. All UV mapping has to be done at the lowest subdivision level. The clone will have the SkinShade4 material automatically applied, and polypainting will be disabled so the clone will look like a blank, white version of the original.
5. Click the Unwrap button. The Unwrap button creates UVs for the surface. You’ll see a gray progress bar appear at the top, indicating that ZBrush is calculating the UVs. When ZBrush is done, you won’t see any difference in the model.
6. Click the Check Seams button at the bottom of the UV Master interface. Orange lines appear on the surface, indicating the position of the UV seams (see Figure B2-17).

Figure B2-17: Orange lines appear on the surface of the model, indicating the position of UV seams.

bbc02f017.tif
7. Click the Flatten button above the Check Seams button. The model is flattened on the canvas. This shows you exactly how the UV texture coordinates are mapped (see Figure B2-18). Note that, unlike other 3D programs, when you’re looking at the flattened view, you’re not in a separate UV texture viewer; you’re still looking at the model on the canvas in Edit mode. If you want to, you can use the Nudge, Move, or Smooth brush to tweak the position of the UVs by sculpting on the flattened view.

Figure B2-18: The flattened view shows how the UVs are arranged for the model.

bbc02f018.tif
8. If you’re happy with the way the UVs look, click the Unflatten button. The model returns to the original dog shape.
9. In the UV Master interface, click the Copy UVs button. This copies the UV coordinates that were created when you clicked the Unwrap button.
10. In the Tool palette, select the original Dog tool from the fly-out inventory. ZBrush switches to this tool.
11. In the Geometry subpalette of the Tool palette, set the SDiv slider to 1.
12. In the UV Master interface, click the Paste UVs button. This transfers the UVs from the clone to the original.
13. Expand the Texture Map subpalette of the Tool palette. Click the New From UV Map button. ZBrush creates a new texture map based on the UV coordinates. The shape of the texture map should look just like the flattened version of the clone (see Figure B2-19).
14. If this is your own tool, save it to your local hard drive. You don’t need to save the cloned version.

Figure B2-19: The pasted UV coordinates look just like the flattened version of the cloned dog.

bbc02f019.tif

There are some other options within the UV Master ZPlugin interface:

Symmetry tries to make the UV mapping symmetrical. This is useful when working on symmetrical objects such as characters or animals.
PolyGroups uses the polygroup information of the 3D tool to create separate UV islands. You can strategically create polygroups for the cloned version of the tool in order to create an ideal UV layout. This won’t affect any polygroups created for the original 3D tool.
Use Existing Seams preserves the original UV seams when making adjustments to the UV mapping by using Control Painting (described in the next section).

Control Painting UVs

UV Master unwraps the model to create UVs as efficiently as possible while still maintaining the overall shape of the surface. However, UV Master has no way of knowing which part of your model is a head and which is a hand. Unlike other UV editing programs such as UVLayout by headus, you don’t have direct control over where UV Master places the UV seams, but you can give UV Master a clue as to which parts of the model are better suited for seams and which parts should be protected. To do this, you can use the Control Painting options:

1. Continue with the dog model used in the previous section.
2. Click the Work On Clone button to make a clone of the dog model. (Make sure the Texture On button is disabled in the Texture Map subpalette of the Tool palette.)

Figure B2-20: The orange line indicates that there is a UV seam running down the center of the dog’s head.

bbc02f020.tif
3. Click the Check Seams button in the UV Master subpalette of the ZPlugin palette so you can see how the seams are positioned on the model with the existing UV coordinates. If the button is already on, turn it off and then on again.
Currently there is a seam that runs right down the center of the head (see Figure B2-20). You can move the seam to another part of the surface by telling UV Master not to place a seam on the top of the head. To do this, you’ll activate Control Painting.
4. Turn off the Use Existing UV Seams button. This way, UV Master will generate entirely new UV coordinates.
5. Turn on the Enable Control Painting button.
Below Enable Control Painting are three buttons: Protect, Attract, and Erase. To tell UV Master which parts of the model should not have seams, you’ll paint colors on the surface of the model.

Figure B2-21: Turn on the Protect button in the UV Master interface.

bbc02f021.tif
6. Turn on the Protect button. (The orange lines disappear from the model; see Figure B2-21).
7. Press the X hotkey to activate Symmetry along the x-axis.
8. The Standard brush should be automatically chosen in the sculpting brush library. Zadd should be deactivated on the top shelf, and Rgb should be on. The current color should be set to bright red.
9. Paint the bright red color on the top of the dog’s head. You don’t need to be terribly precise. Just cover the area on the top of the head where you want UV Master to not place any seams. Cover the ears as well (see Figure B2-22).
10. Click the Unwrap button in the UV master interface. ZBrush calculates the UV coordinates again.
11. Click the Check Seams button. You should not see any orange lines on the areas that you painted red (see Figure B2-23).
12. Click the Flatten button to see how the UV layout appears now (see Figure B2-24).
13. Click the Unflatten button and then the Protect button. The red color appears on the dog model. You can continue to paint on the surface to tell UV Master which parts of the model should not have seams. Keep in mind that seams will have to appear somewhere on the model, so don’t paint the entire dog red!

Figure B2-22: Paint the top of the dog’s head red.

bbc02f022.tif

Figure B2-23: No orange lines appear on the top of the dog’s head, indicating that there are no UV seams there.

bbc02f023.tif

Figure B2-24: The flattened dog after the UV coordinates have been recalculated.

bbc02f024.tif

The other options in the Enable Control Painting section perform the following functions:

Attract can be used to tell UV Master which parts of the model should have seams. As with the Protect feature, you do this by painting a color on the surface. In this case, the color is blue.
Erase lets you erase the red or blue colors from the model to eliminate any areas you did not intend to paint.
Attract From Ambient Occlusion adds a blue color to recessed areas of the model. This tells UV Master to place the UV seams in areas that are less likely to be visible.

Figure B2-25: The Density feature lets you paint areas on the surface where you want more or less texture space.

bbc02f025.tif
Density enables you to paint areas of the model where you’d like more or less texture space. If you want more texture space devoted to an area of the model, click the x2, x3, or x4 button (see Figure B2-25). Then paint the areas where you want more texture space. The color will be light green. If you want less texture space, click the /2, /3, or /4 button and paint on the surface where you want less texture space; the color will be light blue. It’s a good idea to have the Use Existing Seams button active while painting Density so that UV Master doesn’t have to recalculate the placement of the seams.
Clear Maps removes all control painting from the model.
LoadCtrlMap and SaveCtrlMap let you save the maps you have painted on the model as texture files.

PaintStop

PaintStop emulates a digital painting program such as Adobe Photoshop or Corel Painter within ZBrush. When you launch PaintStop, the ZBrush interface is transformed into a painting environment. However, any tools that you have on the canvas are still visible. You can use the painting tools within PaintStop to trace your model. This makes digital illustration within ZBrush even easier.

When you have finished, you can export the images directly from the PaintStop interface or, as with Projection Master, project your painting onto the surface of any tools on the canvas.

This exercise demonstrates how to use PaintStop. For complete instructions on all the buttons in the PaintStop interface, download the documentation from www.pixologic.com/zbrush/downloadcenter/zplugins.

1. Download and install the PaintStop ZPlugin by using the same instructions from the “Installing a ZPlugin” section earlier in this chapter.
2. Start a new session of ZBrush.
3. Open one of your dragon models.
4. From the material fly-out library, select the FlatSketch01 material (see Figure B2-26).

Figure B2-26: A dragon model with the FlatSketch01 material applied

bbc02f026.tif
5. Turn on the Persp button on the right shelf and take a few minutes to find a good view of your model.
6. The button to start the PaintStop ZPlugin is not found in the ZPlugin palette; instead you’ll find it at the bottom of the Document palette. Open the Document palette and expand the PaintStop subpalette at the bottom. Click the PaintStop button to launch the ZPlugin (see Figure B2-27).

Figure B2-27: The PaintStop ZPlugin button is found in the Document palette.

bbc02f027.tif
7. A warning opens, asking whether you want to enable Polygon Colorize if Colorize has not already been activated for the model. Click the Enable Polygon Colorize button (top image in Figure B2-28).

Figure B2-28: Warning messages may appear when you launch PaintStop.

bbc02f028.tif
8. A second warning opens, asking whether you want to Turn Perspective Off or Leave Perspective On. Click the Leave Perspective On button (bottom image in Figure B2-28).
After PaintStop opens, the ZBrush interface changes completely. On the left side you’ll find buttons for various types of paintbrushes. On the bottom are tabs for painting layers, and along the top are a number of settings for controlling the brush size and canvas opacity and for saving files. On the right side are buttons for controlling the view of the document and the Exit button, which lets you leave PaintStop and return to ZBrush.
9. Set the Transparency slider on the top shelf to 50. The screen becomes a light gray color (see Figure B2-29).

Figure B2-29: The PaintStop plug-in replaces the ZBrush interface with a new interface designed to emulate a painting program. Use the Transparency slider to adjust the opacity of the canvas so you can trace your dragon model.

bbc02f029.tif
The canvas acts as tracing paper. The dragon model is a guide. You’ll use the paintbrushes to paint an image on the canvas on top of the model.
10. Click the Canvas button on the top shelf. A menu opens with options for choosing a paper grain. Click the Coarse Linen Canvas button (see Figure B2-30).
11. Now you are set up to start painting. Experiment with the different brushes as you paint on the canvas over the model. If you want to see the image without the background, set the Transparency slider to 0 (see Figure B2-31).

Figure B2-30: Click the Coarse Linen Canvas button to choose a grain pattern for the canvas.

bbc02f030.tif

Figure B2-31: Use the brushes to trace the image of the model. Set Transparency to 0 to see the image without the model.

bbc02f031.tif
12. Use the File menu to export the image to your local disk.
13. Click the Exit button in the upper right to leave PaintStop. A dialog box appears, asking whether you want to project the painting onto the model (see Figure B2-32). If you don’t want to project the image, click the Cancel button and PaintStop will close, returning you to ZBrush.

Figure B2-32: When you Exit PaintStop, a dialog asks whether you want to project the painting onto the model.

bbc02f032.tif

The Projection feature works just like Projection Master, described earlier in this chapter: Anything you paint on the canvas will be projected onto the model, so PaintStop acts as another way to texture your surfaces.

The tabs at the bottom of PaintStop store the images you create. Each time you launch PaintStop during a ZBrush session, these tabs will store the work you have done so you can continue to work on a number of paintings within a session.

3D Print Exporter

3D Print Exporter is a simple plug-in that exports your model in various formats that can be read by 3D printing software. You install the ZPlugin by using the same method described earlier in the “Installing a ZPlugin” section.

You have the option of exporting the selected subtool or all subtools (see Figure B2-33). You can set the size of the print and then choose the format. Some formats will also accept the color information painted on the surface.

Figure B2-33: The interface for 3D Print Exporter

bbc02f033.tif

If you plan to export your models for 3D printing, make sure you understand which options your 3D printing software requires. Figure B2-33 shows the interface for the 3D Print Exporter plug-in.

Decimation Master

Decimation Master is used to convert a highly detailed, high-resolution mesh (meaning a mesh with millions of polygons) into a lower-resolution version while maintaining as much of the original detail as possible. 3D printing software often can’t accept models above a certain polygon count or files above a certain size. Decimating a model is a way to prepare the surface so it can be exported from ZBrush (by using the 3D Print Exporter ZPlugin) and printed out as a three-dimensional surface.

Many CG artists who use 3D animation software such as Autodesk® Maya® and 3ds Max® or Luxology’s modo use Decimation Master as an alternative to displacement maps and normal maps for rendering the highly detailed surfaces produced in ZBrush. In some cases, a decimated version of the model will look better than a version that uses displacement maps in a render using other 3D software. However, the decimated version of the model will have a topology that is not suitable for animation, so many artists decimate only models that are static, such as statues or scenery.

The documentation for Decimation Master is available at www.pixologic.com/zbrush/downloadcenter/zplugins. This exercise demonstrates the basics of using the ZPlugin.

First, you’ll prepare a surface for decimation:

1. Download and install Decimation Master from www.pixologic.com/zbrush/downloadcenter/zplugins. You install the ZPlugin by using the same method described earlier in the “Installing a ZPlugin” section.
2. Open the temple_decimate.ZPR project from the B2 folder on the DVD. This is a version of the temple roof created earlier in the chapter using Projection Master. At SDiv level 4 the model is 4.273 million polygons. The goal is to reduce the number of polygons while retaining as much detail as possible.
3. Place the ZPlugin palette into a tray and expand the Decimation Master plug-in.
Before you can decimate the model, you need to preprocess it. Decimation Master creates a version of the model and stores it within a cache so that as you adjust the controls for the amount of decimation, the model is updated.
4. Click the Preprocess Current button. If the model has subtools, you can click the Preprocess All button and a cache file will be created for each subtool.
Preprocessing can take a long time. You might want to take a break while ZBrush is calculating. When the preprocessing is complete, you’re ready to determine the level of decimation for your model.
In the Decimate section of the Decimate Master ZPlugin, there are three sliders labeled % of Decimation, k Polys, and k Points. These sliders all work together. The % of Decimation slider shows how much decimation will occur to the model as a percentage. The k Polys slider lets you set the number of polygons (in thousands—so a setting of 300 will produce a model that is 300,000 polygons). The k Points slider lets you set the number of points in thousands. Moving one of these sliders causes the other sliders to update automatically, so you can decide whether to set the decimation in terms of a percentage, as total polygons, or as total points.
Create a copy of the original model on the canvas so you can compare the decimated version to the original.
5. Move the view of the model to the upper half of the canvas. Press Shift+S. This drops a snapshot of the model on the canvas.
6. Move the view of the model down toward the lower right. Notice that a copy of the model is left behind (see Figure B2-34). This will give you a visual reference while you decimate.

Figure B2-34: Drop a copy of the model to the canvas for use as a visual reference. Move the model down toward the lower half.

bbc02f034.tif
7. Set the % of Decimation slider to 0.1 and click Decimate Current. The model is decimated so that the number of polygons is at 8.546 k and the number of points is at 4.273 k. It’s pretty clear that much of the detail is lost, so this is not an acceptable level of decimation (see Figure B2-35).

Figure B2-35: When the model is decimated at 0.1% of the original 4 million polygons, the result is somewhat blocky and detail is lost.

bbc02f035.tif
8. I find it’s best to start at a low level and then experiment by raising the value a little and clicking the Decimate Current button. You want to find the lowest setting possible that still retains the detail of the original. Every model will be different. Highly detailed models will need more points to support the detail in the surface. Set the % of Decimation slider to 1 and click the Decimate Current button. Figure B2-36 shows the result with the wireframe active. At 1% the model still retains much of the original detail, but it’s now only 42,730 points, whereas the original was over 4 million polygons. If you want to see exactly how the surface has been decimated, click the PolyF button on the right shelf.
9. After you have found a setting that works, click the Export All SubTools button. This opens a file browser. You can save the file in the OBJ format, which is a generic 3D format accepted by most 3D applications.
10. Finally, click the Delete Caches button. This removes the cache from your hard drive. Cache files can be quite large, so it’s a good idea to remember to do this whenever you use Decimation Master.

For models in which the level of detail is different on various parts of the surface, you’re more likely to get smaller polygons only where needed to preserve the detail, and you’ll have a more efficient decimation allowing for lower k Polys settings. You can mask areas of the model before you decimate to more precisely control which parts of the model have more or fewer polygons and thus keep high-resolution detail exactly where you want it.

Figure B2-36: The model is decimated at 1%. The wireframe is visible, allowing you to see how the polygons have been decimated.

bbc02f036.tif

ZAppLink 3

ZAppLink combines the power of polypainting surfaces in ZBrush with the paint tools of your favorite digital painting software, such as Adobe Photoshop or Corel Painter. The ZPlugin works similar to Projection Master in that, when activated, the current 3D tool is dropped to the canvas. However, instead of opening a ZBrush plug-in such as Projection Master, ZAppLink opens your digital paint program, letting you use your favorite brushes and painting techniques to paint on a still image of the model.

When you’ve finished painting in the other application, you can go back into ZBrush and pick up the model off the canvas. All the paint strokes created in your digital paint program are projected onto the surface. You can then rotate the view of the model, use ZAppLink to go back into your paint program, and then continue painting.

This exercise demonstrates the process:

1. Download and install ZAppLink from www.pixologic.com/zbrush/downloadcenter/zplugins. You install the ZPlugin by using the same method described earlier in the “Installing a ZPlugin” section.
2. From the Tool section of LightBox, open the DemoHead.ZTL tool.
3. From the materials fly-out library, select the SkinShade4 material.
4. Make sure the Persp button is off on the right shelf.
5. Rotate the head so you can see it from the side.
6. In the Tool palette, turn on the Colorize button in the Polypaint subpalette.
7. The controls for starting the ZAppLink plug-in are found in the Document palette. Open the Document palette and click the ZAppLink button in the upper left (see Figure B2-37).

Figure B2-37: The ZAppLink button is in the Document palette.

bbc02f037.tif
The first thing you need to do is set the target application. This should be a digital paint program such as Adobe Photoshop or Corel Painter. For this example, I use Adobe Photoshop, but the same techniques can be used with Corel Painter. The most important thing is that the paint program needs to support Photoshop-style image layers.
8. In the ZAppLink Projection dialog, click Set Target App (see Figure B2-38). This opens your computer’s File dialog box. Look through your system files and find your preferred target application. In Windows, this should be in Program Files, and in Mac OS this will be in Applications.

Figure B2-38: Click the Set Target App button to set the target paint program.

bbc02f038.tif
9. After the application is chosen, click the Drop Now button in the ZAppLink Projection window.
ZBrush automatically launches your target app. In this example, it launches Adobe Photoshop. The canvas opens in the paint program, looking just like it does in ZBrush.

Figure B2-39: The layer arrangement in Adobe Photoshop. Do all of your painting on Layer 1.

bbc02f039.tif
ZAppLink uses the paint program’s layers to keep information consistent between ZBrush and the paint program. It is important that all the painting work that you do occurs on the layer labeled Layer 1 (see Figure B2-39). Don’t paint on the ZShading or the Canvas layers. You can add layers while you work, but make sure that the ZShading and Canvas layers remain unchanged, and their position in the layer stack should not change relative to the other layers. ZShading should be on top, and Canvas should be on the bottom.
10. Make sure Layer 1 is selected in the paint program’s layer editor. Choose your favorite paintbrush and a nice bright color, and paint some strokes on the head (see Figure B2-40).

Figure B2-40: Colored strokes are painted on the head in Photoshop.

bbc02f040.tif
11. After you paint a few strokes, use the File menu to save the image. You don’t need to change the location or the name of the file. By saving the image, you’re updating the temporary file that ZAppLink uses to transfer data between programs.
12. Minimize your paint program and switch back to ZBrush. You’ll see a dialog box that asks whether you want to reenter ZBrush. Click the Re-Enter ZBrush button (see Figure B2-41).
13. The ZAppLink pop-up box appears again. Click the Double Sided and Fade options and then click Pick Up Now.

Figure B2-41: Click the Re-Enter ZBrush button.

bbc02f041.tif

After a few seconds, the colors you painted in Photoshop are projected onto the surface (see Figure B2-42). Because Double Sided has been selected, the colored strokes are projected through the surface, creating a symmetrical pattern.

ZAppLink is a powerful ZPlugin that enables you to take advantage of any techniques or custom brushes you’ve created in your favorite digital paint program.

Figure B2-42: The strokes painted in Photoshop are projected onto the surface in ZBrush.

bbc02f042.tif
..................Content has been hidden....................

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