Displaying textures on ARKit VirtualFaceContent

I am trying to use the ARKit/VirtualFaceContent to project high quality scn models onto a face. When I load the object in the XCode model viewer, the object displays correctly. However, when the model is then loaded onto the mobile app, all the textures (metalness, roughness, normal, and transparent) do not display, only the diffuse color does. I.e. we are able to set diffuse contents, but none of the other textures.

Overall, we are trying to create a node that is transparent in some areas and opaque in others. Setting the diffuse and transparent contents allows for this to happen (verified by looking at the node in the Xcode scn viewer) but the object looks opaque on the mobile app because only the diffuse contents get displayed.


https://stackoverflow.com/questions/59384825/displaying-textures-on-arkit-virtualfacecontent [see attached links on StackOverflow post]

Replies

In your code, you are specifying a constant lighting model, which only considers the ambient and diffuse material properties for shading (as described here: https://developer.apple.com/documentation/scenekit/scnmaterial/lightingmodel/1462538-constant).


Instead, you should specify your lighting model as physicallyBased, which will tell the renderer to use the physically based textures that you have provided.

I get the same result when I use the the physicallyBased lighting model. Thoughts?


A separate question: Setting just the diffuse contents to an image, I get the object looking as I would like it to (opaque in some areas, transparent in others) on the XCode scn viewer, but it appears as a white opaque object on my mobile device.

I recommend that you request technical support for this at https://developer.apple.com/support/technical/since this issue seems to be very specific to your model.