Closed kourion11 closed 9 months ago
You seem to be trying to modulate the transparency of the glass surface by setting the alpha component of the intensity of the material's base color property. That won't work with SceneKit, which doesn't support vector-valued intensities.
You're likely to have a better time authoring the opacity of the glass itself (which maps to the opacity property of the node rather than a material property). If this is a one-off situation, or you can't make the change in a modeling tool, you can make the change at runtime by locating the glass node and applying the change manually (perhaps also enabling dual-layer rendering at the same time to avoid Z-buffer artifacts):
if let glassNode = scene?.rootNode.childNode(withName: "glass", recursively: true) {
glassNode.opacity = 0.468
glassNode.geometry?.firstMaterial?.transparencyMode = .dualLayer
}
Thank you! I'll try this
This issue will be automatically closed in 7 days if no further reply is received.
Closing due to inactivity.
Hi, I'm facing this problem. This is how the model should look like:
This is what it looks like:
Model - https://cdn.web-ar.studio/templates/3d_models/was/holidays/Christmas%20Ball/Christmas%20Ball.glb