SceneKit high memory usage

433 Views Asked by At

I'm facing a problem using SceneKit in my iOS app. I have a sceneView showing a 3D model (from a .scn file) that the user can customize changing some details like hair color, eyes color and hair style. What it's happening, is that the memory used by the app goes up to around 250 MB, and it happens exactly when the view starts showing my 3D model.

I programmatically compose the "full" 3D model by adding nodes coming from different scenes. Just to be a bit more clear, I have one .scn containing the body, another .scn containing the hair style and so on. When the view loads up, I just create a "fullModel" that is a SCNNode() running through each node of the various .scn files and adding them to my fullModel node. Then I add the fullNode to my scene.rootnode

I'm new in iOS programming and I tried so long to understand what'a going on, even using XCode Instruments "Allocations" and "Leaks" functionalities but nothing helped.

Any suggestion on what I could try to solve the high memory usage will be very appreciated! Thanks a lot!

0

There are 0 best solutions below