About Blender

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.

You can download Blender free of charge on www.blender.org. On the Blender site you will also find a gallery with cool Blender art.

Introduction

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.

The preparations

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:

Cutting Through Steel uncategorized
As you may notice, I turned my curve into polygons (this can be done in the EditButtons screen while in editmode and having selected all vertices). This isn't necessary; it's just that my logo looked better in straight lines.Now I want to make a particle system that follows the curve. Create a cube, scale it down and place it on the same height as the letter M. Next, parent the cube to the letter by first selecting the cube, holding down the SHIFT key and then selecting the letter. Press CTRL-P to make the letter the cube's parent.
Cutting Through Steel uncategorized
To make the cube move along the outline of the curve, select the curve, go to the Anim Buttons screen (F7) and select the curvePath button.The first thing that happens is that the cube translates to somewhere else:
Cutting Through Steel uncategorized
Now, select the cube and move it back to the start of the dotted line. If you now hit alt-a you'll see your little cube move happily along the curve.

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:

Cutting Through Steel uncategorized
If the image is dotty, try scaling down the cube a bit. If it's all a white blur, decrease the halo size.If you look at the animation, you'll notice that the white trail builds up, but after a while it disappears again at the end. This is not what I want - I need to build up a complete white outline of the letter M. To fix this, select the cube, go to the particle system settings and increase the particle life up to 200.Move the camera untill it's right above the letter M, and looking down. Select the camera, go to the editbuttons screen and select 'Ortho'. This will cause the camera to ignore perspective. This is ideal for our purpose: projecting this map onto a plane, later.
Cutting Through Steel uncategorized
Finally, render the animation to disk; call the animation frames alphaMap.

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:

Cutting Through Steel uncategorized
First, rename the current scene to 'Alphamap'. Next, select the dropdown icon ('-') and add a new scene. Select 'Full Copy' and relabel the scene as 'Cutter'.I'm now going to re-use the existing particle system, but make it look like an actual welder. First, I need to change the cube into a half-sphere to ensure I have some nice-looking particle emissions. Delete the cube. Add a new UVSPhere with segments and rings = 16. While still in editmode, go to the sideview, deselect all vertices, and use box-select (BKey) to select the bottom half of the vertices:
Cutting Through Steel uncategorized
Hit XKey and remove the vertices. You now have a half-sphere. Scale it down, parent it to the curve, and grab/move it until it moves exactly over the curve. (In the same way as above).To ensure you have a nice, random particle emission from your mesh, enter edit mode, select all vertices, go to the Edit Buttons screen (F9) and hit the 'Hash' button.Next, assign a particle system to the mesh and input the following values:

  • Tot = 2000
  • Life = 5
  • Norm = 0.4
  • Rand = 0.1
  • VectSize = 0.028
  • Vect = onHere's what the particle systems settings looks like:
    Cutting Through Steel uncategorized
    If you animate your scene, you'll notice that the particles now have a pretty violent motion. By setting the norm value to 0.4 I ensured that the particles would emit radially from the half-sphere, thus moving outward and up. Setting the particles to 'vect' and increasing their vectsize makes them look like flying sparks.Add a new material to the particle system, call it 'sparks', and set the halo size to 0.1

    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:

    Cutting Through Steel uncategorized
    Now, let's add some more realism to the metal. From my collection, I've taken a metal surface texture. (I've included two sample here and here. Take one of those textures, and assign it as a colormap AND a bump (NOR) map to the Metal material (yes, you can make one texture act as both a colormap and a bumpmap at the same time).For some added fun, add marble texture as a specularity channel; this will cause the shinyness of the material to have some interesting, more natural, variations.Finally, return to the alphaMap channel of the Metal material, and select the nor button. That's right, on top of letting the animation work as an alpha channel, I'll use it to smooth off the edges of the metal aswell. Try playing with the 'nor' value untill your satisfied.Your rendered result will look something like this:
    Cutting Through Steel uncategorized

    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 ;-)

    Cutting Through Steel uncategorized

    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:

    Cutting Through Steel uncategorized
    The idea behind this little exercise is that frame 1-100 of the material IPO are mapped onto the complete lifetime of the particle, in our case 5 frames. So our particles will now change color while they fly through the air.Here you go:
    Cutting Through Steel uncategorized

    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:

    Cutting Through Steel uncategorized
    Render all the frames (1-150) and save them to disk at emitMapFinally, add this animated map to the Metal texture. Turn on the color and emit channels and you're ready.Here's the result:
    Cutting Through Steel uncategorized

    Adding smoke

    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:

  • Tot = 300
  • Norm = 0.1
  • Ob = 0.02
  • Rand = 0.01
  • Force z = 0.05Next, create a new material and add this smoke texture (I stole this one from NaN's tutorial files). Give it halo, halotex and X-alpha, and the following parameters:
  • HaloSize = 0.85
  • Alpha = 0.034
  • Hard = 12
  • Add = 0.014

    The result

    Cutting Through Steel uncategorized

    Downloads

    The .blend file from this tutorial is available here.