It's possible to open the OBJ file below and change the material colors from within the Xcode SceneKit Editor.
However, the documentation isn't clear how to access this same list of materials from within code, and change the colors programmatically. (See attachment.)
func enumerateChildObjects(of: AnyClass, root: MDLObject, using: (MDLObject, UnsafeMutablePointer<ObjCBool>) -> Void, stopPointer: UnsafeMutablePointer<ObjCBool>)
seems like it might help, but it's not returning the same list of materials.
Code to load OBJ file into SceneKit:
let modelPath = "model.obj"
let url = NSURL(string: modelPath)
let scene = SCNScene(named: modelPath)!
sceneView.autoenablesDefaultLighting = true
sceneView.allowsCameraControl = true
sceneView.scene = scene
sceneView.backgroundColor = UIColor.white
List of materials on right side (Xcode screenshot):
Download OBJ file (click Download
link): https://poly.google.com/view/cKryD9VnDEZ