Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fairmotion Character Positioning via MOTION MouseMode #1552

Merged
merged 11 commits into from
Nov 3, 2021

Conversation

JuanTheEngineer
Copy link
Contributor

@JuanTheEngineer JuanTheEngineer commented Oct 28, 2021

Motivation and Context

Goal

With this PR merged, the Fairmotion viewer will have an additional mouse interaction mode called "MOTION".

Functionality

This mode allows users to select a loaded Fairmotion character and click to a desired location for the character and its motion. It also allows users to set rotation around the floor-normal axis by scrolling the mouse wheel with fine-grain rotating using the Shift key. These are useful features for positioning the character in the scene.

It is works in parallel with the Key Frame and Trajectory Object Previews, which gives the user the ability to foresee scene collision throughout the timeline of the motion for improved character placement choice.

Currently the Fairmotion viewer supports one character at a time and this PR feature is lightly coupled to that fact. In a future PR multiple character loading will be supported and this MOTION mode with expand to the same degree.

UI Mouse Commands

Here is a snippet of the Command Help Text to describe the utilities of this PR

In MOTION mode (with 'enable-physics'):
    LEFT:
        Click a Fairmotion character to set it as selected or clcik anywhere else to deselect.
    RIGHT (With selected Fairmotion character):
        Click anywhere on the scene to translate a selected Fairmotion character to the clicked location.
    WHEEL (with selected Fairmotion character):
        Rotate the orientation of a selected Fairmotion character along an axis normal to the floor of the scene.
        (+ SHIFT): for fine-grained control

Preview

Here is a preview of the feature in action where the feature is used to place the character's dribbling motion in the tight hallway:

Demo_Motion_Mouse_Postioning.mp4

How Has This Been Tested

The majority of this feature lives in the Fairmotion viewer application and was tested by running that application.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 28, 2021
examples/fairmotion_interface.py Outdated Show resolved Hide resolved
examples/fairmotion_interface.py Outdated Show resolved Hide resolved
@Skylion007
Copy link
Contributor

Skylion007 commented Nov 1, 2021

FYI, just updated the Magnum color bindings to make things a bit easier for you: mosra/magnum-bindings@c50a2f6 . Will need to bump the submodule to see the new bindings.

@JuanTheEngineer JuanTheEngineer changed the title [WIP]Fairmotion mouse positional utilities Fairmotion Character Positioning via MOTION MouseMode Nov 1, 2021
@JuanTheEngineer JuanTheEngineer marked this pull request as ready for review November 1, 2021 22:55
@JuanTheEngineer JuanTheEngineer dismissed Skylion007’s stale review November 1, 2021 22:59

Resolved current change requests

@facebookresearch facebookresearch deleted a comment from Skylion007 Nov 2, 2021
Copy link
Contributor

@aclegg3 aclegg3 left a comment

Choose a reason for hiding this comment

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

Great video in description. Let's improve the UI description also. Be clear about which click and keys to use. Maybe use a bullet list similar to the help text.

When you re-defined the help text for this application you dropped the mouse legend. Let's add that back here and document the MOTION mode there.

examples/motion_viewer.py Show resolved Hide resolved
@JuanTheEngineer JuanTheEngineer merged commit 35fabe3 into main Nov 3, 2021
@JuanTheEngineer JuanTheEngineer deleted the fairmotion-mouse-utility branch November 3, 2021 21:27
JuanTheEngineer added a commit that referenced this pull request Nov 4, 2021
* Add MOTION mouse mode

* Create and Remove functions for selector icon

* Rotate and Translate feature in motion mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants