Author Topic: "Multi-Material-Bake" possible?  (Read 1793 times)

Hi!

I am looking for a workflow in Designer (or Painter) that allows me to transfer maps from a high-poly mesh with two (or more) materials to a low-poly mesh.

Lets say I have a combined high-poly mesh with two material IDs which I connect to two different sets of textures or graphs. Each of those graphs consist of an albedo, a metalness and a roughness map. This is my baking source. On the other hand I have one low-poly mesh with optimized UVs as target - it covers the entirety of the two high-poly meshes. My goal is to transfer all the maps from the two source materials into one set of textures for my low-poly asset. I made a picture to visualize my approach:



Therefore I set up the bakers for the low-poly mesh through “Bake model information”. The “Normal Map from Mesh” and “AO Map from Mesh” is calculated without an issue as they take the entire source mesh into account so all the areas on the low-polys Uvs are covered nicely.

The thing I struggle with is the transfer of the texture maps I already have applied on my high-poly mesh. The thing is, the “Transfererd Texture from Mesh” baker only allows to select one single file as source. This means the baker only takes one source texture into account at a time and therefore the resulting maps for the low-poly mesh are always incomplete.

My workaround right now is to add as many “Transferred Map” bakers as I have materials applied to my high-poly mesh and change all the source textures for each baker to albedo, metalness or roughness by hand. I end up with a lot of textures that I have to manually rename and combine afterwards. Besides being a big hussle, this breaks my seamless, non-desstructive workflow I try to establish.

So my question is if there is a more convenient workflow to achive a “multi-material-bake"?

Thanks a lot!

Baking is a subject that I don't know everything about, so there may be a more direct way for you to do what you want than what I'm suggesting, but if not, I thought I'd share my own workflow for getting the same task done.

One thing I find really helpful here is Color Map From Mesh. In my 3d software, I assign plain color materials to the different parts of my High Poly mesh to symbolize the different materials it's made up of. For example, I usually use white for concrete, yellow for copper, cyan for steel, black for rubber... etc. These get exported as FBX's, so the color data is preserved. Then baking Color Map From Mesh with the color source being Material Color gives me a material map that I could, in the past, use with the Multi-Material Blend node. These days I've saved myself some time by making a custom version of MultiMaterial Blend that uses one of the eight basic colors, like white, yellow, and cyan, and blends cleanly without needing any setup. If you want to try it, it's posted to Share here: https://share.allegorithmic.com/libraries/2283

In your case, you'd recombine your separately baked texture transfer maps using Multi Material Blend and use that as your output. You'd still have to bake each texture, as far as I can tell, but at least the recombining would be much more streamlined, and still non-destructive, if I understand your workflow correctly.

Thanks Cory! With your help I was able combine my seperated output maps automatically without touching Photoshop at all. Therefore I created a second graph for each of my output materials in which I used the "Color Map from Mesh" baker you suggested to in combination with the "color to mask" operation. Here's a screenshot of how I solved it:



Of course, with 3, 4 or even more source materials this approach would get messy. Here your Colormask Blend Utility will come in handy. Thanks a lot!

Still, It would be great if it would be possible to add more than one texture file in a "Transferred Texture from Mesh" baker in the first place. A slot for each Material ID of the high definition mesh for example might be a solution dor this limitation.