Now that we've dealt with constructing a surface with a high patch resolution, creating decal mapping co-ordinates, and animating the thing we still need to create animated displacement maps, materials, and the smoke rings to finish it all off.

Animated Displacement Maps

Creating the rolling smoke look through textures at first appears to be quite a difficult problem to tackle, but after playing with A:M's great material combiners you'll soon see that you've got a lot you can work with. First though, lets look at the elements our displacement map requires. Firstly there's the stem of of the mushroom cloud, the texture here should move with the surface but at the same time be turbulent. Secondly there's the crown of the mushroom cloud, the texture here shouldn't remain static but curl under itself and at the same time be turbulent. Finally there's the cap, the part at the very top of the mushroom cloud that appears as the crown punches through next layer in the atmosphere which cools down and smoothes out the top. This part has no displacement but needs to start at the top and move down the surface. So the texture has three basic elements, which will require three layers.

Three elements of the texture

Start off with the stem. Create a new model, this model is nothing but a square plane and unlike our other surface we don't need more than a single patch here. The only purpose of this model is to hold a material. Next we're going to have to render this material at some point so lets create a new choreography. Since we're creating a texture we don't need any shading so you can kill all the lights in the choreography (just delete them all, you won't need them later), while we're here we don't want any perspective distortion on our material so go to the camera's attributes and change it to an orthographic camera. Arrange the scene so the camera is looking down at right angles to the surface. Because there's no perspective you might as well put a little space between the camera and surface to move around in. Scale your plane so that it fills the camera and maybe goes over the edges a bit, you don't want any of the background showing through as it will affect the map.

Create a single patch plane Aim an orthographic camera at it Make sure the plane fills the camera's field of view

Create a new material. Our aim here it to create a turbulent smoke effect, so naturally change the attribute to a combiner->turbulence->perlin. You could use other turbulence combiners I guess but perlin is a personal favourite. You should now have two attributes that come with the perlin combiner to play with. Change the top attribute's color to white, and the bottom attribute to mid grey or RGB 128, 128, 128. Displacement works on a pixel's grey value (sometimes called luminosity). So a black pixel (RGB 0, 0, 0) will displace inwards the maximum amount, a white pixel (RGB 255, 255, 255) will displace outwards the maximum amount, and halfway in between (RGB 128, 128, 128) won't displace at all. Theoretically we'd get a better range or greys if the bottom attribute was black instead of mid grey, but because the surface is cylindrical the way it is there is the risk that the parts that displace inwards might intersect each other (creating nasty artifacts). There are no lights in the scene that this material's going to be used in so crank each attribute's ambience right up to 100%. We want the full noise effect so go to the perlin's properties and put the octaves up to 5. Drag'n'Drop the material onto your model in the project workspace. This next part is one of those things you just have to experiment with until you get it right, and that is the scale of the turbulence. Render the orthographic camera view to file (set the resolution to to something square like 512x512, and the aspect ratio should be 1), bring that file into your project and swap it with the decal on the mushroom cloud surface, render that and see if it looks okay (just looking at the stem part for the time being, ignore the rest). It's okay to leave it as a color map for now, it's a lot faster than displacement map test render. Repeat this process, tweaking the perlin's scale each time, until it looks good. The scale of your perlin may have to be quite large, up to several thousand percent.

The material should be a Perlin combiner The patch should start to look like this Put it on the mushroom cloud and have a look

After you're satisfied go the material shortcut branch under your model in the project workspace and tick the 'use global axis' box. We want the turbulence to 'be turbulent' ie. non-static on our texture map and the way to do this is to move the surface through the material, if we don't check the 'use global axis' box the material will stick to the surface as we move it and there won't be any change. Now in the choreography set a keyframe on your surface at frame 0, go to frame 100 move the surface along the Y-axis a bit and set another keyframe. I suggest setting the interpolation to 'linear' on the Y-axis translate channel, it just makes the turbulence more consistent at this stage. Once again you will have to render all this to a file, substitute it in for the decal on your mushroom cloud and then render that off until it looks right. Most of the time you can see if the turbulence is too little or too much just by looking at the orthographic animation without rendering the mushroom cloud animation, but when you think you've got it you might as well render the mushroom cloud animation just to make sure.

The surface moves through the material

Once your happy we need to do the same again with the the next layer, the crown. Create a new model, open up the stem layer model and copy the points then paste them into crown layer model. You might as well create another model for the cap layer while you're at it. Create a new material, once again changing the attribute to a perlin combiner. To start with just copy all the perlin and attribute properties of your stem material to the crown material so that in effect you have a carbon copy. This time its a bit different, this layer not only has to look turbulent, but will have to scroll so that it looks like smoke curling under the crown. Because we can't make the turbulence bubble and boil and scroll just by moving the surface through it, we have to use a material effect. So create a new material effect! Drag'n'drop the crown layer material onto your material effect and then drag'n'drop the material effect and crown layer model into the choreography. In the choreography move this model under the stem layer model, it doesn't matter how far because distance isn't apparent looking through an orthographic camera - but keep it out of the way of the other layer. The distance you moved the stem layer along the Y-axis to create turbulence should be appropriate for the crown layer too so you can use the same values for frames 0 and 100, remembering to offset them by however far back the crown layer is. So if your stem layer was at 0cm for frame 0 and 20cm for frame 100, you could put the crown layer at -520 for frame 0 and -500 for frame 100. Change the material effect to a box then set the width softness and fall off softness to 0, then position it in the choreography so it completely covers the crown material layer. Turn off animate mode on the stem layer and then uncheck the active box, so we can can have a look at the crown layer through the camera. You'll have to go through the render, substitute, render process again to make sure it looks good. The perlin scale for this layer should be slightly less than for the stem layer - the crown part of the mushroom cloud has a greater circumference than the stem part and thus stretches the decal more, you can compensate for this by making the perlin scale slightly smaller for this layer. Now that the scale is correct and hopefully the turbulence churns nicely, its time to make it scroll down. This is done easily enough by moving the material effect across the surface along the Z-axis. Render, substitute, render, evaluate, tweak, repeat as necessary. You know the drill by now :)

The surface moves up through the material effect and the material effect moves acorss the surface

The next item on the menu is to mix the layers together (don't worry about the cap layer just yet, we'll fix that last). The best point on the cloud to do this is where the stem meets the crown ("Ye Olde Hide The Seam Trick"), the way to find this point by using test images. One thing to note is this meeting point changes throughout the animation but should be roughly in the same area if you animated the cloud well. Open up your image editing program of choice and create a new image, 512x512 is a good resolution but 256x256 will probably suffice. Make a black horizontal line across the image, swap it onto your mushroom cloud and quick render it. The best frame to check it is the last frame as the mushroom cloud's shape doesn't change after this. Adjust the line up or down in your image editor and re-render until its roughly at the point where the stem meets the crown. Once you've got it you can make a transparency map for the stem layer.

A simple black line... ..helps you find your way

Go back to your image editor and make the image white below the line and black above, with a gradient across the line for a smooth transition. Back in A:M now, open up the stem layer model and apply the decal you just made on it, changing the map type to transparency. Reactivate the stem layer in the choreography, render, substitute it on to the mushroom cloud, render to check if the transition between the two layers is clean or not.

A gradient at the between black and white.. ..makes a nice crossfade between layers

The last part of the texture is the cap, which we'll need a transparency map for. This one's easy, just go into your image editor an make a white image with a gradient fade to black at the very bottom. Create a new material with the color attribute set to mid grey (RGB 128, 128, 128) and ambience to 100%, then drag the new material onto the cap layer model. Apply the decal as a transparency to the cap layer model and bring it into the choreography. Put this layer above all the others and drag it back along the Z-axis so the very bottom is just showing on the camera (where it starts to fade in) and set a keyframe at frame 0, go to frame 100 and move it down so its covering about the top 25% of the view through the camera and set another keyframe.

A simple transparency map The bottom just shows in the camera frame It creeps down during the animation

Render, substitute, render, tweak, etc. Now you can render it off as a sequence, swap it in as the decal on the mushroom cloud and change the map type to displacement. The value of the displacement hard to give as it is relative to the scale of your mushroom cloud, but as a rule it's probably pretty low, roughly somewhere between 2-20%.

Put it all together and you get something like this Finally you have your animated displacement maps!

 

Download the Project file for Part 2

Part 3: Animated Materials & Lighting ->

Back to Part 1

 

Copyright © 2001 by Ilya Anisimoff. All rights reserved.