ZBrushCentral

Exporting Material Maps from ZBrush - the Easy Way

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! :slight_smile:

Very cool indeed! Now I am going to have to try this in C4D. Thanks Mr. Y :+1:

It’s great for a fix image ! :cool:
But for an animation ?
The process in psp is sufficent for the import in an animation programm ?
Just a question, I am not animator :rolleyes:
Pilou

Yes, Frenchy, that is the point. This technique will let an animator use ZBrush and TextureMaster to paint multiple texture channels all at once. Specular, luminescance, reflection, and other material channels can be given maps using this technique. Because the maps are derived from the embedded materials, it provides a very simple way to create this additional maps. Most animation packages (although not all) use them to add more realism to their renders.

about that.

we can’t really re-use it into Zbrush after modification ?
many times I tried.

photoshop> alpha chan> setup the level on the alpha layer , do some modification onto the alpha layer et try to reuse it in Zbrush but nothing. It appear Zbrush not known modifications ( in fact known nothing)

Fouad, I think that is because ZBrush only writes this data to the alpha channel at the time of export, but it stores it in some other way internally. So, ZBrush would never read the alpha channel. It only writes to it. I am guessing.

where is “Chapter 3 of the TextureMaster Tutorial”?

That tutorial no longer exists. You don’t need it, though, since this tutorial shows a step-by-step process. The only thing that’s missing from this is how to get the materials embedded into the texture.

To do that, turn on the Material setting in Projection Master. Then paint with material active (Draw>M or Draw>Mrgb). When you pick up the model, the texture will have the material embedded in it.

Thanks for the reply, but things aren’t working out for me. I pull up my painted and materialed model and turn on enable the UV. I check the UV and it is matte black. Color is enabled. I drop the object onto the canvas using projection master. I have material selected, and I start to paint the object. Nothing. Although sometimes I paint it, and it turns the color of the material in the brush, but inevitably, when I pick up the object from the projection master, the uv is as black as ever.

how come the images for this tutorial are no longer visible? :cry:

why i can’t see the image?