iosgeometryscenekitblendscnmaterial

SceneKit: Geometry not visible behind semi-transparent texture. Box inside Box


I work with SceneKit and I have a problem: When I make two cubes, one inside the other, one of which has a semi-transparent texture, the cube inside is not drawn.

How it should be(scene created in XCode)

How actually is(I made a few pixels with alpha 0 to understand what needs to be seen)

Edit: I found a problem related to the blender but which is very similar to mine Link


Solution

  • For those who will encounter the same problem as me: it has been solved but not completely.

    The solution consists in the calculation at render order depending on the size in geometry. The result is not stable, but better than nothing.

    cubeDict[@"render_order"] = @((sizeX + inflateDouble) + (sizeY + inflateDouble) + (sizeZ + inflateDouble));