Hi all!
People frequently ask if it’s possible to export materials from ZBrush for use in other programs. Unfortunately, that’s not exactly possible. Materials basically tell the rendering engine how to handle light as it interacts with the surface of your object. As a result, each program’s material system is tied very closely together with its rendering engine. There just isn’t an easy way to make one program’s materials drectly compatible with another’s.
However, ZBrush does make it very easy to export the information that another program will need to control its materials! Here’s how:
As you probably know, TextureMaster allows you to embed materials within the texture. This is an extremely nice feature, since it allows you to avoid the step of setting up material zones for your model (a very tedious process). You simply paint the materials where you want them to be.
For this tutorial, I’m going to use the spherinder from chapter 3 of the TextureMaster tutorial (the chapter that teaches how to embed materials). Here is the finished model:
As you can see, the window is reflective. Also, a more metallic/specular material was used for the caps on the ends of the cylinder.
Once textured, you can simply export your model. ZBrush will perform any adjustments on the texture that are necessary (for example, Fix Seams and flipping the texture vertically) and save the texture as a BMP of the same name as the model. You now have your color map for use in your other program.
Next, we need to work with the texture in the Texture palette. First, perform Tool>Modifiers>Texture>Fix Seams and ApplyAdj (if you’ve textured a polymesh object). Next, press Texture>Flpv. These two steps ensure that your other maps will match the one that was exported with your OBJ.
Now we can make the color map into an alpha. This can then be exported from the Alpha palette and used as the bump map.
Next up, it’s time to export the texture itself. Choose the PSD format. Since materials are embedded within the texture, ZBrush will ask if you wish to export a separate alpha channel:
Say yes, and then open your image in Photoshop (or any other image editor that supports channels).
Here we have the texture as it appears in Photoshop. We really won’t be making much use of this color information, since it has already been exported with the model. What we need is the texture information.
Go to the Channels menu and turn on Alpha 1. Ctrl+click on its thumbnail to select all, and then Ctrl+C to copy it.
Back on the Layers menu, create a new layer and Ctrl+V to copy your alpha channel into it.
The result will look pretty grim at first – very, very dark. Auto-adjust the levels by pressing Ctrl+Shift+L. This will turn the lightest areas white and adjust the values of all the grays in between accordingly. Now you’ll be able to see where the various materials were! Each ZBrush material will have a unique grayscale value. So no matter how many materials might actually be embedded in the texture, you’ll be able to tell them apart immediately.
From here, it is quick and easy to create additional maps for use in your other programs. In this case, we have two materials with a high specularity, and one material with a high reflectivity. This means that we need specular and reflection maps. The image can be exported as it is to be your specular map. After all, reflective areas are extremely specular and so the white for that is appropriate. The metallic area is fairly specular, so its shade of gray was appropriate. If you wanted the rest of the model to be a little specular, then you could adjust the levels to lighten the black.
Only the window area is reflective, so we use the Magic Wand to select the gray areas. We can then flood fill them with black. The resulting image is exported for the reflection channel.
We’re now ready to go into our rendering package. By applying the maps from Photoshop to the proper shader channels, you are able to create the same kind of material effects that were present in ZBrush. Of course, you need to understand how your particular program’s materials work in order to be able to get the most out of this technique.
The end result is that you can use TextureMaster to not only paint your textures, but also to assign where material properties will go. This is a huge time saver over manually creating material zones, and with a robust rendering engine you can create the appearance of several materials on the same model. It’s super easy, and a great time saver!
One final note: This technique will work with any form of UV mapping. Cylindrical mapping was shown in this example, but it would work just as well with AUVTiles or with imported UV’s that were set up in another program.
Have fun!