Classic Computer Magazine Archive COMPUTE! ISSUE 144 / SEPTEMBER 1992 / PAGE A18

The 3-D art. (three-dimensional computer graphics)(part 1)
by Steven Worley

The Amiga is known best for its graphics capabilities. In 1985 when it was introduced to the world, its standard 4096-color display was revolutionary. Today, 4096 colors are nothing to brag about, but the Amiga is still best known for its graphics, animation, and video capabilities.

Over the past seven years, many different genres of graphics have been born on the Amiga. The original DeluxePaint was an artist's tool, better than any other paint program on any personal computer at the time. The speed of the Amiga's animation was demonstrated with the classic demo of a bouncing checkered ball. The Boing! demo was so memorable that it became the symbol of the Amiga. One demonstration was particularly unique. An animation called The Juggler, by Eric Graham, showed a figure that was made of shiny chrome spheres and that was juggling three reflective balls. This animation was made with a custom program that uses a technique called ray tracing that produces very realistic images of a three-dimensional world. This custom program was enhanced and became the commercial product known as Sculpt 3-D, which utilized a 3-D world to make its images. This capability had previously been limited to the high-end computers that were using expensive software. The growing power of personal computers (and constant improvement of 3-D graphics algorithms) suddenly made this new method of image generation available to the masses.

Today there are a wide number of 3-D programs available. Imagine, Lightwave, 3-D Professional, Animation Journeyman, Caligari, Draw 4-D Professional, and Real 3-D are all current commercial products, and there are many public domain and shareware programs such as DKB Trace, Rayshade, and Radiance.

Both the quality and capability of 3-D software evolved very quickly as users demanded new features and voted with their software dollars. Today, the Amiga is the leader in producing 3-D images on personal computers, in many cases competing directly with specialized workstations (mostly from Silicon Graphics) costing tens of thousands of dollars and designed specifically for 3-D rendering.

What is 3-D? The images from 3-D programs are produced in a manner that's almost completely different from the way that flat 2-D pictures are produced. (The 2-D pictures are usually "hand-drawn" with a mouse.) The 3-D programs work by defining an entire 3-D world and then taking a "picture" of that world from some viewpoint, just like a photographer would take a flat 2-D picture of a real-life 3-D scene. For the computer, the 3-D scene isn't real; it's a mathematical model. This may seem needlessly complex, but defining a 3-D world mathematically is very difficult. You have to specify the shape, color, texture, position, size, and orientation of each object in the scene. You also have to place lights and set up a camera within the program. It might seem a lot easier just to draw a final picture by hand, since defining everything in 3-D seems like over-kill--you never see the back of an object, so why bother defining it?

This extra work is necessary since an entire 3-D world is being defined, not just a single image. This complexity also has several other benefits. The extra information can add subtle details that can make a startlingly realistic image. Reflections and shadows are accurate, appearing as they would in real life. Perspective and relative sizes of objects are always correct. Perhaps the biggest benefit of defining an entire 3-D world is that once it's defined, you have the ability to control exactly which view of that world is shown. You don't have to redefine all of the objects if you want to make a new image from a different vantage point. You move a virtual camera to a new position in the 3-D universe and then tell the computer to redraw the entire scene from that perspective just by clicking on a gadget or two.

This also means that animations are easy to create. Since you don't have to redefine everything for every frame, making an animation isn't much harder than making a still frame. Also, the motion of the animation will be accurate; 2-D animators sacrifice realism for practicality and usually use layers of images moving at different speeds to simulate even the simplest types of camera motion. Since the computer does all of the drawing in 3-D, you don't have to resort to the tricks that 2-D animators use to avoid redrawing new images for every frame, and you can make any motion you like.

Three-dimensional mechanics. Most 3-D programs have the same basic structure. The goal is to define a 3-D world, which involves building objects and placing them in a scene. Lights are added to the world, and a camera is placed from where the view of the scene should be. This is arguably the most involved step in building the objects.

These objects have to be defined in a way that the computer can understand. You can't just draw a shape and expect the computer to understand how much physical volume that shape represents. Instead, most programs define several simple shapes called primitives. These are shapes that the program knows how to draw. You assemble many of these shapes to define the objects. For example, you might think of building a snowman out of many stacked spheres. If the program can render a sphere, it can render a snowman.

A more common primitive is a simple flat polygon, such as a triangle. A flat shape like this might not seem very useful, but it's actually very versatile. Instead of defining objects by gluing together solid volumes like spheres, it's possible to define only the outside layer of an object. A solid cube could be defined by six flat squares. The squares define the boundaries of the solid, which are all the computer needs to know to draw a picture of it.

Most object definition is done this way, using flat polygons. Any shape can be represented by creating it from tiled polygons. Even curved surfaces can be reproduced decently if the computer is told to use a special method of shading the faces to hide the polygonal nature of the surface. The complex ocean scene shown in the figures accompanying this article is built completely out of triangles. The rendered version of the same scene shows that, indeed, real objects can be accurately represented by these simple flat shapes.

Building objects is a process of using different tools in the different 3-D programs to define these surfaces. Also, the object colors, and general surface appearance need to be set. Finally, the scene itself is defined by placing the objects in the proper locations.

The final step in 3-D rendering turns you from a sculptor into a movie director. What sort of lighting is appropriate? Where should the camera be positioned to get the view you desire? How are the objects going to move in time? This is the fun part of 3-D design, since you can make hundreds of different images from a single scene. Unfortunately, it's also the slowest part of the process.

It's slow because 3-D rendering takes a lot of computing power to generate a single picture. The Amiga has to make millions (sometimes even billions!) of calculations for just one image. You may know Amigans with what seem to be outrageously expanded systems, with 18MB of memory and the latest accelerator boards. You don't need this kind of system for running word processors, titling videos, or playing Lemmings! For 3-D rendering, however, these powerful systems are actually used effectively. When people talk about taking a whole day to render a single picture, they aren't exaggerating. Even on the very fastest systems, taking several hours to render a frame is commonplace. The art of 3-D is expensive, both in time and equipment, but the final output is worth the investment.

Looking ahead. This column is the introduction to a series of tutorials aimed at teaching the basics of 3-D graphics. Beginning next month, we'll begin exploring Amiga 3-D software packages. The series will concentrate on using Impulse's Imagine, but we'll look at other software as well. Creating worlds in 3-D is a complex but exciting form of art, and this series is intended to become a useful guide and introduction to the exciting world of 3-D graphics.

Steven Worley is a well-known Amiga artist and writer. Worley is the winner of the 1992 AmiExpo 3-D Art competition and author of the reference book Understanding Imagine 2.0.

This columnn is the first in a 12-part tutorial series designed to teach the fundamental aspects of creating 3-D graphics on the Amiga.