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 ;) .

Nov 202011
 
Voskhod Thumbnail

And here it is – the Восход-Д video finally released! Crank up the volume and watch it in HD!

The soundtrack is 8 Bit No Tamashi, by LukHash (from the album Digital Memories), downloadable for free from their website or from Jamendo.

Sound effects come from the Freesound library. Союз radio communications were downloaded from here (after a lot of scrolling). For those out there who want to know it all, the voice over the intro says ‘Attention: Moscow speaks and trasnsmits in video‘.

Most textures and backgrounds are mainly designed by me in The GIMP, but I also downloaded a few of them from CGtextures. Planet textures are from NASA/JPL’s Solar System Simulator 3D resources, Earth color, heightmap, specularity and cloud textures come from NASA’s Earth Observatory and its Blue Marble – Next Generation project.

Modeling, animation and video compositing were all done in Blender – a lot of thanks go to Andrew Price, author of Blender Guru, for his amazing tutorials.

The design of the spacecraft has been helped a lot by the Atomic Rockets website, maintained by one Nyrath of whom I don’t know much more than this.

I started this project around february, this year. My estimates say it took about 900 hours to complete (37 days), at the end of which I find my computer cluttered with 7 Blender files, over 150 textures and nearly 8 thousand rendered frames.

You’ll find information on how I put this together here. The clip is also available on Vimeo.

 

Nov 192011
 
Soviet Saturn

One of the most effective parts of the scenes in the Восход-Д voyage video are, of course, the backdrops: that is, stars and planets. Real-life pictures of spacecrafts in orbit usually show no background stars, since the glare of the hulls in full sun cancel them out for the cameras (this being one of the few exceptions, thank you @Ittorc972 for the link), so I initially went after realism and some of the sequences still are loyal to that. But then, reality can be boring – therefore I opted for a more dramatic impact of the sequences and insterted some quite un-realistic backgrounds. Below is a walkthrough to how I went about this.

A starfield

A GIMP generated starfield (click to enlarge)

True, Blender does have a ‘stars’ options in the ‘world’ tab, but then the starfield it creates has a few drawbacks. For one thing, if you set it wrong it soaks up loads of memory for poor effects. Stars can be blotchy and it’s quite boring to fiddle with the controls to get a nice backdrop. The most hateful things of all is that they’re rendered in the 3D volume around your camera, and you often get the Star-Trek effect of stars shooting past the spacecraft, which is too unrealistic even for a fictitious rendering. So I preferred static planes to be thrown at the back of the scene.

On the left you see one of the square starfields I used. I initially went for this tutorial for the GIMP, which is good but somehow seemed a bit too laborious – I wanted to come up with a new starfield in a matter of two-three minutes. I’ve still snatched some tips from the aforementioned link, but here you go:

  1. Create a black square layer, call this ‘Background’. I used 2048 x 2048 size, any would do of course. Now I think of it, it hasn’t to be square, too. Needless to say, you might call it whatever you like.
  2. Create another black layer on top of this. These will be the small stars. Set the Mode of this layer to ‘Addition’. You’ll see no change because this layer now adds the color value of its pixels to the value of the pixels below, but since black is 0, for the moment you get 0+0=0.
  3. Select Filters->Noise->HSV Noise, set that to max holdness, a little Hue noise (unless you want multicolored stars), and crank Saturation & Value all the way up. Click ‘OK’: you’ll get the noise this filter is about.
  4. Select Colors->Levels. Grab the leftmost triangle and drag it to midway of the horizontal bands. Then grab the middle triangle and move it back towards the black one. In the preview, you’ll see some of the dots become more brilliant (whiter) and others disappear. Click ‘OK’ when you’re satisfied with the density.
  5. Now add a layer mask to the last layer you created (right-click on the layer in the layer dialogue, then click ‘add layer mask’).
  6. Go to Filters->Render->Clouds->Plasma. This filter creates some crisp and fuzzy patches of color. Crank up the turbulence (say, 3), click OK. You don’t see the plasma clouds, because (if you haven’t touched anything) you’re working on the layer mask, which only affects the transparency (or alpha, as nerds call it) channel: white is opaque and black is transparent. This adds a bit of randomness and irregularity to your starfield.
  7. Now go to Colors->Brightness-Contrast and fiddle a bit with both to tune the field to the density you like.
  8. When you’re finished, apply the layer mask (layer dialog -> right click on the layer -> apply the layer mask). This fuses the mask with the layer proper and bakes the transparency into it.
  9. Duplicate the layer, scale it up 200%, then crop it to image size and rotate it 90°. Voilà, the large stars.
  10. Now the galaxy background. Throw in another layer, set its mode to ‘grain merge’ and render another plasma cloud into this
  11. Desaturate the colors and go to Colors->Hue-Saturation-Lightness. Adjust the three until you get the color you like.
  12. Add a layer mask to this layer, render another plasma cloud into this mask.
  13. Right click on the layer in the layer dialog, and click ‘show layer mask’ – here you can tweak the shape of your galaxy cloud. One way to do that (but you can find the most suitable for you) is to use black-to-transparency gradients to fill in the angles of the canvas and get a slanted but frayed galaxy that crosses the starfield. Or you can do that manually using a brush, or whatever you like.

