Let There Be Light (Lava Light, That Is)

by Dan Ablan

I’m not one to be trendy, especially when it comes to this whole 1970s flashback thing. I grew up during the ’70s, and frankly, once was enough. I have no flowered shirts or bellbottoms, nor do I still have my Charlie’s Angels posters on the walls. Yet, I have to admit that, over the past year or so, I’ve been intrigued by those ever-popular, ever-glowing lava lamps. When I first started seeing them in store windows, I laughed and thought of Greg Brady dressed up as Johnny Bravo. As time went on, it became very easy to see a nice bubbly lava lamp on my desk. Sure enough, Santa brought me one this Christmas. So, since I can’t fully escape the ’70s, I figured I would bring the era into a LightWave animation.

The blue lava lamp sits on my desk, off to the right of the PC monitor. It’s an interesting contrast next to the thin, tube-shaped halogen light next to it. But, in an odd way, the lava lamp fits. Call it eclectic, I guess. I didn’t think it would be too much trouble to model the lamp (which it wasn’t). When it came to the oozing lava, I wasn’t sure how realistic I could make it look. In the end, I came up with two good methods for animating the lava.

As with anything you’re going to model, it’s always best to have a photograph, or better yet, the actual object in front of you. The lava lamp I have is pretty basic in shape and was no trouble for Modeler. The only thing that gets tricky is making sure the angles are correct. If they’re not, you’ll still have a lava lamp, but something just won’t look right. Take measurements of the lamp so you have a reference. Another good way to approximate the shape of the lamp, or any other cylindrical object, is to grab a frame of the object and use it as a background image in Modeler. I, on the other hand, winged it. I chose to model in four elements: the base, the base rim, the lava glass itself and the cap. The lava inside comes later.

Making the base and the glass is elementary Modeler, which goes back to the coffee mug tutorial from the manual in the early Toaster 1.0/2.0 days. We only need to make a vertical "slice" of the base. The lathe tool will take care of the rest.

Starting with a 200 mm grid, create points starting at X = 0, Y = 1.4 m.

Create the next point at X = 380 mm, Y = 1.4 m; then X = 220 mm, Y = 1.12m; then X = 460 mm, Y = 60 mm; and finally, Y = 360 mm, but X = 0 m.

You should now have a polygon that looks like Figure 1.

screenshot

From the Multiply menu, select the Lathe tool.

Place the mouse at X = 0 and Z = 0 in Y view (Top).

Select Numeric (n) on the keyboard, and change the sides to 24.

Click OK, and hit enter. You should have something like Figure 2.

screenshot

At this point, I chose to hollow out the center, which you don’t have to for this tutorial. You won’t render the inside, but, as in my case, if you decide to animate the glass being placed into the base, you’ll need the base hollow, as it is in real life.

If you wanted to hollow out the center, you have two options:

First, with the base we just created, copy the top section to another layer. Size it down about 5 percent, and with the smaller version of the base in the background, select the Boolean Subtract operation.

The other way is to go back and model the base without starting at the X = 0 location on the X-axis. Rather, you would duplicate your outside points a few millimeters in. This method is very similar to the above-mentioned coffee mug tutorial. Save this as "LL_Base.LWO", or similar. (Note: Even if you are only working on the Amiga version of LightWave, it’s good to start forming a habit of saving objects with the .LWO extension, as well as .LWS extension for your scenes. You may get a PC version of LightWave sooner than you think, and this makes transferring old objects that much easier).

Next, on to the lamp glass. This part is built the same way as the base (not hollow).

screenshot

In a new layer, your first point should be at X = 0, Y = 2.82 m. Your next point should be at Y = 2.82 m, and X = 260 mm; then, X = 420 mm, Y = 1.64 m.

Go out a little for the next point, at X = 440 mm, and Y = 1.58 m.

Continue with X = 420 mm, Y = 1.52 m, and another at X = 400 mm, Y = 1.46 m. Your second-to-last point should be at X = 300 mm, Y = 1.32 m.

Finally, place your last point at X = 0 m , Y = 1.32 m. Click (p) to make the polygon, and hopefully, you’ll have a shape, such as the one in Figure 3. Again, lathe from the Top view, and change the number of sides to 24 (Figure 4).

screenshot

The cap of the lava lamp could have been part of the glass we just modeled; however, it should look like a separate piece. For that, we’ll model it separately.

Using the same point system as above, start your first point at X = 0 m, Y = 3.15 m.

Move the next point to X = 190 mm, and Y = 3.15 m, then out to X = 260 mm, Y = 2.83 m.

Your last point is at X = 0 m, Y = 2.83 m.

I rounded the top corner on the cap I made to match the real lava lamp as much as possible. To do this, add a few points to the top corner. Then, lathe the cap, also with 24 sides, so you have something like Figure 5.

screenshot

Now, it’s on to the base rim of the lamp, which is sort of a rubber rim.

