Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Example data for anchorData.faceGeometry

Discussion in 'AR' started by NumesSanguis, Nov 27, 2017.

  1. NumesSanguis

    NumesSanguis

    Joined:
    Nov 9, 2017
    Posts:
    6
    I don't own a iPhone X yet, but I would like to do some initial research.

    Can anyone give me an example of the data stored in `anchorData.faceGeometry`, which is based on the `public struct UnityARFaceGeometry` in `ARFaceAnchor.cs`?

    According to the documentation this is always the same for vertexCount, textureCoordinateCount, textureCoordinates, triangleCount and triangleIndices. Only the values of `vertices` change. They however don't give an example of the data.
    https://developer.apple.com/documentation/arkit/arfacegeometry

    Inside UnityARFaceGeometry:
    What are the default values for vertexCount, triangleCount and triangleIndices, that ARKit passes on to Unity?
    And what values does `vertices` contain for a neutral face?

    p.s. related question: https://forum.unity.com/threads/ark...hape-facegeometry-to-modify-face-mesh.504789/
     
    Last edited: Nov 27, 2017
  2. NumesSanguis

    NumesSanguis

    Joined:
    Nov 9, 2017
    Posts:
    6
    Could someone do the following for me?:

    Under UnityARKitPlugin/Examples/FaceTracking/ open FaceBlendshapeScene.
    In the same folder, open UnityARFaceMeshManager.cs
    -----
    Put the following in `void FaceAdded (ARFaceAnchor anchorData)` (around line 51):
    Debug.Log(anchorData.faceGeometry);
    Debug.Log(anchorData.faceGeometry.vertices);
    Debug.Log(anchorData.faceGeometry.vertexCount);
    Debug.Log(anchorData.faceGeometry.textureCoordinates);
    Debug.Log(anchorData.faceGeometry.textureCoordinateCount);
    Debug.Log(anchorData.faceGeometry.triangleIndices);
    Debug.Log(anchorData.faceGeometry.triangleCount);
    -----
    Run the scene and detect your face with the iPhone X
    -----
    And please paste the console output here. I would be really grateful for that.


    -----
    And if you want to do the following and put the output here, I would be even more grateful:
    Open `BlendshapePrinter.cs` (same folder) and put the following code under `void FaceAdded (ARFaceAnchor anchorData)` (around line 53):
    Debug.Log(anchorData.blendShapes);
    -----
    Run the scene and detect your face with the iPhone X and paste the console output here. Thank you.