As a follow up to:
ios - How to apply mtl texture file to OBJ
I would like to add .MTL texture along with my .OBJ file, when importing my model to SceneKit
using code like this:
let scene = SCNScene(named: "rose.obj")
BUT the texture file I have is stored in DOCUMENTS directory (iOS).
How to call this function in Objective-C?
To work with the textured OBJ scene in Xcode you need a bundle of three files:
.obj,.mtland.jpg. To load an.objscene with its corresponding textures, all three bundle-files must be located in the same Documents directory. Here's how your code might look when using Objective-C app:As you know, a
.mtlfile is an ASCII-based definitions of materials for.objfile.Here's how it looks like: