ios - SceneKit Optimization -
i want display same scngeometry 1000 times, specific animation (eg scnactions rotation, movement,...) , different image diffuse material.
after checking documentation , nice wwdc presentations, best method found create 1 node (so called 1000 times)
//self scnnode //helper.getstar3d() scnnode template has been flattened //the geometry lite (36 triangles according scenekit statistic) //need re-create geometry , material not shared nodes self.geometry=helper.getstar3d().geometry.copy() scngeometry self.geometry.firstmaterial = helper.getstar3d().geometry.firstmaterial.copy() scnmaterial // texture has been extracted sktextureatlas self.geometry.firstmaterial.diffuse.contents=alltextures.firstobject sktexture however on ipad air i'm reaching 40fps (and 27 fps when animating texture via scnaction block update firstmaterial.diffuse.contents )
i thought using sktextureatlas (so images on same texture) , utilize same geometry (apparently when re-create geometry, info shared - cf building game scenekit), more fps because should allow opengl optimization. tried play lot of parameters of scenekit no success.
for notice: scenekit statistics tells there 1000 draw calls, , graphics stats in xcode :cpu 18ms, gpu 22ms, tiler 18%, renderer 80%, device 88% (can't wait new scenekit statistics module in xcode!)
so question : think it's normal performance or there way optimize want in scenekit? thanks!
edit: sktextureatlas not seems optimize rendering seems cut down frame rate. if utilize uiimage instead of sktexture coming sktextureatlas, i've got 25% improvement (50fps). animating texture (updating texture of each object each 0.2 seconds) killing performance (20fps) using sktextureatlas or uiimages. think i'm missing here because sktextureatlas used optimization.
ios scenekit
No comments:
Post a Comment