Sonam Gupta
Sonam Gupta

Reputation: 341

ARCore – Object does not show in correct depth in Face Augmentation

I tried to place an object on face. But does not understand how to set depth in object.

Like when I add 3d object like spects frames on face.

It does not show in correct depth.

Upvotes: 3

Views: 623

Answers (2)

Luis
Luis

Reputation: 143

Another way of doing this is getting the canonical face mesh from here

https://github.com/google-ar/arcore-android-sdk/blob/master/assets/canonical_face_mesh.fbx

And as described very nicely here on this blog post by Kristina Simakova: https://creativetech.blog/home/try-on-glasses-arcore-augmented-faces

In blender you can set whatever model you want at any place on that face mesh, while also maintaining scale, which is very important. Also very important is this part:

Following the instructions from ARCore documentation, add the glass model under “asset“ object. Check out this short tutorial to learn about parenting in Blender.

Upvotes: 0

Andy Jazz
Andy Jazz

Reputation: 58563

When you use Augmented Faces feature, it's worth to note that if any face is detected, ARCore at first puts a Face Anchor (which must be located behind a nose or, more precise to say, inside a skull), and secondly ARCore puts a canonical mask – its pivot point resides on the same place as anchor does.

Hence, if you wanna place your glasses at the appropriate depth – set a pivot point of your 3D object the same way it was set on a canonical mask. In other words – marry these pivot points.

Upvotes: 3

Related Questions