Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SceneKit Textures

Tags:

ios

3d

scenekit

I'm trying to learn SceneKit for iOS and get beyond basic shapes. I'm a little confused on how textures work. In the example project, the plane is a mesh and a flat png texture is applied to it. How do you "tell" the texture how to wrap to the object? In 3D graphics you UV unwrap, but I don't know how I would do this in SceneKit.

like image 844
A Tyshka Avatar asked May 10 '16 17:05

A Tyshka


People also ask

What is the difference between SceneKit and SpriteKit?

SceneKit and SpriteKit are very similar to each other. SceneKit is a little harder to learn but it's pretty simple. SceneKit would be the only way to have a 3D model(With the options you provided). You can have a SpriteKit scene over top of the SceneKit scene to display labels that stay put.

Does SceneKit use metal?

It's a low-level framework. Metal is implemented everywhere – in RealityKit, SceneKit, ARKit, CoreML, Vision, AVFoundation, etc.

What is SceneKit used for?

SceneKit is a high-level 3D graphics framework that helps you create 3D animated scenes and effects in your apps.

How are pictures texture mapped to objects in ARKit?

ARKit generates environment textures by collecting camera imagery during the AR session. Because ARKit cannot see the scene in all directions, it uses machine learning to extrapolate a realistic environment from available imagery.


1 Answers

SceneKit doesn't have capabilities to create a mesh (other than programatically creating vertex positions, normals, UVs etc). What you'd need to do is create your mesh and texture in another bit of software (I use Blender). Then export the mesh as a collada .dae file and export the textures your model uses too as .png files. Your exported model will have UV coordinates imported with it that will correctly wrap your imported textures on your model.

like image 82
Andy Heard Avatar answered Oct 15 '22 16:10

Andy Heard