Adding rings to Saturn

Saturn's rings have a diameter of about 282,000 km and are about 2.35 times the diameter of Saturn, the planet (282,000 / 120,000). We have a texture, saturn_rings.png, that we can render on a flat plane to display as rings. In Unity, a 1x-sized plane actually measures 10 units across. So, we will set the plane's Scale to 0.235.

For the rings to have transparency, we can change Rendering Mode to Cutout. This will use the alpha channel of the image as a threshold to determine whether that pixel of the texture is displayed or not. The shader lets you choose the Alpha Cutoff value as shown ahead:

  1. In Hierarchy, right-click on Saturn, then 3D Object | Plane.
  2. Choose Transform Reset, then scale to (0.235, 0.235, 0.235).

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.