PoseAI / PoseCameraAPI

Tools to work with the Pose Camera app
Apache License 2.0
146 stars 38 forks source link

[Unity] Issues controlling character (jittery, leaning) #10

Closed jpatt0n closed 2 years ago

jpatt0n commented 2 years ago

Setup: Unity 2021.2.15f1 iPhone 12 Pro, iOS 15.4 App version: 1.1.05 Scripts Updated IK Pass Enabled Phone mounted above monitor Desktop, Upper Body Only

Was previously working well. We had not used Pose AI in about a month, so last use was on Gen 1 AI and older iOS app version.

We recently attempted to use Pose AI with our character in Unity again after not using it for a while and found that the character's arms would roll up (and seemed 'reversed', hands facing in when facing out in real life). They would also lean to the side and generally were much more jittery with the movement than before.

Turning on "mirror" fixed the 'reversed' and strange arm movement. I guess this setting changed meaning from before (it says turn off for 3rd person follow, we had it off before with our same camera setup).

However, the character still leans to the side and jitters. In the Unity demo scene, the character does the same. I've attached a video. Part 1 shows the 'non-mirrored' character (using a blank version of the model to remove all variables). Part 2 shows the side-leaning, jittery demo character. Part 3 shows our 'mirrored' character leaning and jittering.

The phone is mounted above the monitor as before, but I've also testing at a more level location with the same results. I've also used the front and back cameras with the same results.

One more thing: I'm a bit confused what the settings mean under the animator. Joint Name Prefix and Remapping have the same tooltip, but I'm also not entirely sure how root name override is different either. Regardless, I couldn't get Pose AI to work on a character with a mixamorig: prefix.

Thanks for your time and product. When it was working it was BY FAR the best solution we've found and we really appreciate it.

Video: https://drive.google.com/file/d/1MMwCfYXiCA0BfBnxbJvMg37chiKIbo6V/view?usp=sharing

PoseAI commented 2 years ago

Thanks for bringing this to our attention. We can now replicate the issue - our recent update did break Desktop mode as your video highlights. We believe we have found the source of the issue and we will be submitting a patch to Apple later today which should resolve the issue. Hopefully we will get app store approval in the next 1-2 days. Room mode should work fine in the interim.

To answer your other questions:

On Mirroring: The intention for the mirror toggle is to recreate the way a mirror works from the perspective of the subject, while remaining independent of front/back camera choice. If enabled it (a) flip left/right joints - so if the subject waves their right arm, the character waves its left arm, (b) rotates the character 180 degrees, (c) flips x movement so if the subject shuffle to your left, the avatar shuffles to its right.

The change in our recent release was to try to make this effect consistent regardless of camera mode (back/front). Hopefully for existing scripts the most that should be required is rotating the character transform in editor (and potentially some logic in character controllers)

The other three features try to help users deal with non-standard rigs. Remapping is an additional option to allow complete custom skeleton retargetting, for instance a rig with base joint rotations on different alignments to the Unity/Mixamo/UE4 standard configuration. It applies a quaternion rotation list joint-by-joint. Most users can ignore and should leave this blank. We will correct the tooltip.

Rootname deals with some users' rigs which otherwise follow the standard but have the root name changed (from say 'Hips' to 'Pelvis'). The jointnameprefix field is similar, where instead every bone name has been changed. A particular example is mixamo, where they stick 'mixamo:' before every jointname when you download their rigs.
As we have become more adept at integrating our code into Mecanim, the need for rootname and jointnameprefix has lessoned, but for now there are still a couple things we need them for. Hopefully in a few iterations they won't be necessary at all.

PoseAI commented 2 years ago

Hi, the issue with desktop mode has been patched. Please update the app