How to load tiles onto a SCNSphere?
Asked Answered
K

0

9

I want to dynamically load tiles and display them on a SCNSphere. Of course I can assign a UIImage to the SCNMaterial:

sphere.firstMaterial!.diffuse.contents = image  

However that means that I've to merge all tiles together in a huge UIImage first. And I have to do that each time a new tile is fetched. A CATiledLayer based SCNMaterial would be another option but sadly it's not available on Apple Watch.

Is there a way to keep the tiles separate in SceneKit? I tried using multiple materials for the sphere but that didn't work.

Kiger answered 14/2, 2017 at 22:38 Comment(4)
How big are these tiles? Can you make them really small, with coarse resolution? Putting huge images onto Apple Watch seems like overkill.Blackboard
The tiles are 512x512. Of course on Apple Watch there will be much fewer (4-8) as on iOS (up to 64).Kiger
If the tiles are seamless then you can probably use SCNWrapModeRepeat...Kalpa
They are not seamless. Each tile is different.Kiger

© 2022 - 2024 — McMap. All rights reserved.