I have an SCNNode (made up of an SCNPlane) with an image on it, and I want to put text over the image. I understand that an SCNNode can have different materials. My problem is that I can load an image on the SCNNode, but the text does not appear when I load it. My code looks something like this:
let mat = SCNMaterial()
let mat2 = SCNMaterial()
let node = SCNNode(geometry: SCNPlane(width: 6, length: 9))
mat.diffuse.contents = imgName
mat2.diffuse.contents = strName
node.geometry?.firstMaterial?.locksAmbientWithDiffuse = true
node.geometry?.materials = [mat, mat2]
(imgName is a UIImage and strName is a String)
And if I try to load the text before the image ([mat2, mat]), I'm just going to get a blank plane. Am I missing a step in preparing the SCNMaterial?