home about gallery publications education links contact


..::galaxy::..

This question gets asked quite a lot in the majority of forums. In a lot of cases, the effects you see in film are cleverly disguised plates of actual galaxies, with a slight deformation, different angle and positioning and additional CG elements to give us the impression that we’re flying around or through it.

As we don’t yet have the desktop computing power to generate every single star and dust cloud, we’re going to have to convincingly fake it, and the best and most obvious way is to use particles. When researching this subject I noticed that not only do most galaxies come in all shapes and sizes, their colours and distribution of stellar matter differ aswell, so therefore there is no proper way to distribute the particles to create our galaxy.

Grab as much reference photography as possible to convincingly create this effect. You will notice that a galaxy’s colours and detail change somewhat when the frame is concentrated on a closer area – dust clouds become more detailed and colourful, stars more apparent, additional elements like flares, stellar nurseries (etc) become visible. Although this forms a dramatic picture, we are not going to go that in-depth as it would take an age to set up and even longer to render!

The main solution to creating a successful galaxy is to mix colours. By observing the reference imagery you will notice that each stream rotating around the central core does not travel at the same speed. Because of this, some overlap and their colours merge in places, become overlaid or react to one another, becoming brighter or darker. The best way to emulate this reaction would be to use additive or subtractive transparency. Additive transparency overlays the colour of the background or additional objects with the colour of it’s own and adds to the total value. Subtractive does the opposite, therefore matter streams can be made to appear more dramatic or more subtle this way by using these transparency types.

Our basic galaxy shape will take the form of two main identical streams emitting from the central core. As both sides are identical, we can concentrate only on one side, then replicate the particles to form the other side. Because of our use of facing particles, some elements will become occluded by others, depending on the angle of the camera. This can be rectified by either using a different particle type and therefore material setup, which will increase the geometry count and therefore the render times, or by repositioning the camera.

This particular distribution method is best suited for stills. Should you wish to fly around and through the scene you would have to amend a few settings. As the distribution of the particles is set over a few hundred frames, you would have to increase the lifespan of the particles, slow them down considerably and extend their rotation time, therefore generating the same overall effect but on a much larger timescale. Okay, but why not simply snapshot the particle system? Yes, this would be one solution, provided you do not move the camera much. This is because of the facing particle type; if you reposition the camera at too much of an angle you will be able to see the sides of the particles and the gaseous effect will be lost. Also, as the particle’s opacity and colour are dependant on it’s lifespan, such an action would therefore render it differently as no particles would exist in the scene, only geometry. Therefore you would have to amend the materials assigned to the geometry and change their opacities to UVW instead of using particle age. Not a simple procedure, but not overly difficult.

Enlarge Screenshot The particle system is pretty much the same throughout; just the materials and rotational tangents are amended. Therefore, create a Superspray particle system with the settings as illustrated and animate a rotation of 1440 degrees over 2000 frames. Amend the Z rotation tangents for frames 0 and 2000 as illustrated. Label it SuperSpray cloud01
Enlarge Screenshot Clone the cloud system and rotate it 90 degrees at frame 0 with animate turned off. Amend the rotational tangents for frames 0 and 2000 to those different from the original system. This will cause the particles to overlap slightly. Clone the original system again and this time rotate by 45 degrees instead of 90. Label this system SuperSpray cloud redder01. Clone this new system -90 degrees so you have two “redder” systems at 45 degrees either side of the original.
Enlarge Screenshot Clone the original system and label it SuperSpray stars 01. Amend the settings to those illustrated. Create a new Multi/Sub-Object material and set the number to 5. In the 1st material, label it white and amend the ambient and diffuse accordingly. Check on Face Map, Self-Illumination and Additive Transparency. In the Self Illumination slot, add a Mask map. In the Mask’s mask slot add a Particle Age map and set it’s colours to White, White, Black for slots 1, 2 and 3. Set slot 2’s age to 30. In the Mask’s map slot, create a gradient map and set it to Radial. Back at the top level, clone the white material to the other slots. Colour each material slightly different and label accordingly. Assign the Multi/Sub-object material to the Stars system.
Enlarge Screenshot Create a new material and label it Vortex Trails. Assign it to the original particle system. Check on Face Map. Add a Particle Age map to the Diffuse slot and set colours 1, 2 and 3 to RGB (209,198,128), (191,190,179) and (106,108,129) accordingly. Set slot 2’s age to 30. Create another Particle Age in the self-illumination slot and set the colours to White, near-black and black. Set colour 2’s age to 40. In the Opacity slot, add a Mask map. Create a Particle Age map in the Mask slot and set colours 1 and 2 to RGB 45,45,45 with colour 2’s age set to 20, and colour 3 to black. Create another Mask map in the original Mask’s Map slot and put a radial Gradient Map in the new Mask’s Mask slot. Load in the “particle smoke mask – stars.jpg” map in the Mask’s map slot.
Enlarge Screenshot Clone the Vortex Trails material and label it Vortex Trails Redder. Assign it to the SuperSpray Clouds Redder systems. Amend the Particle Age map’s colours to RGB (91,49,66) , (104,79,124) and (152,176,175) with Colour 2’s age set to 70. In the Particle age map in the Opacity slot’s Mask map, set the colour 2 age to 50. Clone this material, label it Vortex Trails Bluer and assign it to the SuperSpray Clouds Redder system. Check on Additive transparency and check off the Self-Illumination slot. Set the Particle Age Diffuse map to RGB (91,49,128) , (62,79,124) and (152,176,220) with Colour 2’s age set to 50.
Enlarge Screenshot Select all the particles and clone them. Rotate the clones 180 degrees. Create a camera and position it as illustrated. Set the camera’s lens size to the stock 15mm setting. Create an Omni light and align it to the camera. Create another Omni light and position it in the centre of the galaxy with the settings illustrated. Exclude all particle systems from it. Add a Volume Light Atmosphere and use the settings shown.
Enlarge Screenshot A hell of a lot of particles later, and here’s our final render. The Volumetric light works better than a glow to create the central mass and a wide-angled lens gives a sense of scale to the scene.
Download the max file! Zip file to accompany.

..::tips::..

Okay, once you’ve set the scene to render, I’d recommend you go and make a cup of tea, have a bite to eat, do a spot of laundry, rotate your tyres and so on. Because this baby is going to take a hell of a long time to render. To reduce these times, try adding a set number of particles for each particle system instead of using a rate. You may also want to knock the volumetric light’s quality down a notch or two.


Although this illustrates that Max’s own particle system can handle such a job, you may wish to incorporate additional elements (such as dust trails) that need to be born from particles. You don’t have to resort to a third party system to do this; set up your emitter system and set it’s particle rotation to directional (so the new particles are emitted in the right direction). Using a Mesher Compound Object on your original system, create a PArray system and use the Mesher as the emitter. Simple!


Not satisfied with the additive glows created for the stars within our galaxy, you could increase them in post by assigning a material or object ID to them and adding a Glow effect. A Video Post filter though generates the best results, in which you can easily assign flares and highlights to these “stars”, as you would find in images of galaxies.


There are absolutely tons of resources online for researching space phenomenon. One really good site is the “Astronomy Picture of the Day” at http://antwrp.gsfc.nasa.gov/apod/ . You will notice from the many pictures available that galaxies come in all shapes and sizes. Try adding additional elements to the one illustrated in the tutorial, such as dust clouds along the outer regions to match some of the online references…

Initially published: 3D World magazine, Issue 35, February 2003.

Copyright Pete Draper, February 2003. Reproduction without permission prohibited.

www.xenomorphic.co.uk