Skip to content

Vray: Implement save file for non-exr format and non-raw exr - #139

Open
moonyuet wants to merge 38 commits into
developfrom
bugfix/138-implement-save-file-action-when-non-exr-format-and-vray-raw-filename-not-used
Open

Vray: Implement save file for non-exr format and non-raw exr #139
moonyuet wants to merge 38 commits into
developfrom
bugfix/138-implement-save-file-action-when-non-exr-format-and-vray-raw-filename-not-used

Conversation

@moonyuet

@moonyuet moonyuet commented Jun 9, 2026

Copy link
Copy Markdown
Member

Changelog Description

This PR is to implement the fix when users do not use exr as image format and raw image file option(see the screenshot) when using vray renders.
image

Additional review information

Resolves #138
Tested with different renderers(RS etc.) and see if there is some other issues hit.

Testing notes:

New Render Instance

  1. Create Render Instance with non-exr image format
  2. Publish
  3. Renders should perform successfully in both farm and local

Existing Render Instance

  1. Publish with existing render instance
  2. Validation blocked
  3. Use Repair Action
  4. Publish
  5. Renders should perform successfully in both farm and local

@moonyuet
moonyuet requested review from BigRoy and LiborBatek June 9, 2026 09:51
@moonyuet moonyuet self-assigned this Jun 9, 2026
@moonyuet moonyuet added the type: bug Something isn't working label Jun 9, 2026
Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py Outdated
Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py Outdated
Comment thread client/ayon_max/api/lib_rendersettings.py Outdated
moonyuet and others added 4 commits June 10, 2026 09:48
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
…at-and-vray-raw-filename-not-used' of https://github.com/ynput/ayon-3dsmax into bugfix/138-implement-save-file-action-when-non-exr-format-and-vray-raw-filename-not-used
@moonyuet
moonyuet requested a review from BigRoy June 10, 2026 02:54

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM - needs testing by @LiborBatek

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So here are my findings so far:

  1. When using Existing Render Instance

I can not pass the File Output path validation and the Repair action does not work/fix anything so publishing is not possible...

Image

Even manually changing the output folder/path didnt do for me...

  1. When creating fresh new Render publish instance

it produces a publish and renders on the farm but my Publish DL job been pending because of expected files which I have found differ and missing (maybe due to Vray Render Globals Settings (see the pic) but just my assumption)...

Image

And when inspecting the dependencies in DL Monitor:

Image

When manually tweaked (copy and renaming those to maxRenderMain it succesfully finnishes the publish dl job)...

@moonyuet
moonyuet requested a review from LiborBatek June 18, 2026 14:13
@moonyuet

Copy link
Copy Markdown
Member Author

@LiborBatek
I committed the change in a6115df

Please test with exr and other image formats such as png with separate render channels on/off.

@LiborBatek

Copy link
Copy Markdown
Member

Im getting errors in DL render job due to missing preload max script file (its really not there)...

Error: RenderTask: Unexpected exception (Exception caught in 3ds max: mxs::file_in() - Tried to execute a maxscript file which doesn't exist: "C:/ProgramData/Thinkbox/Deadline10/workers/Libor-Laptop/jobsData/6a39275c32545bf44f99ac3c/pre_load_max_script.ms"
)
   at Deadline.Plugins.PluginWrapper.StartJob(String& outMessage, AbortLevel& abortLevel)
image

Here is my full json publish report:

Max-Vray-publish-report-260622-14-15.json.txt

@LiborBatek

LiborBatek commented Jun 29, 2026

Copy link
Copy Markdown
Member

Im getting some error in publish step while trying to publish the render (farm render, Png)

