Search code examples
xcodescenekitwavefrontsceneeditor

Cut-out effect using Image Mask not working for me


I'm not able to resolve this issue in multiple plant models I got from Turbosquid.

Specifically, the Petals of the flowers like the one pictured here. Petals appear as rectangles (as per original Geometry) even with Transparency set to a masking image (attached). I've also attached a screenshot of settings as SceneKit Editor/XCode show. Any idea what am I missing?

Rendered Object (Yellow Flowers with Rectangular Petals) with partial Material Properties Additional Material Properties Masking Image


Solution

  • You will want to set the transparency mode to "RBG Zero" in the UI (which maps to SCNTransparencyModeRGBZero).

    Note that it'll require the image to be inverted (black is opaque, white is transparent).