Blender is the open source software for 3D modeling, animation, rendering, post-production, interactive creation and playback. Available for all major operating systems under the GNU Public License.
This week I was working on an animation of a laserbeam cutting through a plate of steel. Before I started, I realised there were two ways of doing this: one was to create a physically accurate model of steel being eaten away by something. This goal might have been achieved by using a vertex-keyed mesh, or a mesh with a 'build' effect attached to it. Obviously, this would be a lot of work. The other way would be to fake the effect using an animated texturemap for the alpha channel of a mesh, thus making it transparent.Lucky for me, I was lazy enough to choose the latter option. As it turned out, this was the right thing to do, because it enabled me to add some other effects with relative ease later on.
This tutorial will introduce you to using AND creating animated texturemaps, all in Blender.
FIRST!Set the number of frames in your animation to 150. The rest of the tutorial will assume this number. Create a shape which you want to cut out of the metal. Make it out of a curve. If you want to create a logo, take a look at my logo tutorial - it'll explain in depth how to trace a bitmap and convert it into curves using only Blender as your tool.Anyway, I used an 'M' which looks like this:
Creating the animated alphamap
The next step is to use a particle system to create an animated texturemap. Select the cube, go to the Anim Buttons screen (F7), press the 'new effect' button and select 'particles' from the effect menu. Hit alt-A to see where we're going.
Add a new material to the cube, select the 'halo' button and set the halo size to 0.2. Go to frame 30, and make a testrender. It should look something like this:
Creating the welder
Next, it's time to use the alphamap. Create a new scene. To do this, locate the following button on the top of your screen:
Adding a metal plane
Now it's time to add our metal plane which is eaten away by the welder. In the topview, add a plane which is about 3 times bigger than the letter M. Place it on the same height as the letter (use the frontview). Add a new material and call it 'Metal'. Add a new texture to the plane, and call it 'alphaMap'.
Now, assign the previously rendered animation to the texture. Go to the Texture buttons screen (F6), select the image button and load the first frame of the alphaMap animation. Set the value in the 'frames' field to 150. Select 'calcAlpha'(!).
Return to the materials screen, and go to the texture type section ('col, nor, csp' etc). Deselect col and turn on 'alpha', and sub. The trick now is that everywhere that the texture is white, it will 'eat away' the alpha value of your plane, thus making it transparent.
Also, select 'extend', so that the alpha map isn't repeated across the texture. I only want it displayed on the plane once.
Now comes the part that is a bit hairy - you'll have to adjust the position and the size of the texturemap to align exactly with the letter M. To do this, select the plane and hit the TKEY. Blender will ask you whether you want to change the texture's position or the size. Play with both, rendering inbetween changes to see the result of your actions.
When you're done, you should have something like this:
Add realistic lighting
Okay, now for some added realism. First of all, the lighting should not be constant; if you've ever seen a welder in action, you'll know that the light it emits is highly irregular and very bright.
To simulate this, create an omni light and position it slightly above the halfsphere. Parent it to the halfsphere. With the lamp still selected, open an IPO screen and select the lamp icon. Select the Energ key, and holding the CTRL key, draw random points in the IPO window by clicking your left mouse button. Don't hesitate to draw values higher than 1 or smaller than 0.
When you're done, you'll have an energy graph that looks wildly different from this ;-)
Adding realism to the sparks
Now most sparks aren't just white. They start off whitehot, and while they fly through the air, they'll cool down, becoming more yellow, untill they turn red and then black. I can achieve this effect by applying a material IPO to the particle's material.
Select the halfsphere, and open the IPO window. Select the material Icon in the IPO Window. Go to frame 1 of your animation and turn the particle material's color into bright white. With your cursor in the material window, hit the IKey, and insert an RGB key. Next, move to frame 30 and change the color into bright yellow. Insert another RGB key. Go to frame 80 and change the color to dark red. Insert a key. Finally, at frame 100, insert a key where the material is completely black.
Your IPO window will look like this:
Adding realism to the melting metal
Well, something still isn't quite right. When metal has just been cut, it shouldn't look all dull and cool. Instead, it should be glowing and cooling down gradually. It's time to revert to our previous scene (the particles we used to create the alphamap), and duplicate it once again.
Add a new material to the particles. Next, like with the sparks, add a color IPO to the particles. Only this time, you'll need a completely different timing: set the keyframes on frames 3, 6, and 11.
Finally, change the halo size to 0.20; this map needs to be a bit 'fatter' than the alphamap, or else you won't see a thing of it.
You will get an animation that looks like this:
And now for the finishing touch! In the 'Cutter' scene, add yet another particle system. Duplicate the halfsphere, remove the existing particle system and add a new particle system.
Give it the following parameters:
The .blend file from this tutorial is available here.