Search code examples
iosswifttexturesscenekitscnnode

Saturn-like rings node in SceneKit


I am creating a model of Saturn and I'm having problems when creating the rings. I found this asset

enter image description here

but when I try to set it as a diffuse, it projects like this

enter image description here

How can I control the way a texture projects over a geometry?


Solution

  • I found the solution. By replacing the cylinder with a torus and rotating the image 90 degrees, XCode did the mapping itself.

    enter image description here

    But there must be a better way.