Search Unity

Pose 3D Scale toggle in AR Foundation with AR Kit 3

Discussion in 'AR/VR (XR) Discussion' started by WBlackX, Jan 14, 2020.

  1. WBlackX

    WBlackX

    Joined:
    Nov 11, 2014
    Posts:
    6
    Description
    We’re using the AR Foundation (the current version we’re working with is 3.1.0 preview 1, but we’ve experienced this issue in previous versions as well) and trying to recognize a human pose using AR Kit 3.
    All the examples were recorded using the screenshot recognition function. Real actors in the frame don’t make any difference as well. The result is similar.

    On the “AR Human Body Manager” class panel there’s a checkbox called “Human Body Pose 3D Scale Estimation Enabled”. When it’s checked, the robot adjusts its height to the actor’s. But if we try to look at the actor from another angle, we notice the robot gets several times bigger than its human understudy (in fact the only thing changes is robot’s position in space regarding the camera - the robot comes close to it).

    Without this checkbox being checked we can’t reproduce the bug. The downside of this method is that the robot adjusts to actor’s height a little worse.

    Video
    WithoutToggle: https://drive.google.com/open?id=1qY8K6abjZj4aAhpFzuWmunm0_9ywspNW
    WithToggle: https://drive.google.com/open?id=1lWSKhsaGVcTn_9aVM_Mclg2yJexhvon1

    Question
    Is this a bug or are we doing something wrong?

    Screenshot 2019-12-05 at 19.22.39.png
     
    Blarp likes this.
  2. Blarp

    Blarp

    Joined:
    May 13, 2014
    Posts:
    270
    I'm experiencing the same as above
     
  3. floatingfactory

    floatingfactory

    Joined:
    Aug 18, 2016
    Posts:
    18
    You may have already solved this, but I had the same issue. It appears that enabling 3D Scale Estimation does not automatically populate the estimatedHeightScaleFactor. After enabling you have to also tell the ARHumanBodyManager to request the data:

    Code (CSharp):
    1.    humanBodyManager.pose3DScaleEstimationRequested = true;
    After I did this the estimatedHeightScaleFactor was populated.

    It seems like, when scale estimation is not enabled, the skeleton rig is mapped to the person with the apparent scale adjusted by increasing or decreasing the z-depth.

    If you enable scale estimation but don't make the request for the data you get the default estimatedHeightScaleFactor of 1.0 which may be the max size though it doesn't seem like the height is automatically applied in any case.

    However, once you request the data, and apply the scale factor to the skeleton rig, you get the correct z-depth and size.