I'm trying out Scenekit and I'm running into an issue when I'm trying to render particles behind semi transparent objects. They simply don't render while other objects in the scene do.
On this pictures all particles are in front of the semi transparent box, all particles that are behind are not displayed. You can see that the sphere is properly displayed and the colors of the covered part are attenuated. I would expect the same from the particles but maybe the rendering choices of the framework to make particle systems efficient make this kind of behaviour normal ?
I've tried to google/stackoverflow it, but it seems that scenekit is not a very well covered topic.
Translucency depends heavily on draw order. With alpha blending the renderer reads the current values in the frame buffer, and mixes in the translucent color on top of those values.
What this means is that opaque objects should be drawn first and translucent objects should be drawn from back to front. If opaque objects are drawn after translucent objects the renderer has no current colors to mix with.
With SceneKit the draw order can be controlled by the renderingOrder
property on the scene node.
The order the node’s content is drawn in relative to that of other nodes.
Apple Docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With