…and the starfield is done. Once you get used to this, the 13 steps require no longer than two minutes, and there you go with a starfield such as the above. May not be a masterpiece but it suits its purpose.

To use it in Blender:

  1. Add a plane, go to ‘top view’ (or whatever view shows the plane not slanted in any direction), go to Edit mode and UV unwrap it (project from view – bounds).
  2. Add a material, set the Emit value to 1, specularity intensity to 0, unselect ‘traceable’ under the ‘options’ and ‘receive’ from the ‘shadow’ tab. This ensures that lighting won’t affect it, it won’t cast shadows and your spacecraft won’t cast shadows on the stars.
  3. Add a texture, set it to ‘image’, in the ‘image’ tab select the starfield you’ve created.
  4. In the ‘image mapping’ tab set ‘extension’ to ‘clip’.
  5. In the ‘mapping’ tab set ‘coordinates’ to ‘UV’.

And there you go. Then you place it wherever you like. I usually place the camera right in front of it, switch to camera view and adjust its scale so that it fits the whole view, then parent the plane to the camera, so that the field does not sway when objects in front of it do – but how you use it depends on what kind of animation setup you have.

Oct 312011
 
Voskhod-D landed near my home
Voskhod-D landed near my home

Voaskhod-D as it would appear from my window (Click to Enlarge)

Yes: Восход-Д is large and massive. Well, in a sense less massive than large, but anyway that’s what it is: a large, massive structure. From end to end, the spacecraft is 632 meters long, and at its widest it measures 125 meters. To give you an idea, in picture number 1 I tried to figure what it would look like if it was somehow dumped near my home, in via Gran Sasso in Milan, with the HAB resting in the middle of Piazza Piola. A beast. For trekkies out there, it is more than twice as long as a Constitution class cruiser (yes, good old NCC-1701), albeit not as wide. For starries, it is three fourth the length of a Star Destroyer.

I’ve designed it as a modular structure, the idea being that its components would have been launched to Low Earth Orbit to be assembled in space, much as it has been done for the International Space Station. The HAB itself is built from 48 sections, spanning an arc of 7.5 degrees each, each made up by 12 modules (total: 576 modules). Forward of the HAB bearing are three habitable microgravity modules (i.e.: they don’t spin) which I modeled after the Mir core and Kvant elements.

Its size is dictated essentially by two factors: first, the size of the crew, which requires a lot of space, and second, the fact that its main drive is a nuclear reactor, therefore it should be kept as faraway as possible from the crew itself. Beyond that, the reactor is not completely coated by shielding, to save mass: the shadow-shield leaves a radiation-free cone of 20° in aperture, therefore the HAB has to be removed a long way from the engine to be completely within this cone.

