Substance Painter : Channel Mapping

Hi,

In Ayon’s Substance Painter settings, I don’t understand the Channel Mapping.
What effect does it have ?

I use a lot of channels, they all work perfectly for me.
But some of them are listed in the Channel Mapping (example : BaseColor), and others are not (example materialParams), so I’m wondering why they all work.

https://help.ayon.app/en/help/articles/6244730-substance-painter-addon-settings#1aiwtewwc11

I’ve checked the code.
Items within channel_mapping setting are used to populate the exportChannel enum.

  • filling export_channel_enum is done here.
  • using export_channel_enum in exportChannel enum is done here.

Then in Collect Texture Set, here, it should create an instance for each item.

1 Like

hi Yul,
channel mapping is designed for exporting the textures from different templates.
For example, you may have a base color which is not named default map identifierBaseColor set in certain template, (Redshift template could be the example). You need to add channel map rsColor into that if you want to export the map.

hopefully this would answer your question.

1 Like

Thanks to both of you for your answer :slightly_smiling_face:

@moonyuet , if I understand correctly, for stuff that is not named as the corresponding default map identifier, I only need to tweak its mapping if I want to manually select its channel in the Export Channel(s) field of Ayon’s Publish GUI.

I usually let the Export Channel(s) field empty (which means export all channels), so I guess it’s why all my exported channels work all right, even those that does not follow the corresponding default map identifier (example : in the Lens Studio template, base is used instead of BaseColor, but it works perfectly even without being declared in Ayon’s Channel Mapping).

Am I correct ?

Exactly! Export Channel(s) only used when users want to export only certain maps, if you want to make sure to export these maps, you need to use the settings to set the correct map identifier name( example : in the Lens Studio template, base is used instead of BaseColor like you said)

1 Like

Thanks !

For base that is used instead of BaseColor, it’s easy to declare in the Channel Mapping

But how to handle cases where a non-standard word is used for several map identifiers at once ?

For example, in the Lens Studio template, materialParams contains data from 3 sources : Metallic, Roughness and Mixed AO.
So I would need 3 separate Channel Mapping ?

yes, you just need other 3 separate channel mappings (Metallic, Roughness, Mixed AO) besides base for BaseColor.
(you can remove the rest if you want to).

1 Like