Author Topic: Dynamic Material Layering in Unity Issues  (Read 752 times)

Hi there, many thanks for any help in advance.

Couple of question. Hoping for the best :)

I am a Unity user, and have installed Unity 5.6. I have exported all the maps and the json file from painter. 

1. However I cant seem to get the dynamic material layering to work in my project as in the fire hydrant demo. The Allegorithmic material doesnt seem to read the json file. I have to manually combine my mask in Photoshop via RGB channel. Though the material seems to be a tad bit shiny compared to the regular material. Also related, in Painter, there is an option for 10 layers. However the Allegorithmic material is not compatible with it and rejects the json file with an error message

2. I am wondering if this material is optimized for Unity, as having more than one material(eg : wooden frame of a chair and leather seats) would cause Unity to render the mesh more than once. Does this material count as one material or multiple material.

3. Will there be a mobile compatible version of this material? I tried rendering it for mobile, and it color changes dramatically

4. If I have used this method in Painter. How do I export just single maps rather than separate masks. I have tried to select the Unity presets to exoprt texture, but I keep getting multiple maps. As my project expects both PC and mobile versions i was hoping to use the dynamic material for PC and standard maps for Mobile

Hope to hear from you soon!!!

Last Edit: April 28, 2017, 06:03:22 pm

Materials layering is likely to be far too demanding on the GPU for practical use on mobile at this point.
Even though the layered material only produce one draw call, the math inside the material is much more complex than a simple standard material and will likely run very poorly on mobile.
At this point we don't have a way to pack the masks on output, it's something you'll have to do manually in Photoshop or through external scripting.

Thank you for the quick response Jeremie!!! I had gotten a different result when I tried it on mobile when compared to PC -  A darker  material than seen on PC

Slightly off topic, when was mentioned that "Materials layering is likely to be far too demanding on the GPU for practical use on mobile at this point."

Compared to the regular stardard material in Unity would a Allegorithmic procedural material exported from Substance Designer with paramaters be less optimized? The size of the material is much smaller, in the kbs when compared to a standard material in Unity which requires maps in the Mbs. I sort of assumed that if the size was smaller it would be a boost in optimization. However when mentioned material math, I am wondering will it be less beneficial instead

I am trying to develop Archviz for VR and mobile, and am trying to get the most out of any optimization techniques

If you are using a substance with the default Standard Unity shader, then the cost is the exact same at runtime than a regular bitmap based material once the materials is generated/loaded.

Sweet. Thanks. Same cost, but with smaller texture sizes in the overall file(using procedural)

Can see the advantage of using Substance Designer