Nov 202011
 
Soviet Saturn

Rendering a planet is a cinch – they’re essentially balls around which you wrap a texture. You have to be careful with lighting, but that’s about it. Sure, the Earth is another story but for that follow this Blender Guru Tutorial and you won’t need much else. But how about Saturn’s rings? Look simple at first sight but they’re not, especially if you have to render a scene in which they are pretty close, and since we’ve been there – you cannot do away with a bland couple of discs. Those rings are complex. For one thing, I learned that they’re much more extended than the bright disk you see from your backyard telescope – to the point that it is not clear exactly where they finish. But aside from that, they are a rainbow of rings with different densities and transparencies – and since they throw a shadow over Saturn, you need to make that appear realistic as well.

Voskhod-D beneath the Rings of Saturn

Voskhod-D beneath the Rings of Saturn (click to enlarge)

I don’t want to boast I had the best result in the world – I know there are tons of modelers who can do that much better than I have done – nonetheless, since I spent so much time figuring out just how to render those rings, I thought I might ease the pain from whomever is as bad as I am at modeling and wants to, well, render the rings of Saturn.

I’ll assume you have the GIMP, but I guess the process is pretty similar in other image manipulation packages as well. First thing, go get this picture from Wikipedia. For fear of it disappearing I thought of storing it here as well, although I guess Wikipedia will be around longer than my small blog. But you never know.

This is a map of the rings. Open it in the GIMP. Since it is curved, you have to straighten it. After various lengthy and unsuccessful attempts with the warping tools, I found that the best way to go about it is to do the following (if you’re in a hurry I’ve posted the result of this part below):

  1. Add transparency to the layer: Layer ->Transparency->Add alpha channel.
  2. Hit ‘R’ and draw a random rectangular selection across the image.
  3. Go to the toolbox. In the lower half you should get the selection editing dialogue. Make sure that the drop selections beside ‘Position’ and ‘Size’ is set to ‘pixels’ (or ‘px’). Then set ‘Position’ to ‘0’ and a value of pixels roughly half the height of the picture.
  4. Set ‘Size’ to ‘1’ and the width of the picture. The idea is to have a rectangular selection which is just one pixel high and as wide as the picture itself slicing through the rings’ map.
  5. Hit Alt+I to invert the selection, then delete it. You are left with an empty layer, save for the single-pixel line in the middle. Clear the selection via Alt+A, then go to Layer->Auto-crop Layer.
  6. To help you with what follows, go to View->Snap to Canvas Edges, then View->Snap to Grid
  7. Go to Image->configure grid. In the grid configuration dialogue, under the ‘Spacing’ section, input 1. Now you have a grid with one pixel in width. Click ‘OK’.
  8. Zoom in on the picture so that you clearly see your line of pixels. Possibly, zoom to the left or right border of the canvas, so that you see what happens when you move layers around, particularly if you misalign them.
  9. Hit Ctrl+Sift+D to duplicate the layer, and then move it above (or below) the previous layer one pixel (the grid should help you do this without much fuss).
  10. Go to the layer dialogue, right click on the topmost layer, and select ‘Merge-Down’. Now you have a layer which is two pixels high. Do you see where I’m going?
  11. Now repeat steps 7 inputing 2 instead of 1 as grid spacing, and proceed again through step 10. Since this is an exponential progression, you do this 8 times and your strip is 128 pixels high. Do it a couple of times more and you have a 512 pixel strip. From 128 up anything goes.
  12. This is the color texture. Save it then save it as another picture – which will be your transparency map instead.
  13. On this new picture, go to Colors->Desaturate and select ‘Lightness’, then click OK. The picture has gone black and white.
  14. Go to Colors->Brightness/Contrast and increase both, so that you have some pitch black areas and some near-white bands. Save this and you’re done with The GIMP.

Now that you’re done, here’s the result of all this hassle: the planet surface is towards the left, while the external border of the rings is on the right. You’re free to download and use these textures if you wish.

Saturn Rings Texture

Saturn Rings Texture (click to enlarge)

Saturn Rings Transparency Map

Saturn Rings Transparency Map (click to enlarge)

