Hero publishing UDIMs from Substance Painter

Hey all,

Hero asset publishing without UDIMs in substance works like a charm, but as soon as UDIMs are added, ayon core’s integrate_hero_version.py assumes we’re publishing multiple frames (at least that’s my guess), and errors out.

We’ve added “image” to the Integrate Hero Version families

Publish error
DEBUG: --- Integration of Hero version for product textureMain.BaseColor begins.
DEBUG: Looking for matching profile for: hosts: "substancepainter" | product_types: "image" | task_names: "Texture" | task_types: "Texture"
DEBUG: "substancepainter" not found in "hosts": ['standalonepublisher']
DEBUG: None of profiles match your setup. hosts: "substancepainter" | product_types: "image" | task_names: "Texture" | task_types: "Texture"
DEBUG: hero template check was successful. {root[work]}/{project[name]}/{hierarchy}/{folder[name]}/publish/{product[type]}/{product[name]}/hero/{project[code]}_{folder[name]}_{task[name]}_hero<_{comment}>.{ext}
DEBUG: hero publish dir: "Z:\projects\Ayon_dev\char\character\publish\image\textureMain.BaseColor\hero"
DEBUG: http://10.0.4.7:4000 "POST /graphql HTTP/1.1" 200 105
DEBUG: Response <RestApiResponse [200]>
DEBUG: Creating first hero version.
ERROR: !!! Creating of hero version failed. Previous hero version maybe lost some data!
Traceback (most recent call last):
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\pyblish\plugin.py", line 527, in __explicit_process
    runner(*args)
  File "C:\Users\username\AppData\Local\Ynput\AYON\addons\core_0.3.1\ayon_core\plugins\publish\integrate_hero_version.py", line 127, in process
    self.integrate_instance(
  File "C:\Users\username\AppData\Local\Ynput\AYON\addons\core_0.3.1\ayon_core\plugins\publish\integrate_hero_version.py", line 390, in integrate_instance
    head, tail = _template_filled.split(frame_splitter)
ValueError: not enough values to unpack (expected 2, got 1)

Has anyone come across this before, and/or know of a quick workaround? Using looks is a good alternative, but they’re very much locked to Maya

I came across it but in different DCC where integrate_hero_version.py was complaining about a missing key.

I’m not sure if this helps but let me share my 2 cents anyways.
Also, I’ve assigned this topic to @moonyuet she knows more about substance.

Anyways, I ended up doing this:

  • In project’s anatomy settings: ayon+anatomy://{my-project-name}/templates/hero:

  • In Core addon settings: ayon+settings://core/tools/publish/hero_template_name_profiles
    Notice it requires adding hero_ prefix.

Hey @mustafa_jafar , that totally worked! I’ve only tested Substance so far, but big thanks! This should let us do cool things with rsproxies, we do texturing tweaks in lighting a fair bit

1 Like

Oh man, I’m happy for you! I’m glad it worked.

Sadly Hero versions can’t be published if they’re currently open in a houdini scene. This seems to be a houdini specific issue, and only affecting geometry representations ie .abc

Hi, like mustafa said here, the solution to resolve this is to add the specific template profiles for substance painter hosts so that you can have custom filename template name with udim extension for publishing to hero version.