ZBrushCentral

New Script: Material Baker v1 (Lighting, Shading, Wireframe baker)

Eureka!!

Well a fresh download fixed the error message but I still had the issue at the end whereby it wasn’t baking the texture…until I hit the quit button which I hadn’t done before. This then brings up the crop and fill message.

Might have to look at the script to see if it can be shifted to happen automatically. … hopefully those years of bad coding will come in handy :wink:

Thanks again for the help.

El-d

Hi all,

I’m sorry I haven’t been able to respond, but I’m glad everyone here is so helpful around here. I’ve been pretty detached from ZBrush at work lately and haven’t had the chance to use it in a long time.

I’ve received a number of e-mails about the script not working for certain people. I’m afraid I have no idea what’s up. This was my first attempt at ZScript and I just sort of hacked together a solution that worked for me with a bare minimal interface and open source so that other people might get some use out of it as well. The only good advice I can give is to try going through the source code and changing some things to suit your needs.

I think the script is more important in showing the need for an all-in-one surface baking solution in ZBrush, as its technique of dropping the model onto the canvas and baking itself is far from ideal. Most of the materials in ZBrush are at least slightly affected by the incidence angle of the camera, and this leads to inconsistencies when you bake piece by piece like this with the pieces rotated to face the camera. The inability to control the falloff rate of auto-intensity for 3d copy (referred to as ‘fade’ by project master) also makes it much harder to smooth and blend out these inconsistencies.

I just really want to see this feature in ZBrush, and judging by all the responses I’ve received from this little hack of a script, I imagine that quite a number of other people would like to see this as well. ZBrush already has a magnificent renderer to render unoccluded polygons facing you onto the screen, so it seems like it should naturally follow that it should be able use this type of output for all polygons in the scene and simply output the transformed pixels into a texture image with the associated uv coordinates. It would be ideal for exporting realtime environments and models where sophisticated shaders and indirect lighting are just too expensive to calculate on a frame-by-frame basis.

All those in favour say aye…Aye!

Totally agree with you customJM. As usefull as your script is, it does have the problems you pointed out. Maybe in Z3?

Roll on SigGraph…surely that must be the launch… oh for some more teasers to wet our appetites before the big (hopefully soon) launch :wink:

EL-D

Definately something that’s needed natively in Zbrush. If they want to target game asset creation then baking is a must.

it’s verry hard to use but i love it

I think I’ve been saving my first post for this utility. This is seriously amazing and should be a part of the Zbrush default toolset. It’s invaluable for low-poly realtime game asset creation. I just did a quick run-through to test it out and I almost couldn’t distinguish the low-poly model from the high-poly. A godsend, and I hope you consider maintaining it.

Thank you!

You must make it a polymesh3D

you have to make that a polymesh 3d for that to work

you have to make that a polymesh 3d for that to work.

you have to make that a polymesh 3d for that to work.

I noticed that this script wasn’t doing a Best Render when I had it selected, and it also wasn’t retaining the texture size that I chose (kept doing 512 size, despite the slider value). The following change to the script fixed it for me:

Open material_baker.txt in a text editor.
Change lines 11 and 12 to the following:
[VarDef, textureSize, 512]
[VarDef, bestRender, 0]

(Remove the VarSet blocks).

Now Best Render should work, and the texture size should be correct when you change the slider.

Custom Junk Mail, I pray that you or someone else is maintaining this script, because it’s a life-saver. For low-poly real-time game modelling, nothing tops it. Thanks once again.

good job posting ur changes greeze.

Ill try those out next time I make a model…because I was getting exactly the same problems that you were

Thanks,
Adam

truely awesome script! Just what I was looking for! Thanks so much!

:+1: :+1: :smiley:

Although I haven’t got ZB3 yet it looks like this feature was unfortunately left out. At least that’s what I can tell from the ZB3 documentation. That’s a real pity, zb3 painting and materials + lighting captured to 2d texture would be extremely useful.

If someone has news to the contrary please post it here!

i agree…having this script updated would be awesome

Someone has gone to the trouble of updating the script for zb3
Excellent work!

http://www.zbrushcentral.com/zbc/showthread.php?t=49966