Search code examples
scenekitios11augmented-realityarkitface-detection

What is the best approach to render 3D model in iOS after facial landmark detection?


I would like to place a hairstyle after facial landmark detection. I'm able to render 2D images properly. I would like to render 3D model. I thought of using SceneKit to render 3D model. I would like to know how Instagram, snapchat and other face filter apps are rendering 3D models. I observe SceneKit coordinate system is different from UIKit coordinate system. I have googled but couldn't find the conversion of coordinate system. Could anyone help. Thanks.


Solution

  • Look for worldUp and simdWorldUp instance properties to understand how ARKit constructs a scene coordinate system based on real-world device motion (also, you can inspect ARConfiguration.WorldAlignment enum).

    Please, look at this SO post: Understand coordinate spaces in ARKit for complete info.

    And remember, ARAnchor is your best friend when placing 3D object. Click here for further details.