ARCore: Model Showing Above Face
Asked Answered
L

1

4

I am trying to follow the following guide as to how to create a custom 3D model for Augmented Faces but for some reason my model is going above my head, literally.

My model is on the 0 x, y, and z axis as well. For code I'm using this example project provided by from Google:

Livi answered 3/5, 2019 at 19:12 Comment(0)
G
1

Pivot point

Check where's a position of a pivot point of your model. 3D model's pivot must be near a pivot of Google's face mesh used in Augmented Faces.

There's two ways to correct it:

  • Fix pivot's position in 3D application (Maya, 3dsMax or Blender)
  • Setup a Pose for geometry you use with Augmented Faces API

enter image description here

When you say: "My model's position is x:0, y:0, z:0" – it means a pivot point of your model locates at x:0, y:0, z:0, but the whole model might be slightly offset from an expected position. If you decide to use this cube as augmented geometry in Augmented Faces, it'll be placed with an offset along +X and +Y axis.

In AR each situation is special, so set model' pivot position depending on your needs. Here is an example on how to position a table's pivot for meeting an anchor. Even though this example is about ARKit, it makes your issue clearer, doesn't it?

Gibrian answered 4/5, 2019 at 5:42 Comment(1)
I tried the same and its working fine for Android but models are not rendering in ARCore for iOSLocalism

© 2022 - 2024 — McMap. All rights reserved.