title: Swift: Setting SCNMaterial works for SCNBox but not for SCNGeometry loaded from Wings3D DAE
body: <p>This code excerpt (scene, camera, light, etc. cut out of the code) works in Swift on an iOS simulator:</p>
  
  <pre><code>    let boxNode = SCNNode()
  
      // Create a box
      boxNode.geometry = SCNBox(width: 1, height: 1, length: 1, chamferRadius: 0.1)
      let numFaces = 6
  
      scene.rootNode.addChildNode(boxNode)
  
      // create and configure a material for each face
      var materials: [SCNMaterial] = Array()
  
      for i in 1...numFaces
      {
          let material = SCNMaterial()
          material.diffuse.contents = UIImage(named: "texture")
          materials += material
      }
  
      // set the material to the 3d object geometry
      boxNode.geometry.materials = materials
  </code></pre>
  
  <p>It generates a box with each face being the checkered image.</p>
  
  <p><img src="https://i.stack.imgur.com/hhIrH.png" alt="SCNBox in App"></p>
  
  <p>Trying the same thing with a simple stock geometry created in Wings3D, saved to a DAE, and loaded in the app gives me an appropriate shape, but no shading and image on the faces:</p>
  
  <pre><code>    let boxNode = SCNNode()
  
      // Load the geometry
      let urlToColladaFile = NSBundle.mainBundle().URLForResource("Objects", withExtension:"dae")
      let sceneSource = SCNSceneSource(URL:urlToColladaFile, options:nil)
  
      boxNode.geometry = sceneSource.entryWithIdentifier("dodecahedron3-0", withClass:SCNGeometry.self) as SCNGeometry
      let numFaces = 10
  
      scene.rootNode.addChildNode(boxNode)
  
      // create and configure a material for each face
      var materials: [SCNMaterial] = Array()
  
      for i in 1...numFaces
      {
          let material = SCNMaterial()
          material.diffuse.contents = UIImage(named: "texture")
          materials += material
      }
  
      // set the material to the 3d object geometry
      boxNode.geometry.materials = materials
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/jjCd7.png" alt="Dodecahedron from Wings3D"></p>
  
  <p>What am I missing?</p>