For my Scenekit project I found online a class called Terrain witch randomly generete some non regular terrain to be display in my game.
The code generate every time a very well done terrain SCNGeometry using some sort of noise generator.(it calculate all the vertices every time I call this class)
Due to the large size of the terrain it really take long time to calculate all the vertices in order to create the terrain.
Since my terrain no need to change every time... is it possibile in some way to save the SCNGeometry locally to be reused? Or any other possible approach I could use in order to speed up this process? can't 'find to much online.
Thanks
To save your SCNNode containing the terrain geometry, you can do something like this:
To read the saved SCNNode, do something like this:
I recommend this useful Helper-Function in addition:
Note: Child-Nodes will be saved as well.