ZBrushCentral

Material Baker v2

Zscript by David Ikeda for zbrush 2.0~ I modified the script and it’s now compatible with zbrush 3.1 and some new function add and work flow changed. The script still yet to work perfectly yet~ but it’s good for creating base texture~ Do post some ur tests and feedback in here~

Material Baker v2?
It capture the polypaint and material colors into texture map.

Installation Guide:

  1. Create a new folder and name it “temp” in C:\Program Files\Pixologic\ZBrush3.

  2. launch zbrush 3.1 and load the zscript “material baker v2”

  3. load in your model. Make sure u have ur polypaint done and material setting ready~

  4. Click on start.

When it prompt
“This image contains material-index imbedded within each pixel. Would you like to save the material-index as a separate channel?”

Choose YES. It wont do any harmful to the orginal setting

  1. It’s recommended to bake the four views: Left, right, front,back. You can rotate hortizontally mannually or use the slider to controll the rotation . Once you have ur angle, press the bake button .

  2. After bake, the texture will be embeded in the model. You can press “Check” to see your texture.

  3. Top view and bottom view will be bake seperately. Becos of some light setting.

  4. After you have ur baked all surface. press on “generate”. Texture map will be generated.

If there are parts are not baked,you can rebake. u can use masking to hide areas to be baked

Difference between polypaint+material and material:
haha. I think dont have to explain this
[comparematerial2.jpg]colormap.jpg

Attachments

comparematerial.jpg

lowhigh.jpg

zscript250807.zip (11.1 KB)

Great work, thank you!
I’ll try it tomorrow.

Thanks ericyeo.
I will try it too.

Thanks ericyeo.
but,what i finish is this.what wrong had happened?

Attachments

snap.jpg

one of my favourite scripts for Z2, awesome. Its a shame i cant test it right now, but will do so as soon as i find time.:+1:

PS: where do i have to change your “program files” to my german “Programme”?

PPS: why bake polypaint? You can use the “to texture”, which is much more accurate than a bake.

rhinomax1: hum… weird… I can see how ur model texture looks like before baked?
Erklaerbar: yes. U’r right~ I was thinking to cut down some process at that time~ Oh. the file directory… it’s actually written inside the code… if the script is useful becos now still at test, then I’ll make improve on it~

First attempt bake with with organic model. Below model is in zbrush with flat shade, flat render with sub div 1. I used matcap and play with the material modifier setting. Changed color of Col and Base. I notice one thing~ Do bake ur model a few times(around 3 times or more) until it cant go any darker. It gives better color~ If u find any weird parts. u can go there and rebake that area. [![test.jpg|1050x800](upload://2T7lWv7yfKwBDcC3jkoooomDi8D.jpeg)]![color.jpg|600x600](upload://uO90rWm8tUESGgluYgK48u8c0dL.jpeg)

Attachments

test.jpg

What’s the benefit of using this over copying to a texture with GUV?

u might want to check David Ikeda’s thread~ http://www.zbrushcentral.com/zbc/showthread.php?t=21035&page=1&pp=15&highlight=material+baker

Hi ericyeo,

Thank you for sharing your modified script! It looks to be exactly
what I was hoping for (basically a way to get the matcap’s baked
into the actual texture map)…however, when using the script, for
some reason I’m unable to get it to generate the actual material to
1 single texture file after I’ve baked all 6 angles.

I’ve basically done what you’ve shown in the first post, and made
a cube with a similar ‘cubemap’ UV set. I am able to bake front, back,
left, right, top, and bottom textures, but when I generate, it only yields
a solid grey texture in the areas my UVs are. Any ideas on what
I may be messing up?

cheers. :slight_smile:

WailingMonkey

Hi All,

I seem to be having some trouble with this script. I apply the material I want to bake to the object, for instance the rs_sculpy material, then launch the script. When I hit start I get the following message:
“This image contains material-index imbedded within each pixel. Would you like to save the material-index as a separate channel?”
Not sure exactly what that means, so I will hit no. Next I toggle on Materail_ button and click bake. The material switches to the default red wax for a split second then the “done” box pops up. When I hit “ok” I am left with the red wax projected onto my model. My active material is now called “myshade”, which appears to be rs_sculpy. Even when I rotate around the model I see the sculpy material in the unbaked areas. Its just when I hit bake, it is baking the default material. Here is a screenshot, any ideas?

wa… I found the bug~ my apology to those who have downloaded… Jaidek thanks. problem solved.

And when it prompt
“This image contains material-index imbedded within each pixel. Would you like to save the material-index as a separate channel?”

Choose YES. It wont do any harmful to the orginal setting

Hi, ericyeo
Thank you.

I made the MaterialBakerv2 Submenu zsc file. :wink:

MaterialBakerv2.zsc file Install folder :
C:/Program Files/Pixologic/ZBrush3/ZStartup/ZPlugs
.
MaterialBakerv2_Submenu.jpg

Hey All,

Thanks Ericyeo for the update. However, it seems to be doing the same thing on my side. I am able to get it working (both versions) as long as I have the Material button set to “on”. If it is “off” it still defaults to the red wax shader. Should it be doing this? As far as I can tell you would want to have this on always.

Also, thanks ancomic for the Submenu file! Makes things alot easier!

ancomic: cool. Tks. That’s a help helpful script. :slight_smile:

Jaidek: Thanks. I didnt notice it, cos I tested with material “on”. Sorry. Problem fixed.

Attachments

zscript250807.zip (11.1 KB)

WailingMonkey: sry. i didnt see ur post. I have a newer version. Do u still encounter the problem?

Hi ,

When I try to run the script I get an “internal error .\AFile.cpp Line:595”
“Unable to open/Create a FileC:\Program Files\Pixologic\ZBrush3 emp\colormap.psd”

I have created the temp folder.

Not sure why this is happening.

Thanks

em

i don’t understand why zb don’t make that’s by défault !

so for me material baker is the best zscripts
but i have lot of bug :frowning:

i can capture the matérial ;(

i agree with you kiki a material baker would be incredibly helpful i was on the beta team and asked for this functionality.However it seems the pixologic team doesnt think its a priority.
So because of this i have been useing subcessiotrs’s technique of rendering displacement maps with shaders on them. however that is a pain in the butt to get the lights just right.I woudl also like to have real ambient occlusion. I tried to start a thread about it however it didnt get any attention so i assume no one cares. zbrush artists just want to make forum art evidently.

Im awaiting our work copy of ZB3. I had high hopes this functionality would be included natively. Lets hope this script works better than the zb2.0 script.

So Can a Material and Texture be baked into one or is it just Material and polypaint?