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

Maya: implement matchmove publishing #5445

Merged
merged 46 commits into from
Sep 29, 2023

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Aug 11, 2023

Changelog Description

Add possibility to export multiple cameras in single matchmove family instance, both in abc and ma.

Exposed flag 'Keep image planes' to control export of image planes.

Additional info

Switch to matchmove from camera family was chosen to don't break existing workflow where only single camera is expected (Houdini, Nuke). It is important to note, that alembic and maya scenes don't support identical feature, so it is possible to have richer matchmove data in .ma, compared to .abc format. For instance Image planes will not be preserved in .abc file.

Testing notes:

1.create multiple cameras in Maya
2. select all of them and Create matchmove instance
3. publish
4. try to load both via Reference (abc) and Referenca (ma), it should load all cameras (previously it would load only first camera even if you would select multiple for Creation step).

@ynbot
Copy link
Contributor

ynbot commented Aug 11, 2023

Task linked: OP-6360 Maya: multiple cameras publish

@ynbot ynbot added type: enhancement Enhancements to existing functionality size/XS Denotes a PR changes 0-99 lines, ignoring general files labels Aug 11, 2023
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Hmm - I don't think I'll be approving this from my end. This seems to go against the whole concept of what the camera family is designed to be.

This just seems off. The whole intent for the camera family is to be a single camera - or maybe also a stereo camera (technically two lenses) but even then I'd say it's likely better to make that a stereoCamera family to be explicit about the content.

What's the reason you need multiple cameras in a single camera instance as opposed to you just publishing multiple camera instances?

Or, if you want to put any amount of cameras into an instance without rules - why not use a pointcache instance?

The Houdini (loading) logic for example is also expecting it currently to be a single camera and I anticipate other hosts to be doing the same.

Changes to Ayon settings should also bump up version of addon.
@kalisp
Copy link
Member Author

kalisp commented Aug 11, 2023

Hmm - I don't think I'll be approving this from my end. This seems to go against the whole concept of what the camera family is designed to be.

I'll let @m-u-r-p-h-y or @antirotor reply to this. But thanks for valid concerns, I was expecting them.

@tokejepsen
Copy link
Member

You could have a family called "cameras" that'll publish each camera collected as "camera" family.

@m-u-r-p-h-y
Copy link
Member

Hmm - I don't think I'll be approving this from my end. This seems to go against the whole concept of what the camera family is designed to be.

I'll let @m-u-r-p-h-y or @antirotor reply to this. But thanks for valid concerns, I was expecting them.

If this family is meant for one camera only,(we should check if we have single camera only present) and we need a multicamera family to cover the use case of publishing dozens or even hundreds of cameras used for photogrammetry model reconstruction (including corresponding image planes).

image
(I could not find a better picture quickly to demonstrate it :)

@BigRoy
Copy link
Collaborator

BigRoy commented Aug 11, 2023

Pointcache family can export any amount of cameras + include geo or locators if needed.

kalisp added 5 commits August 14, 2023 17:38
This family should be for more complex sets (eg. multiple cameras, with geometry, planes etc.
Added matchmove family to extract multiple cameras.
Single camera is protected by required validator.
Number of cameras might be quite large, set operations will be faster than loop.
Image plane must be reattached before baked camera(s) are deleted.
@kalisp
Copy link
Member Author

kalisp commented Sep 27, 2023

Reattached image planes to original cameras (must have been wrong previously when testing).

@kalisp kalisp requested a review from LiborBatek September 27, 2023 13:21
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.

Now the ImagePlanes stays untouched in the active workfile but they dont appear in the Published asset of matchmove....

image

…inal camera

Without this image planes would disappear after removal of baked cameras.
@kalisp kalisp requested a review from LiborBatek September 27, 2023 15:08
openpype/hosts/maya/api/lib.py Outdated Show resolved Hide resolved
openpype/hosts/maya/api/lib.py Outdated Show resolved Hide resolved
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.

Even tho now Publish produces correct data with all connected ImagePlanes and keyframes, there are few issues still.

  1. Matchmove Instance' s Keep input connections does not have any effect when OFF
  2. Cameras having different names when published...this could be possible issue in some use cases ...now there is suffix present _baked in the names
  3. I propose to change the terms Camera (Alembic) and Camera (Maya Scene) in the matchmove instance to

Extract Alembic and Extract Maya Scene

image

Input connections are not copied anymore as they might be dangerous. It is possible to epxlicitly attach only image planes instead.
Copying input connections might be dangerous (rig etc.), it is possible to explicitly attach only image planes.
@kalisp
Copy link
Member Author

kalisp commented Sep 29, 2023

Removed copying of input connections as BigRoy mentioned couple of times it might be dangerous. Explicitly exposed only flag for control of exporting Image planes.
AnyDeskMSI_RwzBUcBEp9

@kalisp kalisp requested a review from LiborBatek September 29, 2023 14:11
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.

Now all works as it should and matchMove asset being correctly produced with ImagePlanes just when Keep ImagePlanes being Enabled and vice versa.

There is also correctly publish Camera and its Scale if animated, so all good!

@kalisp kalisp requested review from tokejepsen and removed request for tokejepsen September 29, 2023 15:24
@jakubjezek001 jakubjezek001 dismissed tokejepsen’s stale review September 29, 2023 15:31

had been fixed and user is not acting

@kalisp kalisp merged commit a66edaf into develop Sep 29, 2023
8 checks passed
@kalisp kalisp deleted the enhancement/OP-6360_Maya-multiple-cameras-publish branch September 29, 2023 15:33
@ynbot ynbot added this to the next-patch milestone Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya size/XS Denotes a PR changes 0-99 lines, ignoring general files sponsored Client endorsed or requested type: documentation type: enhancement Enhancements to existing functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

10 participants