Most of the length of the spacecraft is filled by lightweight truss structures which only have the function of linking the payload to the main drive, distribute acceleration forces when these apply, and sustain the engine heat radiators, the propellant tanks and  the four high-gain communication antennas.According to my crude computation, the launch mass of the spacecraft is in excess of 20,000 metric tons, most of which, though is the propellant.

To those who might be interested in these matters, you should know that the whole engineering behind astrounautics is concerned with the optimization of a single, very simple equation: the Tziolkovsky Rocket Equation. Since in space you basically always move along an orbit, the performance of a spacecraft is not determined by how long it can run (which it can forever), but by how much it can change speed, or accelerate. Acceleration is what you need to escape the gravity of Earth, to surpass Earth itself and launch yourself into the outer Solar System, and to match velocity with your destination planet. The total amount of meters per second by wich the spacecraft can change its speed is called its Delta-V (or total difference in velocity). Now, the Tziolkovsky Equation basically states that the delta-v of a spacecraft depends on two things alone: (a) the speed at which its engine ejects propellant mass into space (or exhaust velocity), and (b) the ratio between the mass of the spacecraft with and without propellant. In the case of the Восход-Д, we wanted a total delta-v of 20,000 m/s. From the (estimated) performance of my nuclear reactor, the required mass-ratio is 3.4, therefore at launch about 70% of the total mass of the spacecraft is propellant.

To avoid extremely large propellant tanks, Soviet engineers used methane instead of the commonplace hydrogen. Methane has a lot of advantages, so many in fact, that it looks quite strange that it is not commonly used as a propellant in real life (more to do with my incompetency, I suppose). Anyway it is much denser than hydrogen (more or less half the density of water),  requires less energy for storage in liquid form (liquefies at higher temperatures than hydrogen), and most importantly, it can be found, already liquefied, in lakes on the surface of Titan, where Восход-Д is directed. The initial project was even to refuel at destination, but there’s a big problem with this: you have to lift so much mass from Titan to orbit, as the spacecraft itself is never going to land anywhere, and to do so you need a launcher (which you have to bring alongside), and more delta-v (at least enough for the landing, assuming the launcher itself is reusable and can refuel in-situ, using methane as well). That means more mass on one side, and an enormous surface-to-orbit lifting capacity.

Now the 20,000 tons of the Восход-Д are not that much, on Earth: any average-to-small cargo ship can load as much without much effort. But launching that into orbit is an entirely different story. The good old Space Shuttle (or rather Buran) had the cargo capacity of an average TIR lorry: 25 small tonnes. If the whole material and propellant for our spacecraft was to be launched into space by Buran alone, we’d need 800 launches. In its whole operating life, which spanned thirty years from 1981 to 2011, Space Shuttle only made 133.

For what concerns the Earth orbit assembly, we can safely assume our Soviet Unit went fearlessly on building something like a heavy-lift nuclear-powered vector such as the Liberty Ship (thank you again, Atomic Rockets). In case you think I’m too optimistic, I’m just as optimistic as NASA scientist in the nineties. Anyways, this way we might have put Восход-Д in orbit in twenty or so launches – but the problem would turn up exactly the same way on Titan. True, we wouldn’t have to lift the whole ship into orbit, but as said above, the ship’s just 30% of the story: you need that 70% propellant, plus the propellant needed to propel the propellant in orbit, and all in a reasonably short period of time.

If you’ve got a solution, please comment. Otherwise, whatever lands from Восход-Д onto Titan, stays there.

Oct 232011
 
Soviet Saturn

The structural core of Восход-Д is its habitat, or HAB, as real ones say. The HAB must house and sustain forty crew members for fifteen to twenty years. Since it is well known that long terms at zero gravity (or, to be more precise, at microgravity) has bad effects on the human body, such as muscle atrophy and weakening of the bones, the HAB is conceived to provide the crew with a weight, in addition to a space wide enough to grant privacy, relax and social life, beyond survival and work spaces.

