SCNBook-code
SCNBook-code copied to clipboard
Providing surface normals?
Hi David. I'm trying to write a utility to work with our generated 3D data, that comes in a proprietary format. I'm able to read it and get an array of vertices, as well as an array of vertex indices for the triangles. I can also get an array of face normals, but not an array of vertex normals. We don't actually try to soften our meshes by having vertex normals that point somewhere between adjacent face normals. We also don't have redundant vertices.
I'm okay with sharp edges between triangles, but I don't know how to set this up in SceneKit. Any advice? I bought your book hoping it would elaborate on that in Chapter 6, but it doesn't.
Thanks!