It is a simple heirarchy. The nodes are added directly to the scene. Yes, I'm sure I'm accessing the correct geometry. The color changes, but goes to black rather than transparent (although alpha = 0 is transparent).
Alpha is a value in the range 0...1
I had not tried other blendModes, just using the default .alpha. I just ran through all the others a and they don't give me anything useful either. The text is either white or black.
Here is how I set up the SCNtextNode:
let label = SCNText(string: title, extrusionDepth: 0);
label.font = UIFont (name: "Arial", size: 128)
let labelNode = SCNNode(geometry: label)
let labelMaterial = SCNMaterial()
labelMaterial.blendMode = .alpha
labelMaterial.diffuse.contents = spiralArmLabelColor
label.materials = [labelMaterial]
labelNode.position = SCNVector3(x: Float(x * sceneScale),
y: Float(y * sceneScale),
z: Float(0 * sceneScale))
let scale = defaultLabelScale * 1.2
labelNode.scale = SCNVector3(scale, scale, scale)
labelNode.pivot = SCNMatrix4MakeTranslation(0, 0, -100.0) // the -100 helps the label float above the galactic plane
labelNode.constraints = [SCNBillboardConstraint()]
scene.rootNode.addChildNode(labelNode)
I ams adjusting the alpha depending on the orientation of the view. I am making a view of the Galaxy and labelling the sprial arms. I want the labels to fade out when looking at the Galaxy nearly edge on.
Here is how I currently do it, but as I said in my original post, I've tried all the ways I can see to set the rtransparency and all of them have the same effect.
for node in armLabelNodes
{
node.opacity = 1 - alpha2
}
Thanks for your help