david-cattermole / mayaMatchMoveSolver

A Bundle Adjustment solver for MatchMove related tasks.
https://david-cattermole.github.io/mayaMatchMoveSolver/
Other
102 stars 27 forks source link

Maya Tool - Quickly Bake Attributes Tool #184

Closed david-cattermole closed 3 years ago

david-cattermole commented 3 years ago

Feature

Users want to quickly bake the attributes of an object.

We want to automatically disable the viewport, and switch to DG Evaluation to speed up baking (using mmSolver API).

We have the choice of baking the selected attributes in the channel box, or all attributes on the selected objects.

This should also support custom frame ranges, allowing the "inner" frame range, the "outer" frame range or a custom user-entered frame range.

We also need to include a Smart Bake checkbox - to enable/disable using smart (sparse keyframes) baking.

This tool will need an Option Box window, and should have a "Reset" and "Bake" button. The Reset button will reset the attribute. The options are saved inside the Maya scene file.

Also we can display the time taken to bake at the end of the baking process:

import time
s = time.time()
time.sleep(1)
e = time.time()
LOG.warn('Time elapsed: %r secs', e - s)

Usage Steps

  1. Select object(s)
  2. Select the attribute(s) in the channel box.
  3. Run tool
    • The viewport will be disabled, and re-enabled after baking is complete.
    • The DG mode will be forced to DG Evaluation, then re-enabled after baking is complete
    • The attributes will be keyframed over time - if smart bake is enabled then the keyframes are "sparsely baked"
    • Any rotation keyframes will be "euler filtered".
    • At the end of the bake, the time is measured and displayed to the user (with LOG.warn()).

Software Versions

bpatchasaheb commented 3 years ago

I would like to develop this tool.

david-cattermole commented 3 years ago

Ok, thanks for helping out!

@ktonegawa I just wanted to make sure you're not doing anything on this - I don't think you are?

ktonegawa commented 3 years ago

Hii @david-cattermole, no I have not done anything for this. Looking forward to seeing what @bpatchasaheb comes up with.

david-cattermole commented 3 years ago

This tool has just been merged in #192.

The last steps will be to write documentation.

david-cattermole commented 3 years ago

I have added some documentation: https://github.com/david-cattermole/mayaMatchMoveSolver/blob/develop_v0.3.x/docs/source/tools_attributetools.rst#bake-attributes

This is now ready for release and will be included in v0.3.13.