The Hab of the Voskhod-D

The HAB of Voskhod-D, with measures (click to enlarge)

Gravity is obtained through the trick made famous by Kubrick: the HAB is a centrifuge, and its occupants walk on its walls. Science fiction often calls this cheat ‘artificial gravity’, but as I see it, it would be better to talk about simulated gravity – mainly because similarities with gravity as we experience it on Earth more or less stop at the fact that objects on the rotating surface of the HAB have a weight. Beyond that, since we’re dealing with inertia, and not gravity connected with mass, its effects can be very odd.

For example. The HAB rotates on its axis 2.4 times per minute, a little beyond that, over 2.9 times per minute, the crew would be struck by nausea and vertigo, due to their inner ear perceiving the movement while the eye would not.

The size of the complex is not dictated only by the need for room to accomodate people and equipement, they are also a mean to generate an acceleration sufficient to create weight for the cosmonauts. But even with its titanic size (over 100 meters in diameter), at 2.4 RPM the acceleration you get at the outer rim (i.e.: on the ‘floor’ farther away from the hub) is one third of G, gravity at sea level on Earth: something weighing 100 kilos on Earth, in this environment only weighs 33 kilos. Moreover, the more you move nearer to the center of the wheel, the smaller this weight becomes.

Sezione dell'Habitat

HAB rim cross-section (click to enlarge)

Now, imagine you’re one of the cosmonauts and you find yourself on the outer rim of the HAB, facing inward, so that the outer surface would be towards your ‘low’, while the ‘up’ above your head is towards the wheel hub. The outer disc of the HAB is divided into four levels, each 2.5 meters in height, numbered from the inner out from 1 to 4, so you’re currently on level 4. To begin with, the weight experienced by your head would be lower than that experienced by your feet, as, assuming you’re 1.7 meters tall, acceleration at the top of your head is 3% lower than at the soles of your shoes, which are farther away from the hub and therefore turn faster around.

When not moving, you weigh, as said above, one third than you would on Earth. But if you run along the floor in the direction the HAB is rotating, your speed sums with the one of the HAB, and your weight grows. If you run at 9 km/h (a little more than a brisk walk), you get to weigh a little less than half your Earth weight: likewise, if you run in the opposite direction, that is, opposite to the rotation of the wheel, your weigh shrinks rapidly and at the same 9 km/h you would weigh one fifth of your usual weight. When you climb to the upper levels, your weight grows smaller even if you don’t move: should you wear a space suit and walk on the outside of the habitat, above the ceiling of the inner level, you would weigh one fourth of your Earth weight.

But that’s not all. There’s also the Coriolis force. This simulated gravity depends by the fact that you move, dragged by the HAB wheel, pinned to its walls by centrifugal force. But should you jump in the air, as you might do on Earth, something odd happens: as long as you’re not anymore in contact with the walls, you’re on an independent orbit, relative to that of the spacecraft, because the force you put in your jump sums to the rotation that the HAB was forcing on you while standing on the floor, and to the overall motion of the spacecraft along its orbit. In practice, instead of falling back more or less on the spot you sprung from, you would feel pushed forward, or better towards the direction of rotation of the wheel.

Voskhod-D HAB - Level 01 - Sector 03

The HAB of Voskhod-D - Level 1 - Sector 3 (Click to enlarge)

In sum, that’s why I like simulated, rather than artificial gravity: because it’s not quite like gravity. That said, I myself was prey to the curiosity of peeking inside this curved world, where things behave that strangely – a curiosity I paid over a month of work in Blender. Some sequences of the final video will let you also peek inside the Восход-Д: for the time being, this here is a preview of the crew quarters (level 01), sector 3.

Analytics Plugin created by Web Hosting