Time to fire up Blender.

    1. Add a ring mesh. It does not have to be too high in resolution – the default 32 vertices are more than enough. Go to ‘edit’ mode, select all the vertices (‘A’) and extrude them (‘E’), then hit ‘S’ and scale the extruded vertices by 50%. Nerds might want to scale to .4762.
    2. Select one of the radial edges. I may not be as clear as I think here, so here’s apicture:

      Which edge to select

      Edge to select, example (click to enlarge)

    3. Hit ‘Ctrl+E’ and select ‘Mark as Seam’. This ensures that when you unwrap it, the ring will be cut at that edge.
    4. Add a material to this mesh, call it ‘Rings’ or whatever.
    5. Under the ‘Diffuse’ tab, set the color white with intensity 1. Select ‘Oren-Nayar’ as shader and set the darkness to 0.3. This gives some brilliance to the rings. Depending on your lighting setting, you may want to test and fiddle with this.
    6. Under the ‘Specular’ tab, set the intensity to 0.
    7. Under the ‘Shading’ tab, set ‘Emit’ to 0.1. This will make the rings glow in the dark, which they do as they’re actually ice particles that glitter quite intensely. Again, depending on your lighting, you may want to tweak this a bit.
    8. Check the ‘Transparency’ tab, select Z-transparency and set alpha to 0. This makes the material perfectly transparent: the actual transparency will be controlled by your transparency map.
    9. Now go to the ‘Texture’ tab, add a texture – which will be your color texture. Set type to ‘Image or Movie’.
    10. Under the ‘Image’ tab, open the color texture.
    11. Under ‘Image Mapping’ set ‘Extension’ to ‘Extend’. This is because if you don’t map the mesh precisely at the borders, you’ll have a seamless effect nonetheless.
    12. Under the ‘Mapping’ tab, set ‘Coordinates’ to ‘UV’.
    13. Now add another texture, and follow steps 9 to 12 above, only at step 10 select the transparency image.
    14. For this transparency texture, under the ‘Influence’ tab, deselect ‘color’ and select ‘alpha’. This tells Blender that this texture is affecting the transparency. Now check the ‘RGB to intensity’ box, which means that the value of white in your picture translate into an alpha (transparency) value.
    15. We’re nearly done. Go back to the 3D view, select your rings and switch to ‘Edit’ mode (if you are not already there). Select all the mesh, then hit ‘U’ to unwrap. DON’t ‘project from view’, either simply unwrap or ‘cylinder-unwrap’.
    16. Switch to the UV-image editor, and select your ring color texture. The rings will be unwrapped as Blender saw fit, which is not what you need, likely. What you have to do now is align all the inner vertices of the mesh to the right side, and the outer to the left. How much you stretch the mesh vertically is not important. Not much help for you here without a video, but I can give you a trick: if you want to align vertices vertically, select them all, then scale to 0 along the x axis. Flipped for horizontal alignement. Don’t bother too much discriminating which vertices are the innermost, and which the outermost: if something goes wrong you can always come back here, select them all, then hit ‘Ctrl+M’ and then ‘X’ to flip them horizontally. Select ‘UV’ from the menu and check the ‘Constrain to image bounds’ box to help you aligning to the right and left borders.
    17. Once you’ve succeeded, go back to the 3D view. Click on the modifiers tab, and select ‘Subdivision Surface’ from the dropdown menu. Set the ‘Subdivisions’ value for ‘render’ to 3 or 4.
    18. Select all the mesh (it should be already) and under the ‘Shading’ section of the mesh toolbox (‘T’, left-hand column in the 3D viewport), select ‘Smooth’. Hit ‘Ctrl-N’ for good measure – this recalculate normals. There’s probably no need for this but you never know.

And we’re there! Render and enjoy! Just one more tip, before you crack your brains over this: if you want the transparency to affect also the way the rings cast their shadow (e.g.: with the Cassini Division letting through more light than the rest of the rings), in the material with which you wrap Saturn, the box ‘receive transparent’ under the ‘shadow’ tab of the material options must be checked. Otherwise Blender will use the rings as a solid plane for raytracing purposes.

Hope the above will help someone else in need ;).

  4 Responses to “The Rings of Saturn: Another Tutorial”

  1. Thank you so much, i got the same idea but i decided to take a look for a tutorial in the internet first, to save time. This is what happened :)

  2. This was awesome help man, thank you so much! I am a Blender newbie and was wondering if you know how to fbx export this properly for XNA? It does not seem to like the dual textures. I got it exported fine as a single texture, but I am going to miss out on that awesome transparency effect!

    • Glad you found this useful! I’m afraid I’m not familiar with XNA, so I don’t know how to help you. The most recent Blender build (with which I should redo the tutorial) uses a very flexible node system, so you might use a single texture to create both effects. Does XNA have anything like that? You might read color data for surface texturing and convert the same texture to B&W and use the second value as transparency. The effect should match exactly.

Leave a Reply

%d bloggers like this: