Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Thumbnail product filtering #6197

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

tokejepsen
Copy link
Member

Changelog Description

This PR introduces subset filtering for thumbnail extraction. This is to skip passes like zdepth which is not needed and can cause issues with extraction. Also speeds up publishing.

Testing notes:

  1. Input a subset to filter in the settings, for example renderLightingMain. http://localhost:5000/manageProjects/projectSettings?project=demo_Commercial or project_settings/global/publish/ExtractThumbnail/subsets
  2. Setup render in Maya with render passes and publish to Deadline.
  3. Inspect Deadline job logs that the thumbnail is only generated for the subset in the settings.

Example valid Deadline log:

2024-02-05 09:04:30:  0: STDOUT: DEBUG:pyblish.ExtractThumbnail:Processing instance with subset name renderLightingMain_DiffuseLighting
2024-02-05 09:04:30:  0: STDOUT: DEBUG:pyblish.ExtractThumbnail:repre {'colorspaceData': {'colorspace': 'ACEScg', 'config': {'path': 'C:/Program Files/Autodesk/Maya2022/resources/OCIO-configs/Maya2022-default/config.ocio', 'template': 'C:/Program Files/Autodesk/Maya2022/resources/OCIO-configs/Maya2022-default/config.ocio'}, 'display': 'sRGB', 'view': 'ACES 1.0 SDR-video'}, 'ext': 'exr', 'files': ['Main_DiffuseLighting.1001.exr', 'Main_DiffuseLighting.1002.exr'], 'fps': 25.0, 'frameEnd': 1002, 'frameStart': 1001, 'name': 'exr', 'stagingDir': 'P:/PROJECTS/demo_Commercial/shots/work/OP_8005_missing_rgb_channels/renders/maya/com_shots_workfileOP_8005_missing_rgb_channels_v014/Main', 'tags': ['review']}
2024-02-05 09:04:30:  0: STDOUT: DEBUG:pyblish.ExtractThumbnail:Subset "renderLightingMain_DiffuseLighting" did not match any valid subsets: ['.*[mM]ain\\b']

@ynbot ynbot added type: enhancement Enhancements to existing functionality size/XS Denotes a PR changes 0-99 lines, ignoring general files labels Feb 5, 2024
@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Feb 5, 2024

I do understand the issue, but should that be achieved by subset/product name filtering? There already is one "quick fix" https://github.com/ynput/OpenPype/pull/6197/files#diff-c35edcc2ff4be50fdb58d9e2d33055ae2531435ee340f5daa772186b98ca1cf4R106 for crypto.

Subset name filtering would skip the whole instance, even if would have other valid representation that can be used for thumbnail. Maybe rather the extractor/plugin, which created the representation, should not mark the representation to be used for reviewables. Because I think the representation must have "review" in tags to be used as thumbnail source, or reviewable from ExtractReview should be created?

@tokejepsen
Copy link
Member Author

@iLLiCiTiT I think ideally we should tackle the issue in when the representation is created in Maya from the render pass, but that would mean representing render passes in the publisher.
I would also say that the thumbnail extraction should be a profiles.

Both routes above are quite substantial and the client has been waiting on a solution for a while.

I would say lets get this enhancement so the client can get on with production and look at the better solutions later.

@iLLiCiTiT
Copy link
Member

The issue with current state of the PR is that it by default turns off thumbnail creation, and there is no sane default because of subset name profiles diversity.

@tokejepsen
Copy link
Member Author

The issue with current state of the PR is that it by default turns off thumbnail creation, and there is no sane default because of subset name profiles diversity.

It should not turn it off by default?
It'll only return early if there are product names configured (

)

@iLLiCiTiT
Copy link
Member

It'll only return early if there are product names configured (

Oh, I missed the condition.

@iLLiCiTiT iLLiCiTiT requested a review from antirotor February 5, 2024 12:24
@mkolar mkolar added the sponsored Client endorsed or requested label Feb 6, 2024
@mkolar
Copy link
Member

mkolar commented Feb 6, 2024

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

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

Did test in Ayon mode. I have set the filter according to the test steps like this:

image

but seems like its skipping the products completely:

2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Thumbnail source not filled. Skipping.
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Processing instance with subset name renderLookdevMain_Z
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Thumbnail source not filled. Skipping.
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Processing instance with subset name renderLookdevMain_N
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Thumbnail source not filled. Skipping.
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Processing instance with subset name renderLookdevMain_crypto_object
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Thumbnail source not filled. Skipping.
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Processing instance with subset name renderLookdevMain_beauty
2024-02-08 14:19:36:  0: STDOUT: DEBUG:pyblish.ExtractThumbnailFromSource:Thumbnail source not filled. Skipping.

I m also enclosing full DL Publish Job log here:

Job_2024-02-08_14-19-44_65c4d4f00764d34e72470d42.txt

@tokejepsen
Copy link
Member Author

but seems like its skipping the products completely:

Cool, that means the skipping is actually working, just a matter of adjusting the regex correctly.

@mkolar
Copy link
Member

mkolar commented Feb 9, 2024

@tokejepsen we'll need a port to ayon please

@tokejepsen
Copy link
Member Author

@tokejepsen we'll need a port to ayon please

ynput/ayon-core#16

@mkolar mkolar changed the title Thumbnail subset filtering Thumbnail product filtering Feb 12, 2024
@mkolar mkolar merged commit aecbfa7 into develop Feb 12, 2024
10 checks passed
@ynbot ynbot added this to the next-patch milestone Feb 12, 2024
@tokejepsen tokejepsen deleted the enhancement/OP-8103_thumbnail_subset_filtering branch February 20, 2024 11:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
port to AYON size/XS Denotes a PR changes 0-99 lines, ignoring general files sponsored Client endorsed or requested target: AYON target: OpenPype type: enhancement Enhancements to existing functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants