I'm trying to find the way to reference ARFaceGeometry mesh indices in order to place graphics on specific parts of a face using ARKit.
I've seen a number of examples where the feature is placed with some index number but I cannot find any reference to this list. It seems there are over 1200 locations. One tutorial used index 1064 for the left eye. What is the source of those numbers? and it seems poor practice to reference a hard number - what if Apple adds more?
Just for example purposes, let's say I made a tattoo graphic and wanted to attach it to the user forehead. How do I find a reference?
I can paste a graphic over a nose like this - but again, I cannot find a list of the numbered vertices - I am blindly using a number someone mentioned.
func updateFeatures(for node : SCNNode, using anchor : ARFaceAnchor) {
let child = node.childNode(withName: "myNose", recursively: false) as? MyGraphicNode
let vertices = [anchor.geometry.vertices[9]]
child?.updatePosition(for: vertices)
}
Any guidance would be appreciated.Xcode 10 beta 6, iPhoneX