ZBrushCentral

Baking Procedural Materials onto Textures

Hello group,

A little question on Materials. If you apply a material on an object, for example the snakeskin material, it seems like a procedural - which is great. However, how do you ‘Bake’ onto a texture so you can export that ?

I read in the docs that you can bake materials, but If I do a ‘Bake’ from Layer > Bake, It seems to take me out of the edit mode that I’m in for that particular object and doesn’t seem to transfer/bake the material onto the texture.

Hopefully this is clear and makes some sense. Thanks in advance.

-=mb.

Press Texture>Crop and Fill, do a Best Render to capture all of the details, and then press Texture>GrabDoc. This new texture can be wrapped onto the model and will be your baked material.

Thanks Aurick! That worked Great!

-=mb.

Here’s another trick for you while I’m at it.

Let’s say that you have a model with lots of high resolution details, and your material has cavity shading in it. Because cavity shading is based on depth, unwrapping your texture to the canvas won’t work for this material detail. In that case, here’s what you do:

  1. Create your displacement map.
  2. With your cavity material selected, press Alpha>CropAndFill. This works like the texture version, but actually fills the canvas with depth.
  3. Do a best render. The cavity shading will use the depth to give the same effect you’d see on your model.
  4. Press Texture>GrabDoc to capture this shading as a texture.

I have a model with a texture and a shader with cavity settings. I want to “merge” the cavity dirt into the texture.
I tried this
Press Texture>Crop and Fill, do a Best Render to capture all of the details, and then press Texture>GrabDoc. This new texture can be wrapped onto the model and will be your baked material.
but when I make the “Texture>Crop and Fill” the cavity dirt is not in the screen… maybe I’m doing something wrong?
Please, illuminate me!

PD: there are other methos now for bake shaders and textures? (I tested a bake script that is in this site, but the results are not so good!)

First, create the displacement map as per the instructions above and do Alpha>Crop And Fill with the material you want selected.

Next, select the Plane3D tool, followed by your texture. Set Draw>Rgb and turn Zadd off. Click and drag on the canvas to start drawing the plane, then activate the Gyro.

Open Transform>Info, and set the sliders as follows:

  1. With Move active, set X and Y to be half the document’s dimensions (or to put it another way, half the size of your displacement map). This will center your plane in the middle of the canvas. Set Z to a negative value that places the plane completely in front of the depth that’s on the canvas.

  2. With Rotate active, set all three sliders to 0. This squares it with the canvas.

  3. With Scale active, set X and Y to half the document/disp map’s dimensions. This will fill the canvas with the texture.

Now do your best render. The procedural details will all be there, as will the cavity shading. Press Texture>GrabDoc to capture your new texture.

Thanks!! I will try that!

I tested it and works well!! Thanks a lot aurick

Do you have to take the model out of edit mode? Or clear it from the layer? Im getting some weird results. Everything seems to work up until i re-apply the texture to the mesh, it doesn’t seem to keep the UV cords.

At which point are you referring to taking the model out of edit mode or clearing the coordinates?

Also, is it a ZSphere preview mesh, a primitive, or a polymesh? If it’s a polymesh, what UV mapping is assigned? What size is the texture that you’re creating, and what size was the texture that was applied to the model (if any) at the time that you assigned the mapping?

I should also note that this process has been outdated by the release of ZMapper, which makes it easy to create a cavity map.

Im sorry, I’ll check out Zmapper. But for the sake of archiving and anyone interested. It is a imported Polymesh object, GUV tiling and a texture map and disp. map at 4096x4096. I was taking the mesh out of edit mode right before doing the alpha >crop/ fill , then once the texture fills the screen adjusting the move,scale,rotate settings and then doing a best render and a texture > grab doc. However if Zmapper does all of these things with less effort then whats the point…Thanks man.

Hey, just wanted to know if its posible to bake two materials on the one texture, I have a texture with basic material on it, with lines of reflected material ontop of that, can I bake them all togepic.jpg ther???

Howdy All,

I’m very enthusiastic about ZBrush. However, today, I tried and tried to follow this set of instructions (as well as the earlier posts) to only give up after many poor results. Can this techique be confirmed by others? I’m a newb too, so user error could probably be the case. Seems as though exporting the cavity shading to an image file might be easier somehow. The main problems I encountered were outlines around polygons (uv borders?), and having the cavity shading combined with the grayscale from the displacement map ( a mixed texture, i.e. not just the cavity shading.)

Thanks for any response!

heath