david-cattermole / mayaMatchMoveSolver

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

Maya Tools - Show Gimbal Flipping Tool #234

Open david-cattermole opened 2 years ago

david-cattermole commented 2 years ago

Feature

Following on from #201, I think it would be helpful/cool to have a tool that can list the amount of gimbal flipping, the current rotation order and the recommended Rotation order for the selected transform nodes.

This tool only queries the scene it does not change nodes in any way - it's a diagnostic tool only.

Such a tool could be used to flag possible problems to users regarding gimbal flipping issues.

Usage Steps

  1. Select transform node(s)
  2. Run the tool.
  3. A Script Editor print out and dialog pop-up box displays the following information:
    • The current gimbal flipping percentage.
    • The current rotation order (eg. XYZ, ZXY, etc).
    • The best rotation order that will minimise the gimbal flipping - for all frames in the current timeline.
    • The expected maximum and average gimbal flipping percentage if the new rotation order is used.

For example a print out (to the Script Editor) or pop-up window might looks something like this:

= name | current rotation order (flipped %)  | best rotate order (flipped %)
- nodeA | XYZ (27%) | ZXY (12%)
- nodeB | ZXY (84%) | YZX (5%)

The first line is a header explaining the the output, each line then starts with "- " and contains all the details.

Something that might be tricky about this tool is that the original "ml Convert Rotation Order" tool only checks the current frame, however I think the tool would ideally check the 'gimballed' percentage for each keyframe on each object.

Software Versions