0

I initialize the SCNNode

let asset = MDLAsset(URL: url!)
let object = asset.objectAtIndex(0)
let node = SCNNode(MDLObject: object)

Properties of mtl such as "map_Kd", "map_Ka", "map_Ks" reads well, but the property "map_Bump" or "Bump" are not read automatically. Is there a way to fix this? Sorry for my English, I use translator :)

1 Answers1

0

Bump isn't automatically translated. You can work around it by inspecting the MDLMaterials in the MDLSubmeshes in the MDLMeshes in the MDLAsset, and looking for material properties of type MDLMaterialSemanticBump or MDLMaterialSemanticDisplacement. You can assign the SCN material property displacement with the bump or displacement values.

  • Thank you for your response. As part of my project, I had to make the parser mtl file, and the extension to SCNMaterial. – user2278651 Apr 14 '17 at 14:17