Skip to main content
KeithBeu
Participant
January 28, 2024
Answered

How to specify User channels as RGBA in Material Layering shaders?

  • January 28, 2024
  • 1 reply
  • 491 views

Hi, I'm looking for information about a feature listed in the release notes for Painter 8.2.

 

https://helpx.adobe.com/substance-3d-painter/release-notes/version-8-2.html

 

[Shader] Allow to set User channels as RGBA in Material Layering shaders
When settings the Texture Set channels configuration inside a shader for material layering, it is now possible to specify the format of the channel to deviate from the default value. This allow notably to request color user channels instead of grayscale only.

 

Is there documentation on how to specify this? I've searched around in the Shader API docs but so far haven't spotted anything related to it. Is the format specified soley in the shader code (if so, how?) or do I need to do anything else when creating my layering materials in Designer (such as specifying a Format other than Default in the Integration Attributes of the output node)?

 

Any help is greatly appreciated.

This topic has been closed for replies.
Correct answer Léna Piquet Froyok

Hi,

 

You can specify the data type of a channel by using the format keyword in the shader header when defining the stack layout. Here is an exemple:

 

//: stacks [
//: {
//:    "id": "MaskRGB",
//:        "channels":
//:         [
//:               {"id": "blendingmask", "format": "RGB8"}
//:         ]
//: }
//: ]

 

You can find this information on the syntax in the documenation as well: https://adobedocs.github.io/painter-shader-api/api/parameters/layering_declare_stacks/

1 reply

Léna Piquet Froyok
Adobe Employee
Léna Piquet FroyokCorrect answer
Adobe Employee
February 12, 2024

Hi,

 

You can specify the data type of a channel by using the format keyword in the shader header when defining the stack layout. Here is an exemple:

 

//: stacks [
//: {
//:    "id": "MaskRGB",
//:        "channels":
//:         [
//:               {"id": "blendingmask", "format": "RGB8"}
//:         ]
//: }
//: ]

 

You can find this information on the syntax in the documenation as well: https://adobedocs.github.io/painter-shader-api/api/parameters/layering_declare_stacks/

KeithBeu
KeithBeuAuthor
Participant
February 12, 2024

Thank you very much for the info! I will give this a try.