Set colorBufferWriteMask (SCNColorMask) on import to SceneKit?

Can the SCNColorMask be set from any data format that SceneKit can import?

(SCNColorMask is exposed in the Xcode SceneKit Material Inspector as

the “Write To Color” check boxes.)


Is SCNColorMask functionality available in AR Quick Look (USDZ files)?

Replies

You can set the SCNColorMask of any SCNMaterial using https://developer.apple.com/documentation/scenekit/scnmaterial/2867554-colorbufferwritemask


"Is SCNColorMask functionality available in AR Quick Look?"


Are you talking about the QLPreviewController when you say AR Quick Look? There aren't really any properties that you can set here, you give it a USDZ file and it handles the rest.

My apologies, I should be asking about colorBufferWriteMask not SCNColorMask.


Let me rephrase my questions:


On macOS, for any standard data format SceneKit(ModelIO?) imports, can the definitions of the materials (or camera or anything else) in the imported data cause colorBufferWriteMask for the imported scene to be updated? Or is it the case that colorBufferWriteMask can only be set programmatically (via ObjC or Swift) and interactively (via the XCode materials inspector, and scnView.showsStatistics = true gear button)?


For iOS I assume a USDZ file is imported into a SceneKit scene for display in ARSCNView by QLPreviewController. Can any parameters in a USDZ file be set by the creator of the USDZ file to cause colorBufferWriteMask to be set when the USDZ file is being imported/converted to a SceneKit scene?