A screenshot of the final effect, taking seconds to render on a single machine.
I have been experimenting for some time with different ways to produce computer based nebula effects that can be animated, similar to the practical special effect of the Mutara nebula in Star Trek II The Wrath of Khan:
This was originally achieved by use of a cloud tank, where coloured dyes and other chemicals were immersed in a big glass tank of water, lit from various directions, and then photographed. This effect was used in a number of other 70s/80s films, including Indiana Jones. You can read all about it here, and there are lots of videos like this one that show you how to create your own.
An example of a cloud tank.
In the absence of a large cloud tank, I wanted to look into how to re-create this effect in 3D CGI, where you could build a cloud-like structure you could navigate around – not just a photoshop painting. Some years ago I looked at Blender’s fledgling volumetric model which showed promise. I tried recreating the tank as a 3D shape, such as a sphere, and then used 3D noise textures to influence the varying density of the cloud inside the sphere. I then lit it with different coloured lights from various directions and achieved this:
My first attempt.
At that time, you could not increase the detail beyond a certain limit, and the rendering time was quite cumbersome on a single machine (remember in 2009 public distributed computing like Amazon Web Services were still in their infancy).
I revisited the problem a number of years later in 2014. Blender had developed its Cycles system to include volume rendering, and with their nodes editor I was able to create more effects. This time I used a more straightforward cube shape and then used 3D noise and colour ramps to control the effects. I also started embedding light sources inside the cube to suggest stars which also produced some better effects.
Here are a selection of an early set of attempts, roughly in chronological order, where I did a lot more close-up shots. Remember these images are rather raw and have not had any further post-processing. Click for larger versions:
I still found drawbacks to this technique; I had a lot more power to control the effect, but rendering times were still extremely high especially on a single machine. I was experiencing times of between 1 and 6 hours for a half decent single frame render.
I therefore did one further experiment with this technique using an open source tool called Brenda and ran the process across multiple machines using Amazon Web Services. This way I could split the work up across multiple machines running simultaneously to reduce the time to render.
This nebula exists in 3D space and could be navigated in and around with a camera. This image was achieved in 40 minutes, using 8 multi-core machines in parallel – if I had ran it on a single work station, it would have taken nearly 6 hours…
I was still very impatient; Therefore I developed a system that can produce very effective results in a matter of seconds, at the sacrifice of being totally navigable – however you could simulate this using various techniques that splits the clouds up onto multiple 3D planes.
The effect was a development of a photoshop tutorial I saw online. This tutorial used more traditional painting techniques to great effect, and the key was how the artist overlaid different painted clouds over each others using the colour dodge filter. The most time consuming part was producing the clouds – so I cut that time down by using a noise texture.
I used Cycles in Blender and the node editor to overlay different noise-generated cloud effects on top of each other using the Screen filter, adding this to the world background. Because I wasn’t using volumetric rendering any more, I could produce good effects in near-realtime on a single workstation.
Here are some high resolution quality images which all took under a minute to render. Click to enlarge:
The properties can also be animated, and although you can’t quite navigate around them in the same way as using volumetric materials, the rendering time is significantly reduced – the following HD animation took 15 minutes to render on a single machine, so this effect would take even less across multiple machines. Note that the clouds move half-way through:
You can also create different effects other than the pink/purple mutara nebula effect. You could create an Eagle nebula like effect like this:
…or a very red nebula like this:
So in conclusion I spent a great deal of time working out how to do efficient nebula effects on the fly. If you happen to use any of the techniques developed here…please give me a mention 🙂