Traceback (most recent call last):
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\dependency_packages\ayon_2606031445_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
    runner(*args)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\deadline_0.7.3\ayon_deadline\plugins\publish\global\submit_publish_job.py", line 409, in process
    deadline_publish_job_id = self._submit_deadline_post_job(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\deadline_0.7.3\ayon_deadline\plugins\publish\global\submit_publish_job.py", line 236, in _submit_deadline_post_job
    self._add_rendered_dependencies(anatomy, instances, job_info)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\deadline_0.7.3\ayon_deadline\plugins\publish\global\submit_publish_job.py", line 583, in _add_rendered_dependencies
    full_path = anatomy.fill_root(full_path)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.9.7\ayon_core\pipeline\anatomy\anatomy.py", line 274, in fill_root
    return template_path.format(**{"root": self.roots})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'work'

maybe some rendering folder interplay?? (I have tried to 2 times to be sure and also reset the render output folder to defaults but still getting this error)

Another thing while trying to use Png instead of EXR format that the validator kicks in and compare the ayon-3dsmax settings and the output format which is not best imho (as user might want to override it per max scene/context and not willing to render always to the preconfigured file format imho). One thing could be to be able to disable file format validation to allow such preference (override per publish and not need to follow the preset file format always). As now if I want to render in e.g. Png, I have to also configure it on an addon settings level going with the very same format (png)

image

and when validating:

image

Maybe allowing Skip Validation or having sort of option for file format validation as optional might be okeish. Otherwise no way to produce different file format than in the addons settings...

@moonyuet

moonyuet commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

Im getting some error in publish step while trying to publish the render (farm render, Png)

Traceback (most recent call last):
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\dependency_packages\ayon_2606031445_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
    runner(*args)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\deadline_0.7.3\ayon_deadline\plugins\publish\global\submit_publish_job.py", line 409, in process
    deadline_publish_job_id = self._submit_deadline_post_job(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\deadline_0.7.3\ayon_deadline\plugins\publish\global\submit_publish_job.py", line 236, in _submit_deadline_post_job
    self._add_rendered_dependencies(anatomy, instances, job_info)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\deadline_0.7.3\ayon_deadline\plugins\publish\global\submit_publish_job.py", line 583, in _add_rendered_dependencies
    full_path = anatomy.fill_root(full_path)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.9.7\ayon_core\pipeline\anatomy\anatomy.py", line 274, in fill_root
    return template_path.format(**{"root": self.roots})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'work'

maybe some rendering folder interplay?? (I have tried to 2 times to be sure and also reset the render output folder to defaults but still getting this error)

Is there any publish report for this?
It could be the mix of the testing of #145 affecting the result but I am pretty sure it would be affect the validator first.

Another thing while trying to use Png instead of EXR format that the validator kicks in and compare the ayon-3dsmax settings and the output format which is not best imho (as user might want to override it per max scene/context and not willing to render always to the preconfigured file format imho). One thing could be to be able to disable file format validation to allow such preference (override per publish and not need to follow the preset file format always). As now if I want to render in e.g. Png, I have to also configure it on an addon settings level going with the very same format (png)

image and when validating: image Maybe allowing `Skip Validation` or having sort of option for file format validation as optional might be okeish. Otherwise no way to produce different file format than in the addons settings...

Skipping validation is doable. But let's create separate issue for this as it could have some works to do.

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the full json report as it fails during the publishing:

max-non-raw-publish-report-260630-11-05.json.txt

moonyuet added 2 commits July 3, 2026 18:02
…n-non-exr-format-and-vray-raw-filename-not-used
…n-non-exr-format-and-vray-raw-filename-not-used
@moonyuet
moonyuet requested a review from LiborBatek July 10, 2026 09:10
@LiborBatek

Copy link
Copy Markdown
Member

Now the repair fixes the Render Global output path but in the workfile scene (but when published the workfile version actually differs then)

e.g. the workfile output path been correctly set to v024 in the working scene while the published one used for rendering been v019 so in the end the DL renders into 2 different folders v024 and v019 as seen below

image

while isnpecting pre_load_max_script:

image

So I assume the repair works but we have to repair it to the correct (published workfile version)....which is different then the working version...

I hope it does make sense...

Some JSONs and script file

3dsmax-publish-report-260710-17-47.json.txt

pre_load_max_script.ms.txt

maxrenderMain_metadata.json.txt

So the issue remains the same but with different circumstances/ reason...

@moonyuet

Copy link
Copy Markdown
Member Author

I hope it does make sense...

Some JSONs and script file

3dsmax-publish-report-260710-17-47.json.txt

pre_load_max_script.ms.txt

maxrenderMain_metadata.json.txt

So the issue remains the same but with different circumstances/ reason...

We need to introduce the validation to align the directory of AOV and render output.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets V-Ray render output handling in the 3ds Max AYON integration, specifically to ensure the beauty pass is correctly saved/expected when users render with non-EXR formats or with EXR but “save raw image file” disabled (issue #138).

Changes:

  • Adjust V-Ray render saving behavior (rt.rendSaveFile) so beauty output is saved when not using raw-EXR saving.
  • Refactor/centralize repair-action attribute gathering for render output directory + multipass setting.
  • Update expected-output selection logic for V-Ray in render product collection.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
client/ayon_max/plugins/publish/validate_rendersettings.py Refactors repair helpers; adds output-dir consistency checks; updates V-Ray repair/save behavior.
client/ayon_max/api/lib.py Extends workfile-name sync helper to also update/create-context instance keys.
client/ayon_max/api/lib_rendersettings.py Updates V-Ray output filename setup and conditions for rt.rendSaveFile.
client/ayon_max/api/lib_renderproducts.py Updates how V-Ray beauty/AOV output paths are chosen for expected-file generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py
Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py
Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py
Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py Outdated
Comment thread client/ayon_max/api/lib.py
Comment thread client/ayon_max/api/lib_renderproducts.py Outdated
Comment thread client/ayon_max/api/lib_renderproducts.py Outdated
moonyuet and others added 7 commits July 15, 2026 16:47
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py
Comment thread client/ayon_max/plugins/publish/validate_rendersettings.py
Comment thread client/ayon_max/api/lib_rendersettings.py
Comment thread client/ayon_max/api/lib.py Outdated
moonyuet and others added 7 commits July 15, 2026 17:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…n-non-exr-format-and-vray-raw-filename-not-used
…n-non-exr-format-and-vray-raw-filename-not-used
…n-non-exr-format-and-vray-raw-filename-not-used

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not able to succesfully render any frame for some reason..I have also tried to build my test scene from scratch but still failing on rendering phase when inspecting on DL monitor...

Any ideas??

Here is the render log with some errors:

DL-Job_2026-08-11_09-54-38_6a7ad53e815f410a08b0c98a.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

expectedFile save actions for non-exr format and non-raw vray filename

5 participants