Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 794
Cristian Pena Avatar asked Nov 16 '25 22:11

Cristian Pena


2 Answers

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.

like image 114
Cristian Pena Avatar answered Nov 18 '25 13:11

Cristian Pena


This isn’t specifically a SceneKit or IOS issue, the same would apply in any 3D package.

You can control the way a texture projects over a geometry by using UV mapping. In practice that means you map the vertices and faces of the model on to the texture in software such a Blender. The texture you use now is meant to be tiled but because the lines on the texture are perfectly straight it will never look optimal.

To save yourself some trouble, use a texture that shows the entire ring from the top/above.

like image 21
Xartec Avatar answered Nov 18 '25 14:11

Xartec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!