Search code examples
androidaugmented-realityarcoresceneform3d-model

How can I properly place 3d models on Face using Augmented Faces Sceneform API in android?


I am getting free 3d models from some sites. I have to place a Hat,Mask,and Spectacles like an object on my face. But my models are not rendering properly on face. Sometimes it renders above expected position or sometimes not in exact depth. How can I make this model set properly? I am importing models in blender for placing models with reference to canonical_face_mesh.fbx. If possible, please give some extension export specific guide from blender.Thanks.


Solution

  • To properly place 3D model (whether it's a hat, or a mask, or a glasses) on a detected face in ARCore you have to translate a pivot point of a model to the place where a facial anchor resides (keeping the correct offset from where the 3D object should be). In other words, model's pivot must meet a face's anchor.