Skip to main content
New Participant
August 12, 2021
Question

Texture packing with Substance plugin in Unity HDRP 2020.3.12f1

  • August 12, 2021
  • 1 reply
  • 3190 views

I am using the Unity Plugin in Unity HDRP 2020.3.12f1 and the Substance Plugin Version 2.5.4 .

I would like to know if there is a way (within the tool or via scripting). to influence the way the plugin is packing its textures.

 

 

For example, even though I pack the height map into the B channel of the Mask. the extra output for the height map on the far right is still beeing created. It would be great to be able to influence this behaviour in some way. Another example for this would be to be able to store information in the alpha channel of the normal map. Things like this. When baking the textures to another folder I end up with extra textures I don´t need or which are not packed the way I need them to be for my project.

 

I also noted an issue regarding reimporting. Whenever I update or reimport an sbsar file using the plugin, material connections on assets get lost or are not rendered correctly (displayed pink even though material is applied). This is especially frustration when working on a big project with lots of modular elements. This happens for different sbsar files all alike.

 

Thanks in advance for your help!

 

Kind Regards,

 

Sebastian

This topic has been closed for replies.

1 reply

New Participant
August 16, 2021

Any Feedback on this?

Community Manager
September 2, 2021

Hello defaulth3swyrrc3o0o 

Here are the answers to your questions from one of our developers working on Unity plugin.

Please let us know if you have additional questions or any of the responses are not clear.

 

Question:
"For example, even though I pack the height map into the B channel of the Mask. the extra output for the height map on the far right is still beeing created."
Response:
It looks like the user thinks that the height map should not be generated if it is packed into another texture! This is NOT the behavior expected by Unity.
The shader dictates which of the Substance outputs are used to generate the textures to assign in the corresponding Unity material. These textures are then always generated by the Substance engine, and mapped to the corresponding material entry, as displayed in the "Main Maps" section of the Material Inspector page.
There is no "extra output".

 

Question:
"It would be great to be able to influence this behaviour in some way."
Response:
We're using Unity's "behavior".

 

Question:
"Another example for this would be to be able to store information in the alpha channel of the normal map"
Response:
We don't mess with the normal.
Also, if the normal gets packed, Unity may end up refusing to acknowledge that the texture is actually a normal, thus resulting in a broken normal texture. (Unity does validate the content of normal textures)

 

Question:
"Things like this. When baking the textures to another folder I end up with extra textures I don´t need or which are not packed the way I need them to be for my project"
Response:
There requires texture packing GUI to be changed/evolved.

 

Question:
"I also noted an issue regarding reimporting. Whenever I update or reimport an sbsar file using the plugin, material connections on assets get lost or are not rendered correctly (displayed pink even though material is applied)."
Response:
We need the Substance and assets and the repro steps to check that out.

Community Manager
September 16, 2021

"Another example for this would be to be able to store information in the alpha channel of the normal map"
Response:
We don't mess with the normal.
Also, if the normal gets packed, Unity may end up refusing to acknowledge that the texture is actually a normal, thus resulting in a broken normal texture. (Unity does validate the content of normal textures)

 

- we have an inhouse build shader and therefore dont use the unity standard solution. Our shader requires us to pack our textures in a specific way, which is simply not possible with the Substance Plugin, despite the standard options the Plugin provides for the Unity inhouse shader.It would be great to have a way to pack the textures created by the substance plugin in a way that allows us to map them accordingly to our shader solution. Are there any plans to improve the plugin in that regard in the future? Most of all we need a way to influence the RGBA channel packing of the normal map.

 

Thanks in advance!

 

Kind Regards,

 

Sebastian


Hello Sebastian,

Here is the answer from our developer:

Unity can mess things up if normal channels are tampered with. Suggestion would be to create the normal texture and map it accordingly in the Material Inspector page thus overriding "our" normal texture.

 

In regards to your question about RGB channal names:

The name of a texture corresponds to its graph name + " - " + corresponding output name defined in Designer.ONE EXEPTION: HDRP's "mask" texture. The above is still true, but the "mask" part is always there (because it's automatically generated by the plugin)

 

Please let us know if you have anymore questions.