-by Kelly Murdock
As you work in 3D graphics, you will begin to notice an interesting fact: No matter how advanced your 3D image is, there's always something cooler. It's all part of the ever-developing nature of computer graphics.
Now that you've gotten the basics out of the way, you can move on to some more advanced modeling and rendering techniques. Keep in mind that advanced techniques are all relative. What's advanced to the newbie doesn't help the seasoned 3D artist.
In this chapter, you'll continue where you left off in Chapter 4, "Creating and Embedding 3D Rendered Images," and explore several miscellaneous topics that may be of interest. This is what you have to look forward to:
Now that you have your laundry list, get out your pencil and check these topics off as you cover them.
Using primitives and borrowed models is definitely the easy way to build a scene. They usually require just pressing a single button or issuing a solitary load command. Deforming models doesn't take much talent either; everyone learned to do that with clay in kindergarten. So how do you go about modeling from scratch? Well, start by learning modeling terms, such as sweep, lathe, and skin.
You'll start this chapter off using Ray Dream Studio. Not that you couldn't use trueSpace, but you want to broaden your skills, and this is a great way to do it. Ray Dream Studio is especially good at modeling from the ground up. First, start with sweeps.
Remember back in Chapter 3, "Adding Simple 3D Elements to Your Web Page," when extrusions were explained? Well, extrusions don't always have to be along straight lines.
To sweep an object is to move its cross section along a path, and an extrusion is the simplest sweep case. In Ray Dream Studio, the Free Form Modeling Window is where most of your custom modeling takes place. Take a look at an example:
Figure 8.1 : Sweeping the letter J in Ray Dream Studio's Free Form Modeling Window.
Tip |
You can select preset views to look at only one plane at a time by using the View | Preset Position menu command. |
There are a lot of options when sweeping, but they're all based on the same simple concept.
Lathing creates objects by rotating a profile around the center axis. If you remember how the wood lathe back in shop class worked, you've got the right idea.
Two things are needed to perform a lathe: an outer profile and an axis to rotate around. However, you don't need to rotate the full 360 degrees, as you do with a wood lathe. You can rotate only part of the way, so it's easy to create a full watermelon, half a watermelon, or just one slice.
In Ray Dream Studio, you'll use the Free Form Modeling Window again to perform a lathe. The profile is referred to as a Scaling Envelope. Just like wood shop, try creating a baseball bat for old times' sake.
That's all there is to it, and no wood chips. The finished bat is shown in Figure 8.2.
Figure 8.2 : Your completed lathe-a baseball bat.
If you start to use sweeps and lathes, you'll soon find that they are useful for creating simple models, but many objects don't have a common cross section throughout. Most objects have different cross sections along their length. These types of objects can be modeled using a process called skinning.
Skinning is sometimes called lofting, after the process used to build ships. Ship builders would arrange the cross sections of the ship along its length and then fasten the ship's surface to these cross sections.
In Ray Dream Studio's Free Form Modeling Window, you can create several different cross sections and the surface will smoothly move from one to the next. Try creating a screwdriver as an example:
Drawing planes aren't limited to only one cross section per plane; they can have multiple cross sections. The Sections | Show Shapes Numbering command lets you see which cross sections are connected. Double-click the number to change the association. Figure 8.3 shows two shots of the final screwdriver.
The individual parts that are built using the Free Form Modeling Window can be combined into a hierarchy to create complex models. The windmill, taken from the Ray Dream CD-ROM, shows in Figure 8.4 an example of a complex model created entirely from primitives and free-form modeled parts. By double-clicking on a part or on its name in the hierarchy list, you can launch the part into the Free Form Modeling Window for editing.
There are more ways to model, which are covered later in the chapter, but while you have Ray Dream Studio open, look at some render settings that can add realism to your images.
No, this section doesn't talk about recycling or how you should use bicycle models instead of cars to save on pollution. In 3D packages, environmental settings are special commands you give to the render engine that affect the way the image is rendered. Examples include reflection maps and fog effects. Each package will call these settings something different. Ray Dream Studio refers to reflection maps as reflected backgrounds.
In Chapter 4, you learned how to add backgrounds to your images. They acted like backdrops that enhanced the image, but didn't really affect the models in the scene. Reflected backgrounds are images projected from all sides toward the models and are reflected off any reflective objects within the scene.
Reflected backgrounds are also sometimes called Environment Maps. They can add a great deal to your images without requiring many additional models and can be used as an alternative to ray tracing in some cases. Take a look at how Ray Dream Designer uses reflected backgrounds.
Figure 8.5 : A balloon in the sky showing the cityscape below in a reflected background.
Tip |
Reflected backgrounds show up best when reflected off a model with a large smooth surface area, such as an apple, a car fender, or a window. |
Tip |
Because of the time it takes to render a scene, you may want to render it using the Low Res Preview option to check the image before it starts the final rendering. |
There are other environmental settings you can add to your scene. One that frequently shows up in 3D packages is the ability to add fog to your rendered scene.
The fog settings for Ray Dream Studio are also added by using the Render Effects dialog box:
Figure 8.6 : A raptor in the early morning forest, complete with misty fog.
Within the Render Effects dialog box, there are other environment settings, such as Ambient and Backdrop. Other packages have unique features also, but they all work in roughly the same way, by manipulating the settings before rendering.
Imagine the following scenario. You've completed your scene, you've got the models in just the right positions, and you've previewed the image a number of times-finally, it's perfect for your Web site. However, after rendering all night, you realize it needs just a little more light in that one area, or you think of another effect that will increase the coolness factor by 14.
This is a common occurrence for 3D artists. Seldom does an image turn out perfectly on the first render. I suggest you do a lot of preview renders, but even those can't see everything. Now for the glimmer of hope. Sometimes you can correct small mistakes and even enhance your image in ways that weren't possible using your 3D package, with help from an image-editing package like Photoshop.
A good example would be in adding some text on top of the rendered image. This can be difficult to line up in the 3D scene, but it's easy to add in Photoshop. Take a look at the following example:
Just as you are starting to get the hang of two different 3D packages, you're going to shift gears again. Why, you may ask? Different packages use different modeling paradigms. You've learned about the most popular types, but there are others.
trueSpace and Ray Dream Studio are both polygonal modelers, which means that all their models can be broken down into lines and polygons. This works well and can represent any shape you could want, but there's another way to model-using splines and patches.
Splines were introduced in Chapter 4 when paths were covered. Splines have the unique benefit of being easily controlled. To bend a polygonal line, you need to add more points and create a contour. To bend a spline, you simply need to move the control point handles. Therefore, a curved polygonal line takes many points, but a curvy spline needs only four points, or two points and two handles. This is far fewer points that the computer has to deal with, resulting in simpler models with more curves.
Many high-end modelers use spline-based models because of the control it gives them over models, but there's a 3D spline-based package that fits in your price range-Martin Hash's 3D Animation. I will refer to the product from here on as MH3D for simplicity's sake.
You'll use this package to introduce spline-based modeling and to show you how it can help create character models where curves come in handy.
You can model many different things, but modeling characters is perhaps one of the most popular, and difficult, tasks. Most entertainment centers around characters. Whether they're watching TV, cartoons, or sports stars, people like to identify with characters who have a definite personality, whether it's good or bad.
Try smiling at yourself in the mirror. See how your skin smoothly folds back into your cheeks as you grin? This action is very difficult to simulate with polygonal models because the computer has to compute how the polygons smooth from one polygon to the next. For tight curves, like right next to your lips, it's difficult for the renderer to tell whether the edge should be smooth or hard. This is where splines come in. Splines inherently "know" whether an edge is hard or smooth because that's how they are built. This ability means the computer doesn't have to guess how to smooth a polygon, so it's much easier to render and results in a better model.
MH3D excels at creating animations. In fact, to use the modeler, you need to define a path first. You'll get into the animation side of MH3D in the next chapter, but for now, examine the program to see what those splines and patches are all about.
Now you'll create a simple character named Clumgy by using MH3D. I don't know what kind of personality Clumgy will have, but with splines, he'll be able to smile very nicely.
Tip |
MH3D is much easier and quicker to use if you learn some of the basic keyboard commands. Almost every command has a single keystroke that invokes an action. For example, holding down the Z key lets you zoom in and out of the scene with the mouse. |
Tip |
Check out the model by clicking on the Preview tool (keystroke Q) in the top toolbar, then clicking in the window. A shaded view of the head begins to render. |
Your character's shown in the three different windows of MH3D in Figure 8.8. He isn't really that handsome, but not bad for a spline-modeled character with marshmallows for eyes and a pickle for a nose.
You've learned how to model with polygons and patches, so now look at another fairly new method called metaballs. Metaballs are like the equivalent of sticky spheres of clay. They're especially good at modeling rounded surfaces since they're made of spheres.
Isolated metaballs look just like normal spheres, but when they're placed next to one another, the surface of one flows into the surface of the other, much like drops of mercury. You can control the level of attraction between the surfaces.
Several programs, such as StudioPro, are beginning to offer metaballs as a modeling option. Take a look at how metaballs can be used in the following example:
Figure 8.9: Bubble man before and after being converted into metaballs.
If all these lines and points and axes are just too confusing, you might want to look into another new modeling technique. PhotoModeler takes regular photographs that have been scanned in and uses visual keymarks to create a model.
The models created with this technique aren't extremely detailed, but by using the photos as texture maps to cover the surfaces, the models end up looking quite good. Because of the low polygon count, these models are especially handy for creating VRML worlds, so remember that when you start to create VRML worlds.
Now look at how PhotoModeler can be used to create a simple model of a computer monitor:
There are many more features to this program, such as applying surfaces and checking the accuracy of the model. The finished model for this example is shown in Figure 8.10.
Figure 8.10 : A simple 3D model of a Computer monitor created from photographs.
As you look into all the 3D packages (see appendix A, "3D Software Resource Guide"), you'll see that some produce only certain kinds of models. Two good examples are VistaPro, which creates landscapes, and Fractal Design's Poser, which creates only human models. Poser is covered in the next section.
Scenery can be very relaxing and inspiring, and many photo albums are made up of such pictures. So it's only natural for 3D modelers to want to create such images. Lucky for the modeler, there are several good packages especially designed for this type of modeling, such as Virtual Reality Laboratories' VistaPro, Metatools' KPT Bryce, Questar's World Construction Set, and Animatek's World Builder.
These packages usually start with a 2D grayscale image in which the darkness relates to the height, so the blackest areas would be the highest peaks and the white areas would be the lowest. This feature makes it easy to create gradually ascending mountain sides by using a 2D image with a gradual transition from white to black. It also makes it easy to add random peaks.
One of the toughest problems with creating scenery is including foliage. It's simple to create desolate moonscapes, but creating a rich, lush mountain scene is much more difficult. Some of these packages include details like trees, shrubs, and flowers that can be added to the terrain. You can further define the range of these details so that they're not visible from far away, but show up with greater clarity as you get closer. An example of the type of images these packages can create is shown in Figure 8.11.
Figure 8.11 : A sample picture created using Animatek's World Builder software.
Think of how the Greeks modeled the human body. Their statues took many months to create, but were detailed and impressive. Today, computer artists find many places to use models of human figures. Whether in an architectural scene or a recreation of a historical event, human models can add a personal touch to any 3D scene, but only if they look realistic.
There are 3D human models available, but they can be difficult to use if you try to reposition them, so you end up getting a human model that's standing, one that's sitting, one that's running, and one that's jumping-or you get Fractal Design's Poser.
Poser lets you choose from several human types-male, female, hero, and mannequin-and from several different heights, such as baby, toddler, and adult. Once you've selected your model, you can position it by using inverse kinematics. To make your model do aerobic knee lifts, just grab its knee and pull it up. Follow these steps to see how this works:
Figure 8.12 shows the figures in a ballet step-and don't worry, Poser supports texture mapping, so you can add clothes to your models. If you plan on working with human models often, Poser is a great tool and easy to use. You can also export your models as DXF files to be imported into other 3D packages.
You're probably starting to notice that the features of all these different packages vary quite a bit; no one package has exactly the features you want or need. The truth is that 3D artists typically use a variety of tools. This raises the question of how you can load one model into another without losing any of the information-that's where conversion utilities come in.
Almost every 3D package has its own proprietary file format. Each package can import and export several different formats, but it's often difficult to move between packages. Some import and export functions have difficulties with certain formats and may lose material or hierarchy information.
To move a 3D file between formats, you might need to convert it a couple of times. Moving a Ray Dream Studio file to trueSpace requires exporting the Ray Dream file as a DXF or some other generic format and importing it into trueSpace. In Figure 8.13, you can see the results of file conversion. Two images on the left, the top one created in Ray Dream Studio and the bottom in trueSpace, were converted to the other program. You can see that conversion doesn't always give the best results.
With the introduction of VRML as a new file format, many 3D programs are introducing an export feature to VRML. Chapter 13, "Exploring VRML Browsers and Development Tools," covers a number of specific VRML conversion programs.
Several programs are available that handle file conversion. One of the best file-conversion pieces of software is produced by a company called Okino. The product is the NuGraf Rendering System. Not only is it a full-fledged RMA, but it can import and export more file formats than any program I've seen.
Look at how NuGraf's batch conversion feature works:
The NuGraf Rendering System also has a fast, efficient renderer and many advanced features, such as a tip-of-the-day box, model optimization commands, and unlimited texture layering. You can see its interface in Figure 8.14.
Figure 8.14 : A screen shot from the NuGraf Rendering System program.
The purpose of this chapter wasn't to scare you, but to show you the broad scope of technologies involved in working with 3D graphics. Every year there are new and better techniques introduced that make the process easier and push the envelope of what's possible.
So where do you go after learning about creating advanced rendered images? Actually, anywhere you want, but I would recommend the following:
If these technologies are changing so much, where can I go to find the latest technologies? | |
There are a variety of books, magazines, and resources on the Web that cover these issues. This book's CD-ROM has a resource guide to get you started.
Perhaps the best forum for keeping up on computer graphics is the annual Siggraph convention held early in the fall. Each year researchers, exhibitors, and artists gather for a week-long conference in which the latest and greatest in computer graphics are presented. If you're interested in computer graphics, don't miss this show. You can find information about the conference at http://www.siggraph.org. | |
I really want to use the features you've mentioned in this chapter, like metaballs, particle systems, and terrain generators. Do I have to buy an entirely new product to get these features? | |
Luckily, you're not alone. Many good shareware programmers have grown weary waiting for the latest features to appear for their favorite modeler, so they've written shareware programs to use some of
these features.
Examples of some of these shareware programs are on the CD-ROM. Check out Blob Sculptor for metaball functions and Landscape Maker by Kevin O'Toole for terrains.These tools and many others can be found at the Avalon site at http://www.viewpoint.com/avalon. Another good shareware tool is Exploder by Rob Bryerton, which creates particle systems for trueSpace. It can be found on the Caligari site at >http://www.caligari.com. | |
You've mentioned splines in this chapter, but I've heard there are different kinds of splines. Is this true? | |
Yes, there are a number of different types of splines, each with its own advantages. The major difference is in how you control the curvature. The mathematics behind the curves cause them to behave
differently.
Bezier curves were one of the first types to show up in typefaces and drawing packages like CorelDRAW!. Another type you'll see in the CAD world is NURBS, which stands for "non-uniform rational b-spline." Some 3D packages are starting to use NURBS |