Reputation: 13
I am trying to use the ipad AR capability to visualize some molecules from my simulations.
I created a obj file, and I converted to usdz. If I open the file in xcode everything looks fine. If I use quickview or I move it to the ipad and open it, the colors are missing. I get the same results using usdzconvert 6.1, 6.2, and the export function in xcode.
To convert using usdzconverter I use in usdzconvert 6.1
usdzconvert ./myscene.obj test8.usdz -diffuseColor 1,1,1 -iOS12 -h
or In usdzconverter 6.2
usdzconvert ./myscene.obj test5.usdz
I just open the .usdz files from the files app on the ipad or with quick view -i.e. space bar- on the mac.
I think the issue might be that in my scene colors are assigned to vertexes and not to the texture.
Does anyone have an idea on how to proceed?
E
PS: I am a total noob when it gets to 3D scenes, so probably I am not being particularly clear. I am happy to answer any question you might have.
Upvotes: 0
Views: 911
Reputation: 19698
I had a similar issue before where the rendered usdz model was completely dark when I loaded it into the scene. I fixed it by adding a light source. Try something like this:
let spotLight = SCNNode()
spotLight.light = SCNLight()
spotLight.light?.type = .directional
sceneView.scene.rootNode.addChildNode(spotLight)
Upvotes: 1