Again, using the "slice" idea, plot points in the following order, with a 50 mm grid:
X = 0 m, Y = 340 mm;
X =460 mm, Y = 340 mm;
X =460 mm, Y = 380 mm;
X =470 mm, Y = 380 mm;
X =475 mm, Y = 375 mm,
X =480 mm, Y = 365 mm;
X =480 mm, Y = 350 mm;
X =480 mm, Y = 340 mm;
X =475 mm, Y = 330 mm;
X =0 m, Y = 330 mm.

Click (p) to make the polygon (Figure 6). Then, lathe the polygon from the Y, with 24 sides.

screenshot

Select background layers with each of the lava lamp pieces and move individual objects accordingly, if they don’t appear to line up.

Place all four objects on one layer, and save the object.

You may want to select the lamp in a foreground layer, and with the cap in the background, use a Boolean add to join the objects. You can do the same with the base and the base rim. Once all of the elements are together, you should have something that resembles a lava lamp, as in Figure 7. Save the object. You’ll notice that in my final version, I added small, offset holes in the base. Use the Boolean subtract to do this.

Now, it’s on to the lava. There is more than one way to animate the lava:
Choice number one is to make a few, differently sized balls, which are high in polygon count. Use a 50 mm grid. It’s a good idea to place the lava lamp in the background to properly size the lava balls. I made four balls, all a bit different in size, and then pulled and stretched each one for a different look. These balls will be animated with a displacement map.

Choice number two is to morph the lava. Start out by making a lava ball. Save this as "lava_1.lwo". Now, pull and stretch the entire object, using the Magnet tool, or by moving individual points. When satisfied, save this "lava_2.lwo". Continue this until you are satisfied with the shapes. Now, you’ll have to set up morph sequences for each.

Choice number three is to use a few bones in each lava ball to pull, stretch and size the lava over time. For this tutorial, let’s use choice number one and set up a displacement map:

In Layout, load the final lava lamp object. If you elected to save the base separately, load that as well. Begin by loading the lava balls. I made six total, but only used four.

Parent the lava balls to the lamp, and move them into position at the base of the lamp. Create keyframes for the lava balls at frame 0.

Using a Fractal bump displacement map, set the size for the first lava ball like this:
Texture Size: .3, X, Y, Z
Texture Amplitude: 0.1
Frequencies: 3
World Coordinates: On

You can adjust the amplitude and texture size as needed. By moving the lava balls within the lamp, with World Coordinates turned on, the lava will move "through" the fractal bumps. This is a real time saver, since you won’t need to calculate velocity. Move the lava slowly from bottom to top, and back again. Make sure the lava doesn’t push through the glass when setting keyframes.

The lava surface was a bit tricky. Here’ s what I used:
Surface Color: 155, 225, 240
Surface Texture: Fractal Noise
Texture Size: .4, X, Y, Z
Texture Color: 75, 183,1 40
Frequencies: 2
Contrast: 0.5
Specularity: 30%
Glossiness: High
Edge Transparency: Opaque
Smoothing: On

These settings can vary, of course, depending on your lighting and scene.

The glass of the lava lamp has the following surfaces:
Surface Color: 32,140,254
Luminosity: 30%
Diffuse: 85%
Specularity: 100%
Glossiness: High
Transparency: 80%
Color Filter: On
Refractive Index: 1.43
Edge Transparency:

Normal
Smoothing: On

One other thing I’ve been doing when animating plastic or glass is reflecting that good old fractal reflections image by about 15 percent. The base is a silver metal surface, with my own reflection map made in Photoshop. If you don’t have anything other than the default silver surface supplied with LightWave, use it, but with variation. Change the 100 percent reflection to about 45 percent, and change luminosity to about 55 percent. This gives it a bit more realism. You may want to add some fractal noise to dirty it up if you don’t have an image map to do so. The cap is also a silver/metal surface, but I gave it a slight bump map to mimic plastic.

Finally, in the Camera panel, select Trace Shadows and Trace Refraction.

Lighting this puppy takes two lights. A point light, set to around 200 percent, is placed in the base. Because I chose to cut holes in the base, the light will filter out.

The next light, set to 350 percent, is placed at the base of the glass lamp. I used a point light that was set as a bright aqua-blue color to match the real lamp.

From this point, you can vary your lighting as you see fit. At times, the main lava light was up to 450 percent, depending on what the background was. Remember, the lava lamp is glass, and you do see through it.

Although not complex in its design, the output can really spice up your demo reel. A lava lamp is something not often seen animated. Simple to build, simple to animate, but it looks cool. That’s LightWave for ya! See you next time.

Dan Ablan is president of AGA Digital Studios in Chicago. AGA uses three LightWave workstations to create graphics and animations for video, corporate and broadcast productions and Internet graphics. Reach Ablan at dma@mcs.net.