Author Topic: Creating ID Maps from Zbrush Models  (Read 11413 times)

Good morning guys...

I recently discovered the baking engine in Substance Painter (how did I miss this?) and was working to figure out how to get my ID maps working from my ZBrush meshes. In my pipeline, I use ZBrush>Modo>Substance Painter and needed to figure out a way to get the models into it with all of my polygroups intact. So I want to share with you how to do just that. I will be using modo, but I think this will work for other apps.



1. You need a subtool from ZBrush... here is a NICE looking tshirt... with three polygroups. You just need one for something like a shirt unless it has complex patterns. But for now, three will suffice. And use these options. Also, feel free to decimate your models if needed. Since we are just baking for IDs, polypainting is not needed.



And the export options... it is IMPORTANT to have Export Polygroups as Materials selected otherwise you will not be able to get all of the details.


2. When we import it into Modo, the polygroups that were made will become materials... but it will be too damn small! (I am working with real world scale, which I STRONGLY encourage, and the FBX Exporter from Zbrush seems to bypass this. Hopefully by time I get Modo 901 this won't happen again) So we will have to fix the scale. But let's make sure the model imports the way we want.

Here are the options I am using for import... I chose Load Polygon Parts because it was cleaner to use. The model will be too small so you have to scale it up to match the scene around it. Interestingly enough the colour of the materials match the polygroups... sweeet.

Import Options:


Result (too small though):


There we go... now the shirt is ready to be processed in Substance Painter (Export selected will be best. An option I use for asset creation.)


3. Open up Substance Painter and import the low res shirt (or any mesh in your scene). Pick a res. Now we need to bake the ID maps. Nice shirt, man.



Open up the bake textures options, load in your high res model and when you get to ID, select Polygroup/Submesh ID from the dropdown and choose Random for the colour generation. If you did everything correctly, you will get three colours.

ID options


TA DA!!!


A quick take away from this... if you have a subtool with multiple pieces like a boot, you will want to decimate, if needed, and merge visible so that will create one subtool to export... and then in Polygroups, click autogroups, which will detect all of the pieces NOT connected :)
And Enjoy.
Last Edit: August 26, 2015, 07:25:22 pm

The links aren't working.

Try editing your post and upload them to photobucket and embedding from there.

Also, the reason models imported from zbrush come in so small into other programs, is because zbrush does not use proper scaling, of any kind. It's one of the major issues zbrush has, since it isn't a true "3d" package like Mudbox or 3dcoat, it's 2.5D

Reload the page... the links have been corrected :)...

Hey guys... just wanted to post some extra information... in Zbrush, if you use the option visible and export your high res to FBX, when you open it in app like Modo, all of the subtools will be nested under the lead subtools... and it will have materials for each subtool, which is EXACTLY what you want when you export the high res. The low res can be one material...

Hey guys... just wanted to post some extra information... in Zbrush, if you use the option visible and export your high res to FBX, when you open it in app like Modo, all of the subtools will be nested under the lead subtools... and it will have materials for each subtool, which is EXACTLY what you want when you export the high res. The low res can be one material...

Very nice! Thanks for posting the workflow. The FBX export is awesome in 4R7. 

I'm currently working on a tutorial for Zbrush > Painter. I just hosted a webinar for education customers and wanted to re-record it to share.  I use the polygroup/mesh ID bake as well as vertex color baker. For cases when you need the IDs to be specific colors, the vertex baker is good. I also will use the polygroup to polypaint to quickly create the vertex color.

A few things that really bug me about FBX export in ZBrush is that you can't rename the materials. Also, the UVs are discontinuous at each face. I have to merge UVs as well as fix the size of the model : ) 

Its really great how you can concept in zbrush very quickly, make some default UVs and get to painting in Painter. Then go back and rework UVs - reproject the new mesh in Painter and not loose any work.

Cheers,

Wes
Last Edit: August 27, 2015, 10:44:05 pm
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Yeah its a blast to work in.... and although each mesh is a material, I don't UV map it... and the meshes are very heavy unfortunately. Renaming materials would be nice, but I dont worry about it too much.

I also wish we had some control over attenuation for AO and displacement map baking. Also the ability to hide a submesh so I can paint on it such as painting inside of mouths
Last Edit: August 28, 2015, 02:38:05 am

Here is another thing to avoid. If you import your fbx in Modo and notice the model is in subdivision mode, make sure "Load Mesh Smoothness" is DISABLED. What this does is sets the mesh in the default SubD level, slowing down the import
Last Edit: August 28, 2015, 06:30:46 pm

So apparently, when I did my bake (all 34 million polygons of the high res mesh), I noticed that my mirrored boots didn't bake correctly... so in order to get around this, I deleted half the boot and baked... it looks a little better now.

EDIT: I'm getting some nasty errors when I render the boot. Everything else draws correctly except that boot. And the low poly covers the high poly. It may have to fix the rear projection

EDIT 2: So I made a dumb mistake... make sure the mesh in the file has the suffix.
Last Edit: August 29, 2015, 11:33:39 pm

Quote
I'm currently working on a tutorial for Zbrush > Painter.

Wes, did you ever finish the tutorial? If so please link us up! :)

Thanks!
Daf

Is there some way to automate this process for all texture sets?
When I import an object with 20 or more texturesets, I would have to manually create the ID map for each textureset separately.