ZBrushCentral

Preserving Material IDs

Hi,

I am using 3dsMax for modeling, and I would like to preserve my material IDs and the respective colors within ZBrush.

The idea is to NOT randomise my Material IDs, so that I can keep them consistent trhoughout this process:

3dsMax: Proxy modelling and applying Material IDs per face > export fbx

ZBrush: import fbx with material IDs, creating polygroups from material IDs, and also keeping the colors from the material IDs for those polygroups created
> export via fbx exporter, with material IDs

Substance Painter/Designer: importing lowpoly, baking highpoly material IDs, again without randomising them

I haven’t found a reasonable way to set this up, but at the same time I am thinking, that this must be a common issue

any input appreciated!

thanks, Michael

I’ll look into the possibility of using material colors for polygroups when importing FBX into ZBrush.

But can you assign vertex colors in 3DS Max? That would be the simplest way of working as they would be preserved when importing/export FBX to and from ZBrush and Substance Painter can use them.

Thanks for your reply, Marcus

Using vertex colors could be a workaround, since I could create a script, which would take material ID colors and convert them into vertex colors.
My only concern would be, that vertices would “bleed”, while colors assigned to faces wouldn´t.

generally speaking I would find it very helpful to have a simplified way to preserve material ID colors via polygroups, since I believe this is a common workflow, and it would help a lot of zbrush users

I will try out your vertex color idea and post the results

Michael,

Can you let me have an FBX file from Max to look at? It needs to be ASCII, a simple cube or something with not too many vertices, with material colors applied as you would use.

Many thanks,

I have created a little test scene, it looks like this:

Multimat_test_setup_3dsMax_01.jpg

when I import it in ZBrush and “Import Mats as Polygroups”, this is the randomised result:

Multimat_test_setup_ZBrush_01.jpg

here is the zip file with the fbx and the 3dsMax file:

cheers, Michael :+1:

Many thanks, Michael, that’s perfect! :+1:

Michael,

I’ve looked at this more closely and (if I can implement this) it will only be an approximation. The reason is that ZBrush assigns polygroup colors based on a set of 512 colors which are all below full saturation - no RGB value is less than 128. It’s not possible to assign polygroup colors outside this range. So, for example, the color red (255,0,0) would translate to (255,128,128).

Do you think this would this be sufficient for your needs or make it unusable?

Thanks a lot for looking into this, Marcus!

Unfortunately, I have to match the exact color of my multimaterial to make this work for the workflow mentioned above.

I will run a few tests for possible workarounds, will keep you posted in this thread.

just a quick thought: would there be a way to import/preserve the multimaterial colors as polypaint? I assume we would get the issue with the vertices bleeding across faces with different material IDs (?)

It would be a little tricky but yes, it’s possible. But the result would be the same as if you applied the colors using a script in Max, and there’s no avoiding color bleed when a vertex is in two or more polygroups.

… so I started thinking about workarounds, bypassing ZBrush (which sucks) and baking the colors from the multimaterial in Painter.

Multimat_bake_Painter_01.jpg

I am wondering, how material IDs are handled in production pipelines including ZBrush and Painter (and I assume, that most of the production pipelines are using both ZBrush and Painter). My guess is, that the material ID´s are painted manually in ZBrush, maybe including a subtool to pick the ID colors from.

here´s the link to the thread @ the allegorithmic forum: https://forum.allegorithmic.com/index.php?topic=26361.msg103178#msg103178

quick update:
since this topic is getting a wider audience, I have created a uservoice request for substance painter:
https://allegorithmic.uservoice.com/forums/261284-substance-painter/suggestions/36869932-a-new-use-materials-mat-ids-to-generate-option

here is another thread about this topic:
https://forum.allegorithmic.com/index.php/topic,27782.0.html

now if they (Adobe!:confused:) implement this feature, I was wondering, if Pixologic could give this another thought?

it would be so elegant, to be able to define materials/material IDs in Max and keep them both in ZBrush and Painter.

One example, how I would use this: Define the material ID colors in 3dsMax, then import them with the model to ZBrush, keep them during remeshing or reproject them. When the model is refined in ZBrush, you can pick the material ID color from the model and paint it i.e. on bolts or other kind of detail.
Then if you import and bake the ZBrush highpoly in Painter, the material ID colors will match the detail, which you created in ZBrush.

You could even define a material library by colors, and since the material IDs wouldn´t be randomized, it would stay consistent through iterations or different models.

It´s just such an important feature, and I can´t wait until we finally get this implemented across different 3D tools.