Author Topic: Material Layering only showing 2 materials in Unity  (Read 2745 times)

I recently tried material layering in Unity 5.4.2 and I couldn't get it to work. Only two of the materials show up. I tried setting my project to deferred (per the warning on the shader) but still no luck. My materials in the project were correct; everything was correct. I also tried creating a new project, still nothing. I then tried re-assembling the masks in the RGB channels manually and using that in Unity... still nothing.

I'm wondering if there's something I'm missing, but I combed both videos for material layering and importing into Unity, twice. :(
3D art is magic.

I recently tried material layering in Unity 5.4.2 and I couldn't get it to work. Only two of the materials show up. I tried setting my project to deferred (per the warning on the shader) but still no luck. My materials in the project were correct; everything was correct. I also tried creating a new project, still nothing. I then tried re-assembling the masks in the RGB channels manually and using that in Unity... still nothing.

I'm wondering if there's something I'm missing, but I combed both videos for material layering and importing into Unity, twice. :(

Hi,

I checked the multi-layer package and it's showing the 4 materials. I attached a screen shot of what I am getting. Can you post a screen shot of what you get?

Cheers,
Wes

Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

No matter what I did, I could only get two of the four materials to show up in the viewport. So I opened fire hydrant project and set everything up in Unity.

It seemed like the fire hydrant was working, but I couldn't tell. I noticed there were base layers in the project, so I ran another test with a default preview cube. This time with base fill layers set to black.

Now all four materials are showing up, but am getting wacky results. I thought it might have to do with the padding, but I can't get a normal result no matter what export setup I use, including the no alpha/dilation infinite from the fire hydrant project.

Is there a way to set this up so it's working?

Thank you very much for your help!
3D art is magic.

I almost forgot, here is a screenshot of the default test in Substance Painter.
3D art is magic.

Hi,

I'm taking a look at the setup. I'm having an issue with the masks exported from Painter. What version of Painter are you using?

Cheers,
wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

I'm using the latest version of Painter, 2.4.1

Ya, I even tried assembling the exported masks manually into the channels. I don't understand because the masks themselves each look correct. But not in Unity. I think it may be a problem with how the shader reads the channels? I'm just guessing.
3D art is magic.

Ok so now it looks correct. This is after Unity was finished baking the lighting, even though the object isn't static. : P

But it is inside a reflection probe.

I think I've figured this out Wes. Unity is evil when baking is set to auto. Thank you for taking the time to look into it!
3D art is magic.

Ok so now it looks correct. This is after Unity was finished baking the lighting, even though the object isn't static. : P

But it is inside a reflection probe.

I think I've figured this out Wes. Unity is evil when baking is set to auto. Thank you for taking the time to look into it!

Ah, cool. I see you have it working. I am seeing issues with the exported masks using 2.4.1. When you export are you getting solid white masks?

Cheers,
Wes

Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

It was exporting solid white until I set it to export with the document + alpha. But once I was using a base layer it didn't seem to matter. Let me check again to be sure.
3D art is magic.

I guess baking isn't the problem. I've messed the masks up again and can't get them fixed. Same issue as before. I don't know what's going on. I wish I did.
3D art is magic.

My opacity masks aren't solid white, no. They look correct.
3D art is magic.

When I import the json file back into painter's shader, one of my materials disappears.
3D art is magic.