1
$\begingroup$

Using an iPhone X, I can get a mesh of the face (using ARFaceGeometry), which I can output as an .obj file using Model I/O.

Not included in the output file is an image for the face, but I can get the camera image for that frame, as a jpeg.

When I look at the resulting .mtl file in a text editor, I see 5 different materials ("material_1", "material_2", etc.), When I look at the .obj file in a text editor, there are 5 "groups" of info (each with vertices, normals, texture coordinates, and face elements).

I want to know about 2 assumptions I am making:

  1. If I erase the last 4 materials in the .mtl file, along with the last 4 groups of info in the .obj file, the mesh seems to look the same. Is it okay to assume only the first set is sufficient?

  2. Can I replace the texture coordinates in this first group (of the .obj file, the set of vts), to reflect the new jpeg image? My goal is to get the image of the face to texture onto the face mesh.

I'm creating these new texture coordinates by: for each vertex in the mesh, transform to world space, then camera space, then divide by image dimensions to get a value between 0 and 1.

As you might guess, I'm getting some pretty funky textures on the mesh (though I'm pleased I'm getting some texture!). Does any part of my workflow sound incorrect?

$\endgroup$
  • $\begingroup$ I am trying to do exactly "Using an iPhone X, I can get a mesh of the face (using ARFaceGeometry), which I can output as an .obj file using Model I/O.". Can you tell me how you accomplished this? Thanks! $\endgroup$ – Stuti Rastogi Jun 11 '18 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.