| ||||||||||||
Making Northern Lights in Maya
![]()
The Northern Lights can take on a variety of appearances such as those in the above pictures. This gives an extra bit of freedom in creating the effect. There are undoubtedly countless ways to create a successfull aurora effect, but here is the method I came up with. It is very basic and easy to follow and allows for a large amount of freedom. I described the process below that should be simple to repeat even for those who are not familiar with Maya's capabilities in particle dynamics.
Getting StartedI found it helps to set the scene a little... I set the background color to black, but do whatever is comfortable.Lets add some stars. Open the particle tool and name your new particles "stars". Turn on "Sketch Particles" and draw some stars, putting them on the ground plane is fine for now. You can play with "Number of Particles" and "Maximum Radius" to change the density of your stars as you sketch them. Make the area quite large so it will cover the entire screen. When you are satisfied, hit Enter and your stars are created. You can then rotate them to be perpindicular to the grid. Lets also add a ground plane. Create a plane (any type will do). Scale it up in all directions by about 150. Leave it at the origin and move the stars in the negative Z direction to be far behind the plane, anywhere between 150 and 400 works well, depending on how large the area you used to sketch your stars is. Now lets set up our view. In the perspective view, select the camera. Enter 40 for TranslateY and 50 for TranslateZ. This should place the camera in a perfect location to see the "horizon", but feel free to change the values if these don't work, anything to give yourself a good view. Save the camera location so you can return to it later. From here, change the position of your stars if needed to fill the view. Make them less dense by scaling up or more dense by scaling down until you are satisfied.
Just one last step to prepare. Stars are not gray, and they do not stay a static color. Select your stars and go to the attribute editor. Add a Per Particle Attribute for Color. The color channels will appear under "Render Attributes". Make them all 1. Next, add a Per Particle Opacity attribute. The new attribute, labeled opacityPP, will appear under "Per Particle (Array) Attributes). Right click and select "Creation Expression". Enter in the text box:starsShape.opacityPP = rand(.4); This will give your stars an initial random opacity between 0 and .6. Next, select "Runtime After Dynamics" and enter the following code: if (starsShape.opacityPP <= 0)    starsShape.opacityPP += rand(0,.05); else if (starsShape.opacityPP >= .6)    starsShape.opacityPP -= rand (0,.05); else    starsShape.opacityPP += rand (-.05,.05); This will change the opacity of each star by a random number between -.05 and .05, but prevent any opacity from exceeding .6 or dipping below 0 by too much. Your stars should now twinkle. Check it out by playing the animation in the interactive view. You can modify the values in the expressions to achieve the look you want. Creating the StreaksNow the fun starts. Using the CV Curve tool, draw a curve starting at the horizon and rising up. You may have to draw it on the grid first and then rotate and move it to the correct location. Use at least 4 or 5 CVs to allow for more precise manipulation later. Once the curve is created, move it to the back edge of the plane. With the curve selected, choose Particles->Emit From Object. In the channel box, change the Emitter Type to "Curve". Play the animation, and the particles should emit from places throughout the entire curve. Play with the rate of the emitter to get a continuous line of particles coming out, around 1000 worked well for me.The emitter should have also created a particle object in your outliner. Select in and go to the attribute editor. Set the Render Type to "MultiStreak". Add a Per Object Opacity attribute and a Per Particle Color Attribute. Recall this is opposite from what was done in creating the stars. Opacity will be added under "Render Attributes" and a new Per Particle Attribute will be added called rgbPP. Under Lifespan Attributes, change the Lifespan to 8. Before we start playing with the particle attributes, lets add a field. With the particle object selected, choose Field->Uniform. Change the direction to point in the +y direction (0,1,0). This will cause the particles to be pushed up by the field. I found adding a vortex field also makes it interesting. Play with adding different fields and changing their magnitudes to get an interesting effect.
Now return to the attribute editor for your particle object. Create a ramp for the rgbPP. Here you can play with the colors of the particles. Green is common, but choose whatever color you would like. Return to the particle attributes and change the opacity to be .05. Play with the rest of the attributes until you are satisfied. I found that to create a smoother look increase the Line Width to around 4, make the Multi Count up around 40, and increase the Multi Radius to around 4. This will cause thicker lines to be emitted from a larger area, and will hopefully reduce the "streakiness", but may also cause it to run slower interactively. Also, increase the rate to emit more particles and add to the smooth look.So thats the basic idea, and this method can be used to create as many streaks as you would like. Vary the fields or colors on them to create slightly different looks. Even change the render type or the lifespan or the tail size. Any look can be achieved with the proper attributes. Once this is done, it is time to animate. Animating the StreaksIf you've seen the Northern Lights outside of an image search on Google, you know that they do not stay in the same place. They take on different forms and often times different colors. We can create this effect by simply animating the curves from which our particles are emitted as well as animating the attributes of the emitter and the particles.Position your curves in a good starting position. In my experience, the lights often start as thin streaks in the sky rising straight up from the horizon, and slowly they bend and grow and change colors. This may be a good starting point, but again experimentation is the best way to find out. Set the time range to be the planned length of your animation. Advance 200-300 frames at a time, keying the CVs of your curve at different locations. Any field that is position dependent, such as the vortex, must be moved with it. Try to create a smooth and elegant movement in animating your curve. But don't stop there. Animate as may attributes as you want. Some good tricks I found while experimenting: - Start the Rate at 0 and gradually build it up to look like you are witnessing the start of the storm. - Start the Gravity field at a low magnitude and build it up so that the streaks grow in width. - Add some randomness to the lifespan to give the tops of the streaks a more natural look. - Bring the tops of the curves toward the camera a little to make it look like the streaks are beginning to cover the entire sky. - Vary the color slightly over time to keep it interesting. - Change the magnitudes of your vortex and other fields effecting the particles over time so that the streak takes on different forms while it moves throughout the sky. Once again, experiment with this until you are satisfied with the results. There are infinite possibilities here, just as there are in nature.
Rendering the SequenceOnce your scene has been created, its time to render. No real tricks here. Select your resolution and name your image sequence. I found that the more passes used to render a frame the smoother the final sequence will be, so choose a high number of frames for multipass rendering. Render the sequence, and you have your aurora.>> Back | ||||||||||||