简体   繁体   中英

SceneKit Textures

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM