I have two OBJ images Generated by Meshlab. The summary of the differences from the sender of the images is:
I load them using:
This is the additional text in the blue image that is not in the good image:
When I bring the blue image into Xcode previewer, it renders fine. So something I am not doing correctly when loading into SceneKit is causing it to be blue and transparent.
Now when I load the good image everything looks great, however when I load the other smaller image it is blue and transparent.Even though both files are per-vertex OBJ files of the same model that were generated by Meshlab, and both files consist purely of V, VN, and F lines - the data in the files themselves is completely different because of the way they were generated differently within Meshlab – the good file started off life as a huge per-vertex OBJ file with 8 million faces, that was decimated down to 500k faces and saved as a Per-Vertex OBJ – and the blue file started off life as an OBJ file with a separate Texture as a Material that was applied in Meshlab, then the texture values were transferred to per-vertex color values and exported as a per-vertex OBJ with 280k faces.
I load them using:
Code Block let asset = MDLAsset(url: url) let object = asset.object(at: 0) let node = SCNNode(mdlObject: object) self!.sceneView.scene.rootNode.addChildNode(node)
This is the additional text in the blue image that is not in the good image:
Code Block usemtl material_0 vt 0.000000 0.000000
When I bring the blue image into Xcode previewer, it renders fine. So something I am not doing correctly when loading into SceneKit is causing it to be blue and transparent.