Scenekit Flattenedclone - Incorrect Use of Objc_Storeweak() and Objc_Loadweak() Error

How to create an Isometric tile-map with 3D objects

“Each 3D block (representing a tile in the tileMap) would be treated as a node and cause huge performance issues,”

I think your question should be “how to render a 3D tile map with good performance in Scenekit” because imo Scenekit is definitely the way to go here and it is certainly doable to prevent those “huge performance issues”.

For starters, how do you create a tile? If you use the builtin primitives you can get a huge performance increase by using a tile from a dae or obj file, or even by creating it programmatically.

If the tile is the same model throughout, you should add it only once, and then clone it for all the other tiles:
https://developer.apple.com/documentation/scenekit/scnnode/1408046-clone
(Note you will have to create a copy of the material and assign it to a clone to prevent it from being shared across all tiles).

Additionally, by adding them all to a single parent node, you can create a socalled flattened clone to combine all the tiles into a single node.
https://developer.apple.com/documentation/scenekit/scnnode/1407960-flattenedclone which significantly reduces the number of draw calls.

If that isn’t fast enough, another option is to create the entire map programmatically. That is, create all the vertices and create a SCNGeometry based on those.

Yet another, probably blazing fast option, would be to use 4vertices to create a plane, and then use a shader and displacement map to create the tiled map.

The part about cloning and flattened clones also applies to the buildings that have the same geometry.

And just for completeness, in case that wasn't obvious, you should set the https://developer.apple.com/documentation/scenekit/scncamera/1436621-usesorthographicprojection property of the camera to true to get that isometric look.

How to install MSpec BDD Framework?

There is no official installer for MSpec BDD Framework.
I have released it for my own and it is available on my blog. It is able to integrate MSpec 0.3 with Resharper 4.1, 4.5, 5.0 and TestDriven.NET so it is what you need.

Link to MSpec BDD Framework installer



Related Topics



Leave a reply



Submit