F

Here is where the computer is not just a "stupid machine"
Scroll Up
start.. image1
 
image2
 
image3
 
image4
 
image5
 
image6
 
image7
 
image8
 
image9
 
image10
 
end.
Scroll Down

// this tells jquery to run the function below once the DOM is ready $(document).ready(function() { // choose text for the show/hide link var showText="Show the hidden text"; var hideText="Hide the text"; // create the toggle link $("#hide_this").before("

"+showText+""); // hide the content $('#hide_this').hide(); // capture clicks on the newly created link $('a#toggle_link').click(function() { // change the link text if ($('a#toggle_link').text()==showText) { $('a#toggle_link').text(hideText); } else { $('a#toggle_link').text(showText); } // toggle the display $('#hide_this').toggle('slow'); // return false so any link destination is not followed return false; }); });

Showing posts with label SW:Graphics And Video. Show all posts

How Video Editing Works

Browse the article How Video Editing Works
Introduction to How Video Editing Works
You may have seen TV commercials and magazine articles that talk about the "dawning of the new age of personal video." It is an age in which anyone can sit down at a home computer and produce a studio-quality motion picture. All you need is a video camera, the right software and a desire to create something. With today's camera and computer technology you can:
  • Create a really nice rendition of your summer vacation -- far better than "home movies"
  • Produce an unbelievable video presentation for work
  • Create a full documentary film on any topic or issue you wish to promote
  • Create your own multi-million dollar blockbuster movie, just like The Blair Witch Project
That's the idea, anyway. If you have ever tried to sit down and do it yourself, however, you know that it's not as easy as it looks. In fact, with the more advanced software packages, it can be nearly impossible to get started because they are so complicated. For example, when you open Adobe Premiere -- a video editing software package -- you are faced with this initial dialog box:

Adobe Premiere opening dialog box
The opening dialog in Adobe Premiere is not for the faint-of-heart. See more video-editing program screencaps.
If you have ever thought about producing your own high-quality videos on your computer, but haven't gotten started either because you didn't know where to start, or because it all seemed WAY too complicated, then this article is for you! In this article, we will dive deep into the world of home video editing. You will learn:
  • What is possible
  • What you really need -- in terms of equipment and software -- to make it happen
  • The concepts you have to understand in order to use any of the popular editing packages
Plus, you will learn how to download and set up a free demo version of Adobe Premiere so that you can try out all of these concepts on your own! At the end of the process, you will be surprised to see just how much you can do with today's technology and how easy it is to get started. If you have a camcorder, then you know that it is easy to create home video. You simply point and shoot. However, if you have ever played back what you shot and looked at it, then you know how hard it is to create good home video with nothing but a camera. Even if you are extremely careful when shooting, you usually end up with a lot of "junk" on the tape. When you play it back, it looks like a "home movie" -- amateurish, disjointed, confusing, lousy sound...
Because most of us watch so much television and see so many movies, we tend to have fairly high standards when we watch anything on video. We now expect the following features in almost everything we watch:
  • A title at the beginning
  • A set of "shots" cut together in a nice way to tell a story A shot is a specific subject filmed from a specific angle. For example, if you are telling the story of your son's birthday party, different shots from the event might include:
    • a shot of the cake
    • a shot of the presents before they are opened
    • a shot of the kids at the party sitting at the table
    • a shot of your son blowing out the candles
    • a shot of your son unwrapping a present
  • A fairly high number of shots If you watch any regular TV show, you will see that it is rare for the camera angle to stay the same for more that 10 or 15 seconds. The director will cut between different angles to keep things interesting or to make different points. For example, the screen might show a man's face while he's talking for five seconds, and then switch to a shot of his hands holding a tissue (while the sound track continues uninterrupted with him talking) to show the emotion.
  • Interesting transitions between the shots For example, some shots might fade into others, some might spin into others, and some cut very simply from one to another in a quick chain.
  • A decent soundtrack, often involving narration and/or background music
  • Perhaps static shots (like a chart or graph) mixed in with the normal video
  • Titles or legends on some of the shots to identify people, places and things
  • Slow motion or fast motion to change the tempo
Even if you are trying to present something as simple as your family trip to the zoo, it is nice to include as many of these features as possible in your rendition of it. The more features you add, the more professional your work looks and the more attractive it is to your audience. The good news is that, with just a camera, a computer and a piece of video editing software, you can create video masterpieces that include all of these features.
There are a million different ways to do video editing. You can buy a complete solution from a company like Avid at the high end, and at the low end you can use your camera and a VCR to cut things together. The solution that we are going to discuss in this article involves three different parts:
  • A digital camcorder that has a FireWire (IEEE 1394) connection
  • A desktop or laptop computer, also equipped with a FireWire connection
  • A piece of video editing software
Let's look at each of these parts in turn.

Digital Camcorders
There are hundreds of digital video cameras, or camcorders, on the market today from manufacturers like Sony, Panasonic, JVC and Canon. Most of them use what are known as MiniDV tapes like the one shown here:
MiniDV tape
The MiniDV tape is used in most digital camcorders.
Just about every camcorder based on the MiniDV tape format includes a FireWire (IEEE 1394) port on the camera so that you can load the video onto your computer quickly and easily. The following three cameras are typical of digital camcorders on the market today.

a Hi-8 camcorder
This is perhaps the least expensive digital camcorder on the market today. It uses Hi-8mm tapes instead of MiniDV tapes, but records on them digitally. This kind of camera is very handy if you have a lot of analog 8mm or Hi-8 tapes that you want to load into your computer. The camera will convert an analog tape and run it out through the FireWire port on the camera, or record in digital format onto new tapes. The only problem with some of these cameras is a fairly low resolution.

a MiniDV camcorder
A typical MiniDV camcorder -- it has a 1-megapixel CCD that gives it great image quality. Consumer camcorders now have up to 1.5-megapixel CCDs.

an entry-level professional camcorder
This is an entry-level professional camcorder with three CCDs. It records onto DV-CAM or MiniDV tapes. It can produce broadcast-quality images and has professional features like XLR inputs and zebra stripes.
Whichever type of camera you pick, it needs to have a FireWire connection so you can hook it to your computer. A FireWire connection normally looks like this:

a FireWire connector on a digital camcorder
This sort of FireWire connector is common on digital camcorders. You attach a FireWire cable to this connector, and attach the other end to your computer.
Next, we'll learn about computer requirements and the software.

Video-Editing Computers
You can use just about any desktop computer for video editing, as long as it has:
  • A FireWire port to connect the camera to - If your computer does not have a FireWire port, you can buy a FireWire card and install it for less than $100.
  • Enough CPU power, hard disk space and bus bandwidth to handle the data flowing in on the FireWire cable
Video processing in general uses lots of CPU power and moves tons of data on and off the hard disk. There are two different places where you will most feel the benefits of a fast machine and the sluggishness of a slow one:
  • When you render a movie that you have created or write it out to hard disk, you will definitely feel the speed of the machine. On a fast machine, rendering and writing can take minutes. On a slow machine it can take hours. You will learn more about rendering later in this article.
  • A more important issue comes when you are reading data from or writing data to the camera. When the video data stream is coming in from the camera through the FireWire cable, the computer and hard disk must be able to keep up with the camera or the computer will lose frames. When sending a completed movie back to the camera, the processor must be able to stream the data quickly enough or the camera will lose frames.
I have one Pentium 3 machine running at 500 MHz, with 512 MB of RAM and a decent 20-GB hard drive. It is right on the edge of being able to handle the data stream from the FireWire connection. It can not handle it if any other applications (like an e-mail program) are running. A Pentium 4 machine or a late-model Mac with 512 MB or 1 GB of RAM and a big hard disk is a nice machine to have when you are rendering and writing files. The Software
There are many software packages available for editing video on your computer. Windows XP even ships with software that's built into the operating system. Machines from Sony and Apple have software that comes with the machines.
In this article, we will use a software package called Adobe Premiere to demonstrate the video editing process. We are using Adobe Premiere for two reasons:
  • There is a free demo version available on the Web, and it will run on both PCs and Macs. Click here to download a copy.
  • Adobe Premiere is a full-featured and well respected video editing package that can do almost anything you would want to do.
In order to use a package like Adobe Premiere, you need to understand several basic concepts. Once you understand those basic concepts, however, the whole process is remarkably easy. After you are familiar with the fundamentals, it is extremely easy to expand your repertoire to include all sorts of advanced techniques. Next, we'll look at the four most important concepts you need to understand from the start.


Video Editing: Basic Concepts
So far, we've discussed the equipment you will need to edit video. Now let's learn the basic concepts you will need to know in order to use that equipment. Capture
The first concept is called capture. You have to move all of the footage out of the camera and onto your computer's hard disk. There are three ways to do this:
  1. You can capture all of the footage in a single file on your hard disk. A half hour of video footage might consume 10 gigabytes of space. (Note that some operating systems and video editing software packages limit file size to 2 gigabytes. Other packages put a 30-minute limit on file size.)
  2. You could bring it in as five or 10 smaller files, which together will total 10 gigabytes but will be a little more manageable.
  3. You can have a piece of software bring in the footage shot by shot. Adobe Premiere can do this manually, but a program like DVGate Motion (which comes standard on many Sony computers) can automatically scan the tape, find the beginning and end of every shot, and then bring them all in. Each shot will be in a different file when it's done. If you have access to a program like this, it makes your life very easy.
If you have just a few minutes of footage, technique #1 is the way to go. If you have an hour of footage, techniques #2 and #3 are useful. AVI and MOV files
The capture process will create AVI (on the PC) or MOV (on the Mac) files on your hard disk. These files contain your footage, frame by frame, in the maximum resolution that your camera can produce. So these files are huge. Typically, three minutes of footage will consume about 1 gigabyte of space. You can never have enough disk space when you do a lot of video editing. The Mac we use here at HowStuffWorks for most of our editing has almost 300 gigabytes of fast SCSI disk space, and Roxanne is always having to archive stuff off of it to make room for the new material we are working on.
Shots
Once you have all of your footage into your machine, you need a way to select the parts that you are going to use. For example, let's say that you want to include a scene in your birthday movie that shows the candles on the birthday cake being lit. You filmed this activity from three angles and have three minutes of raw footage total. But in the final movie you are going to have 15 seconds of the movie devoted to this scene, in the form of three shots:
  • A 3-second shot showing a match being lit
  • A 5-second shot showing a close-up of one candle on the cake being lit
  • A 7-second shot of the cake with all the candles lit being carried into the room
Out of the big file of all the footage, you need a way to mark the beginning and end of these three little clips so that you can move them around as individual units and bond them together into the final scene. You do this by looking at the raw footage and marking an IN and OUT point for the little sections that you want to use. Then you drag these little clips onto the timeline.
Timeline
Once you have your shots figured out, you need a place to arrange them in the proper order and hook them together. The place where you do that is called a timeline. You line the shots up in sequential order. Then you can play them as a sequence.
With just three concepts -- capture, shots and timeline -- you can make a movie. It will not be fancy, but it will be 10 times better than watching raw footage. Let's run through these steps and create a movie with them.


Running Adobe Premiere
Once you have installed Adobe Premiere on your PC or Mac, (see this page to download a free demo version), start the program. The first thing that you will see is this dialog:
Adobe Premiere opening dialog box
You can click OK here and move on to the next step, but if you'd like to understand what this dialog is talking about, here's a quick description:
  • This dialog is a complex way of letting you tell Premiere how your camera records raw footage. There are two parts to the equation -- the video resolution and the audio sampling rate.
  • If you have a camcorder that uses MiniDV or DV-CAM tapes, then your camera is taking images at 720 x 480 resolution. You would choose from one of the first two blocks (DV - NTSC or DV - PAL) depending on whether your camera is NTSC or PAL. The United States and Canada use NTSC, and Europe and Asia use PAL.
  • Then you have to pick whether you shot your raw footage using standard format or widescreen (16:9) format.
  • Then you have to choose the audio sampling rate. The easiest thing to do is look in your camera's manual, but 48 KHz seems to be standard for most MiniDV camcorders.
If you are using a MiniDV camera in the United States and you are shooting standard rather than widescreen, then the default that Premiere chooses is correct. Otherwise, choose an appropriate option for your situation. Once you get past the Project Settings dialog, you come to the main working screen of Premiere, which looks something like this:

Adobe Premiere main working screen
The main working screen for Adobe Premiere
There are five different areas on the screen that are important.
  • The Project Area
    Adobe Premiere project area
    The project area
    The project area keeps track of all of the different AVI/MOV files containing the raw footage that you are using to create your movie. In this illustration, the project area has had five different files imported into one bin. Each file is a piece of raw footage: one of a cougar, one of an elephant, and so on. A bin is just like a folder -- it is a collection of things.
  • The Monitor Area
    Adobe Premiere monitor area
    The monitor area
    The monitor area has two video windows. The left window, called the Source window, let's you look at different AVI files so that you can identify the IN and OUT points for the clips you want to use. The right window, called the Program window, lets you view your movie as it develops on the timeline. Both have standard controls to play, stop, repeat and so on.
  • The Timeline Area
    Adobe Premiere timeline area
    The timeline area: Note that your timeline view may be different. Right-click on the timeline to change the preferences.
    The timeline area is where you assemble audio and video clips into your final movie. This timeline initially has room for two video tracks and three audio tracks, but it can handle dozens if you like.
  • The Transitions Area
    Adobe Premiere transitions area
    The transitions area
    The transitions area lets you choose different transitions so you can drop them on the timeline.
  • The Navigator Area
    Adobe Premiere navigator area
    The navigator area
    The navigator area lets you see your whole project at a glance, no matter how big it gets. It also lets you set the zoom level in the timeline area.
Let's look at the process of editing a video with Adobe Premiere.

Editing a Video: Capture and Clips
After you shoot raw footage with your camera, you need to load that footage into your computer. To do this, connect your camera to your computer with a FireWire cable. Select the Capture... option in the File menu of Adobe Premiere. You will see a window like this:
Capture dialog from Adobe Premiere
The Capture dialog from Adobe Premiere
The controls at the bottom of the Capture dialog let you control your camera. You can rewind, fast forward and play. Typically, what you would do is:
  • Hit the Rewind button in the dialog to rewind the tape in the camera.
  • Hit the Play button in the dialog to start playing the tape.
  • Hit the red Record button to start capturing the footage onto your hard disk.
  • When the footage is done playing/recording, hit the Stop button. Premiere will ask you for the file name that you want to use for this footage.
You can either capture all of your footage in one big file, or your can capture it in a number of smaller files. (Note that some operating systems and video editing software packages limit file size to 2 gigabytes. Other packages limit file size to 30 minutes. You also need to make sure that you have enough free disk space to hold all the captured footage.) Premiere will create AVI (on the PC) or MOV (on the Mac) files on your hard disk at a rate of about 1 gigabyte per three minutes of raw footage.
As an example, look at this piece of raw footage from the zoo:
The footage is 35 seconds long, and the AVI file that Premiere created when it captured the footage is 130 megabytes. We've converted the raw footage into an MPG file so that you can view it on the Web. It is typical "raw footage" with all sorts of debris and problems that you find in most raw footage. In the next section, we'll see how to clip out one usable piece from the raw footage. Clipping
Let's take the shot of the cougar from the previous section as an example (look at it here if you have a high-speed connection). It's a decent shot of a cougar lying on the ground for 30 seconds. In the middle of the shot the cougar yawns. Let's say that you would like to clip out the yawn and use it in your movie. To do this, take the following steps:
  • You first need to "import" the file containing the raw footage into the current project so that Premiere can use it. If you captured the footage in Premiere, then it was imported automatically. If not, choose Import... from the File menu and locate the AVI or MOV file you wish to add to the project. Adobe uses the concept of a "bin" to hold AVI and MOV files. A bin is like a folder -- it is just a collection of files. In complicated projects, you may have several bins that store different types of footage. Here's what you'll see after you import the footage:
    Adobe Premiere project area with five AVI files
    This project area has had five AVI files imported into one bin. One AVI file contains a cougar, the next an elephant, and so on.
  • Drag the cougar file from the Project window into the Source window.
  • Play it in the Source window to see what you've got by pushing the Play button.
  • Mark the IN and OUT points for a clip you want to use in the Source window.
There are several ways to mark the IN and OUT points. As you are playing the video, probably the easiest way is to hit the I and O keys on the keyboard when you see the IN and OUT points. Once you rough them in, you can fine-tune them with the mouse by dragging them.
video clip of a cougar yawning
Marking IN and OUT points in the Source window: The little green bar above the time code shows you which part of the raw footage has been selected for the clip.
Now that you have selected a clip, you can add it to the timeline.


Editing a Video: Timeline and Transitions
Once you have marked a clip by selecting the IN and OUT points in the Source window, you can add the clip to the timeline. Simply drag the image from the Source window down to the timeline. You will see something that looks like this:
video timeline with a single clip in it
The timeline with a single clip in it (Note that your view of the timeline may look slightly different. Right-click on the timeline and change the preferences to select your view of the timeline).
What the timeline now shows is that your movie contains one clip, about five seconds long.
Now what you can do is repeat this process and drag several more clips onto the timeline. You will end up with something like this:

video timeline with three clips in it
The timeline with three clips in it
This is the simplest possible movie -- a bunch of clips strung together on a timeline. But it is a movie nonetheless, and it is 10 times better than raw footage because you have chosen the best parts of the raw footage to assemble on the timeline. To play your movie, you can click the play button on the program portion of the monitor area, or you can click in the time portion of the timeline area to move the pointer and then press the space bar to start playing from that point.
Let's say that you would like to change the length of a clip once you have it on the timeline. There are several ways to do this:
  • You can drag either end of the clip on the timeline with the mouse.
  • You can use the razor blade (upper left corner of the timeline window) and cut a clip, and then delete either end by clicking on the end and hitting the delete key. Then you can right-click on the gap that you created and choose Ripple Delete from the menu that pops up.
Transitions
Sometimes simple cuts from one clip to the next work well, but other times you might want to use fancier transitions from scene to scene. For example, you might want to use a dissolve, or a wipe or a fade. Premiere has all sorts of transitions available. Simply choose one from the transitions area and drag it to a spot between two clips on the timeline:

Adobe Premiere transitions area
The transitions area contains dozens of transitions for you to try.
Once in place on the timeline, right-click on the transition to adjust it if you like. The transitions will look like this on the timeline:

video timeline with a transition in place
The timeline with a transition in place
When you play your movie, you will not be able to immediately see how the transition will actually look. That's because transitions take some extra processing to complete the effect. Premiere tells you that extra processing still needs to be done by putting a small red bar above the transition, as seen in the previous illustration. To activate the extra processing, you Render the timeline. From the Timeline menu, choose Render Work Area. When the processing is finished, you can play your movie to see the transition.
In the next section, we'll learn how to add music and sound effects to your movie.

Background Music and Narration
When you shoot your raw footage with your camcorder, it has a sound track. There are three reasons why you might want to supplement or replace the existing sound track:
  1. Many of the TV shows and videos you see today, and almost all movies, have a musical background during all or part of the action. Music can lend atmosphere and create a certain feeling. In the case of amateur production like we are talking about in this article, music can add a lot of professionalism to the finished work.
  2. An additional sound track is frequently used to handle narration. Most documentary and nature films use this technique.
  3. In many cases, the sound you record is unusable, or just not quite right, for the movie you are creating. For example, if a lion roars at the zoo and you capture the image, you may not be able to capture the sound because the lion is 50 feet away and you are using a zoom lens to film him. In that case, you'll want to substitute a better roar for the one you have.
To handle music, you have several options:
  • You can make up your own music and record it yourself. For example, I recorded this music loop using a little $45 keyboard by connecting its headphone jack into my computer's line-in jack. I used the Sound Recorder built into Windows to record it at 48K samples per second. Obviously you can get a lot more sophisticated than that, but it shows you how easy it is.
  • You can buy CDs full of royalty-free music loops and sound effects.
You can import many different types of sound files (including WAV, AIF, etc.) into a Premiere project and then position it on the timeline in Audio Track #2. Now when you play your movie, Premiere will automatically mix the original sound track of your movie with the new audio track and play it. To handle narration, probably the easiest thing to do is simply read your narration into the camera, and then capture the video as you normally would. You can separate the narration sound track from the video track and use the sound track. Simply drop the raw narration footage onto the timeline, right-click on it and select "Split Video and Audio." Click on the video portion and delete it. Now you have the narration sound track that you can lay on the timeline at the proper point.
Particularly with narration, timing the video with the audio becomes important. Once you have the narration sound track on the timeline, you can slice it up with the razor blade tool to either add gaps or delete sections to help with timing.
In a big project, it is not unusual to be working with half a dozen sound tracks. Premiere can manage an unlimited number of audio (or video) tracks. To add a new sound track, all you need to do is right-click on the timeline and select the Track option. Select to add a new track.


Split-edits
Any TV program or movie that you see today contains B-roll. In the vernacular, A-roll is raw footage where there is a person on-screen talking. B-roll is everything else. If you were to film a high school play, the raw footage would be almost pure A-roll. On the other hand, a nature documentary can be created with nothing but B-roll, and then a narration is laid over the top of it. If you are creating a movie that explains something, it is very common to use B-roll to provide close-ups of the thing you are explaining. You see this technique all the time in any video that HowStuffWorks creates. The process of cutting a piece of B-roll into a piece of A-roll is often referred to as a split-edit. For example, earlier in this article we talked about a scene where someone is talking on camera about an emotional topic. In the middle, the director cuts to a tight shot of the person's hands holding a Kleenex. During the scene, you see the person talking, then the Kleenex, and then return to the person's face, and the sound track is uninterrupted by the B-roll.
To add B-roll and create a split-edit in Premiere, you simply add the B-roll footage to the time line using video track 2. Premiere's protocol is to use whatever video is in the highest numbered track when playing the movie. For example, let's say you set this up:

video timeline with a split-edit in it
The timeline with a split-edit in it
You have the shot of the polar bear lying around. For contrast, you want to cut to a shot of two grizzly bears wrestling. You simply place the grizzlies on video track 2. When Premiere plays the movie, you will see the polar bears, then the grizzlies and then back to the polar bears.
In some cases, you want to completely discard the sound track of the B-roll. Right-click on the B-roll and select "Split Video and Audio." Then click on the audio portion and delete it. Or you may want to eliminate the sound in the original footage. We'll see how to do that easily in the next section.


Adjusting Video Sound
If the visual part of a movie is perfect but the sound is not, then the movie looks amateurish. Fortunately, Premiere offers sophisticated tools for getting the sound right. We've already discussed how to add new sound tracks to the timeline. Now you need to understand how to adjust each sound track so that everything sounds perfect. On every sound track, there is an arrow icon. Clicking it will expand the view and make an adjustment area for the sound track available, as you can see here:

Adjustment area for an audio track
Adjustment area for an audio track
In this adjustment area, you can add new control points simply by clicking anywhere along the red line. Then you move the control points by dragging them with the mouse. The control points control the level of the sound. For example, in the following illustration, the level of the sound in video track 1 has been taken to zero so that the sound on a split-edit is used instead:

Modifying the level of an audio track
Modifying the level of an audio track
What you will normally do is listen to the sound track and "even out" or "sweeten" the sound by adjusting things so that the sound is uniform throughout your entire piece.
It is important to mention that having a good microphone can really help sound quality, especially when you are filming someone talking. A good lavaliere microphone (the kind that you clip onto the front of the speaker's shirt) can make a huge difference. Lavalieres come in both wired and wireless versions. You will especially notice the advantages of lavalieres when you are filming indoors -- a lavaliere will completely eliminate the echoes and "booming" sound that you will frequently get from recording someone indoors with the camcorder's built-in microphone. Check out Shure's Wireless Microphone Systems for details.

How 3-D Graphics Work

Browse the article How 3-D Graphics Work
Introduction to How 3-D Graphics Work
You're probably reading this on the screen of a computer monitor -- a display that has two real dimensions, height and width. But when you look at a movie like "Toy Story II" or play a game like TombRaider, you see a window into a three-dimensional world. One of the truly amazing things about this window is that the world you see can be the world we live in, the world we will live in tomorrow, or a world that lives only in the minds of a movie’s or game's creators. And all of these worlds can appear on the same screen you use for writing a report or keeping track of a stock portfolio. How does your computer trick your eyes into thinking that the flat screen extends deep into a series of rooms? How do game programmers convince you that you're seeing real characters move around in a real landscape? In this edition of How Stuff Works, we will tell you about some of the visual tricks 3-D graphic designers use, and how hardware designers make the tricks happen so fast that they seem like a movie that reacts to your every move.

What Makes a Picture 3-D?
A picture that has or appears to have height, width and depth is three-dimensional (or 3-D). A picture that has height and width but no depth is two-dimensional (or 2-D). Some pictures are 2-D on purpose. Think about the international symbols that indicate which door leads to a restroom, for example. The symbols are designed so that you can recognize them at a glance. That’s why they use only the most basic shapes. Additional information on the symbols might try to tell you what sort of clothes the little man or woman is wearing, the color of their hair, whether they get to the gym on a regular basis, and so on, but all of that extra information would tend to make it take longer for you to get the basic information out of the symbol: which restroom is which. That's one of the basic differences between how 2-D and 3-D graphics are used: 2-D graphics are good at communicating something simple, very quickly. 3-D graphics tell a more complicated story, but have to carry much more information to do it.

Take a look at the triangles above. Each of the triangles on the left has three lines and three angles -- all that's needed to tell the story of a triangle. We see the image on the right as a pyramid -- a 3-D structure with four triangular sides. Note that it takes five lines and six angles to tell the story of a pyramid -- nearly twice the information required to tell the story of a triangle.
For hundreds of years, artists have known some of the tricks that can make a flat, 2-D painting look like a window into the real, 3-D world. You can see some of these on a photograph that you might scan and view on your computer monitor: Objects appear smaller when they're farther away; when objects close to the camera are in focus, objects farther away are fuzzy; colors tend to be less vibrant as they move farther away. When we talk about 3-D graphics on computers today, though, we're not talking about still photographs -- we're talking about pictures that move.
If making a 2-D picture into a 3-D image requires adding a lot of information, then the step from a 3-D still picture to images that move realistically requires far more. Part of the problem is that we’ve gotten spoiled. We expect a high degree of realism in everything we see. In the mid-1970s, a game like "Pong" could impress people with its on-screen graphics. Today, we compare game screens to DVD movies, and want the games to be as smooth and detailed as what we see in the movie theater. That poses a challenge for 3-D graphics on PCs, Macintoshes, and, increasingly, game consoles like the Dreamcast and the Playstation II.

What Are 3-D Graphics?
For many of us, games on a computer or advanced game system are the most common ways we see 3-D graphics. These games, or movies made with computer-generated images, have to go through three major steps to create and present a realistic 3-D scene:
  1. Creating a virtual 3-D world.
  2. Determining what part of the world will be shown on the screen.
  3. Determining how every pixel on the screen will look so that the whole image appears as realistic as possible.
Creating a Virtual 3-D World
A virtual 3-D world isn't the same thing as one picture of that world. This is true of our real world also. Take a very small part of the real world -- your hand and a desktop under it. Your hand has qualities that determine how it can move and how it can look. The finger joints bend toward the palm, not away from it. If you slap your hand on the desktop, the desktop doesn't splash -- it's always solid and it's always hard. Your hand can't go through the desktop. You can't prove that these things are true by looking at any single picture. But no matter how many pictures you take, you will always see that the finger joints bend only toward the palm, and the desktop is always solid, not liquid, and hard, not soft. That's because in the real world, this is the way hands are and the way they will always behave. The objects in a virtual 3-D world, though, don’t exist in nature, like your hand. They are totally synthetic. The only properties they have are given to them by software. Programmers must use special tools and define a virtual 3-D world with great care so that everything in it always behaves in a certain way.
What Part of the Virtual World Shows on the Screen?
At any given moment, the screen shows only a tiny part of the virtual 3-D world created for a computer game. What is shown on the screen is determined by a combination of the way the world is defined, where you choose to go and which way you choose to look. No matter where you go -- forward or backward, up or down, left or right -- the virtual 3-D world around you determines what you will see from that position looking in that direction. And what you see has to make sense from one scene to the next. If you're looking at an object from the same distance, regardless of direction, it should look the same height. Every object should look and move in such a way as to convince you that it always has the same mass, that it's just as hard or soft, as rigid or pliable, and so on.
Programmers who write computer games put enormous effort into defining 3-D worlds so that you can wander in them without encountering anything that makes you think, “That couldn't happen in this world!" The last thing you want to see is two solid objects that can go right through each other. That’s a harsh reminder that everything you’re seeing is make-believe.
The third step involves at least as much computing as the other two steps and has to happen in real time for games and videos. We'll take a longer look at it next.

How to Make It Look Like the Real Thing
No matter how large or rich the virtual 3-D world, a computer can depict that world only by putting pixels on the 2-D screen. This section will focus on just how what you see on the screen is made to look realistic, and especially on how scenes are made to look as close as possible to what you see in the real world. First we'll look at how a single stationary object is made to look realistic. Then we'll answer the same question for an entire scene. Finally, we'll consider what a computer has to do to show full-motion scenes of realistic images moving at realistic speeds. A number of image parts go into making an object seem real. Among the most important of these are shapes, surface textures, lighting, perspective, depth of field and anti-aliasing.
Shapes
When we look out our windows, we see scenes made up of all sorts of shapes, with straight lines and curves in many sizes and combinations. Similarly, when we look at a 3-D graphical image on our computer monitor, we see images made up of a variety of shapes, although most of them are made up of straight lines. We see squares, rectangles, parallelograms, circles and rhomboids, but most of all we see triangles. However, in order to build images that look as though they have the smooth curves often found in nature, some of the shapes must be very small, and a complex image -- say, a human body -- might require thousands of these shapes to be put together into a structure called a wireframe. At this stage the structure might be recognizable as the symbol of whatever it will eventually picture, but the next major step is important: The wireframe has to be given a surface.



This illustration shows the wireframe of a hand made from relatively few polygons -- 862 total.


The outline of the wireframe can be made to look more natural and rounded, but many more polygons -- 3,444 -- are required.
Surface Textures
When we meet a surface in the real world, we can get information about it in two key ways. We can look at it, sometimes from several angles, and we can touch it to see whether it's hard or soft. In a 3-D graphic image, however, we can only look at the surface to get all the information possible. All that information breaks down into three areas:

  • Color: What color is it? Is it the same color all over?
  • Texture: Does it appear to be smooth, or does it have lines, bumps, craters or some other irregularity on the surface?
  • Reflectance: How much light does it reflect? Are reflections of other items in the surface sharp or fuzzy?
One way to make an image look "real" is to have a wide variety of these three features across the different parts of the image. Look around you now: Your computer keyboard has a different color/texture/reflectance than your desktop, which has a different color/texture/reflectance than your arm. For realistic color, it’s important for the computer to be able to choose from millions of different colors for the pixels making up an image. Variety in texture comes both from mathematical models for surfaces ranging from frog skin to Jell-o gelatin to stored “texture maps” that are applied to surfaces. We also associate qualities that we can't see -- soft, hard, warm, cold -- with particular combinations of color, texture and reflectance. If one of them is wrong, the illusion of reality is shattered.


Adding a surface to the wireframe begins to change the image from something obviously mathematical to a picture we might recognize as a hand.

We'll take a look at lighting and perspective in the next section.­
Lighting and Perspective
When you walk into a room, you turn on a light. You probably don't spend a lot of time thinking about the way the light comes from the bulb or tube and spreads around the room. But the people making 3-D graphics have to think about it, because all the surfaces surrounding the wireframes have to be lit from somewhere. One technique, called ray-tracing, plots the path that imaginary light rays take as they leave the bulb, bounce off of mirrors, walls and other reflecting surfaces, and finally land on items at different intensities from varying angles. It's complicated enough when you think about the rays from a single light bulb, but most rooms have multiple light sources -- several lamps, ceiling fixtures, windows, candles and so on. Lighting plays a key role in two effects that give the appearance of weight and solidity to objects: shading and shadows. The first, shading, takes place when the light shining on an object is stronger on one side than on the other. This shading is what makes a ball look round, high cheekbones seem striking and the folds in a blanket appear deep and soft. These differences in light intensity work with shape to reinforce the illusion that an object has depth as well as height and width. The illusion of weight comes from the second effect -- shadows.



Lighting in an image not only adds depth to the object through shading, it “anchors” objects to the ground with shadows.
Solid bodies cast shadows when a light shines on them. You can see this when you observe the shadow that a sundial or a tree casts onto a sidewalk. And because we’re used to seeing real objects and people cast shadows, seeing the shadows in a 3-D image reinforces the illusion that we’re looking through a window into the real world, rather than at a screen of mathematically generated shapes.
Perspective
Perspective is one of those words that sounds technical but that actually describes a simple effect everyone has seen. If you stand on the side of a long, straight road and look into the distance, it appears as if the two sides of the road come together in a point at the horizon. Also, if trees are standing next to the road, the trees farther away will look smaller than the trees close to you. As a matter of fact, the trees will look like they are converging on the point formed by the side of the road. When all of the objects in a scene look like they will eventually converge at a single point in the distance, that's perspective. There are variations, but most 3-D graphics use the "single point perspective" just described.


In the illustration, the hands are separate, but most scenes feature some items in front of, and partially blocking the view of, other items. For these scenes the software not only must calculate the relative sizes of the items but also must know which item is in front and how much of the other items it hides. The most common technique for calculating these factors is the Z-Buffer. The Z-buffer gets its name from the common label for the axis, or imaginary line, going from the screen back through the scene to the horizon. (There are two other common axes to consider: the x-axis, which measures the scene from side to side, and the y-axis, which measures the scene from top to bottom.)
The Z-buffer assigns to each polygon a number based on how close an object containing the polygon is to the front of the scene. Generally, lower numbers are assigned to items closer to the screen, and higher numbers are assigned to items closer to the horizon. For example, a 16-bit Z-buffer would assign the number -32,768 to an object rendered as close to the screen as possible and 32,767 to an object that is as far away as possible.
In the real world, our eyes can’t see objects behind others, so we don’t have the problem of figuring out what we should be seeing. But the computer faces this problem constantly and solves it in a straightforward way. As each object is created, its Z-value is compared to that of other objects that occupy the same x- and y-values. The object with the lowest z-value is fully rendered, while objects with higher z-values aren’t rendered where they intersect. The result ensures that we don’t see background items appearing through the middle of characters in the foreground. Since the z-buffer is employed before objects are fully rendered, pieces of the scene that are hidden behind characters or objects don’t have to be rendered at all. This speeds up graphics performance. Next, we'll look at the depth of field element.

Depth of Field
Another optical effect successfully used to create 3-D is depth of field. Using our example of the trees beside the road, as that line of trees gets smaller, another interesting thing happens. If you look at the trees close to you, the trees farther away will appear to be out of focus. And this is especially true when you're looking at a photograph or movie of the trees. Film directors and computer animators use this depth of field effect for two purposes. The first is to reinforce the illusion of depth in the scene you're watching. It's certainly possible for the computer to make sure that every item in a scene, no matter how near or far it's supposed to be, is perfectly in focus. Since we're used to seeing the depth of field effect, though, having items in focus regardless of distance would seem foreign and would disturb the illusion of watching a scene in the real world. The second reason directors use depth of field is to focus your attention on the items or actors they feel are most important. To direct your attention to the heroine of a movie, for example, a director might use a "shallow depth of field," where only the actor is in focus. A scene that's designed to impress you with the grandeur of nature, on the other hand, might use a "deep depth of field" to get as much as possible in focus and noticeable.


Anti-aliasing
A technique that also relies on fooling the eye is anti-aliasing. Digital graphics systems are very good at creating lines that go straight up and down the screen, or straight across. But when curves or diagonal lines show up (and they show up pretty often in the real world), the computer might produce lines that resemble stair steps instead of smooth flows. So to fool your eye into seeing a smooth curve or line, the computer can add graduated shades of the color in the line to the pixels surrounding the line. These "grayed-out" pixels will fool your eye into thinking that the jagged stair steps are gone. This process of adding additional colored pixels to fool the eye is called anti-aliasing, and it is one of the techniques that separates computer-generated 3-D graphics from those generated by hand. Keeping up with the lines as they move through fields of color, and adding the right amount of "anti-jaggy" color, is yet another complex task that a computer must handle as it creates 3-D animation on your computer monitor.



The jagged “stair steps” that occur when images are painted from pixels in straight lines mark an object as obviously computer-generated.


Drawing gray pixels around the lines of an image -- “blurring” the lines -- minimizes the stair steps and makes an object appear more realistic.
We'll find out how to animate 3-D images in the coming sections.
Realistic Examples
When all the tricks we've talked about so far are put together, scenes of tremendous realism can be created. And in recent games and films, computer-generated objects are combined with photographic backgrounds to further heighten the illusion. You can see the amazing results when you compare photographs and computer-generated scenes.


This is a photograph of a sidewalk near the How Stuff Works office. In one of the following images, a ball was placed on the sidewalk and photographed. In the other, an artist used a computer graphics program to create a ball.


Image A


Image B
Can you tell which is the real ball? Look for the answer at the end of the article.
Making 3-D Graphics Move
So far, we've been looking at the sorts of things that make any digital image seem more realistic, whether the image is a single "still" picture or part of an animated sequence. But during an animated sequence, programmers and designers will use even more tricks to give the appearance of "live action" rather than of computer-generated images. How many frames per second?
When you go to see a movie at the local theater, a sequence of images called frames runs in front of your eyes at a rate of 24 frames per second. Since your retina will retain an image for a bit longer than 1/24th of a second, most people's eyes will blend the frames into a single, continuous image of movement and action.
If you think of this from the other direction, it means that each frame of a motion picture is a photograph taken at an exposure of 1/24 of a second. That's much longer than the exposures taken for "stop action" photography, in which runners and other objects in motion seem frozen in flight. As a result, if you look at a single frame from a movie about racing, you see that some of the cars are "blurred" because they moved during the time that the camera shutter was open. This blurring of things that are moving fast is something that we're used to seeing, and it's part of what makes an image look real to us when we see it on a screen.
However, since digital 3-D images are not photographs at all, no blurring occurs when an object moves during a frame. To make images look more realistic, blurring has to be explicitly added by programmers. Some designers feel that "overcoming" this lack of natural blurring requires more than 30 frames per second, and have pushed their games to display 60 frames per second. While this allows each individual image to be rendered in great detail, and movements to be shown in smaller increments, it dramatically increases the number of frames that must be rendered for a given sequence of action. As an example, think of a chase that lasts six and one-half minutes. A motion picture would require 24 (frames per second) x 60 (seconds) x 6.5 (minutes) or 9,360 frames for the chase. A digital 3-D image at 60 frames per second would require 60 x 60 x 6.5, or 23,400 frames for the same length of time.
Creative Blurring
The blurring that programmers add to boost realism in a moving image is called "motion blur" or "spatial anti-aliasing." If you've ever turned on the "mouse trails" feature of Windows, you've used a very crude version of a portion of this technique. Copies of the moving object are left behind in its wake, with the copies growing ever less distinct and intense as the object moves farther away. The length of the trail of the object, how quickly the copies fade away and other details will vary depending on exactly how fast the object is supposed to be moving, how close to the viewer it is, and the extent to which it is the focus of attention. As you can see, there are a lot of decisions to be made and many details to be programmed in making an object appear to move realistically.
There are other parts of an image where the precise rendering of a computer must be sacrificed for the sake of realism. This applies both to still and moving images. Reflections are a good example. You've seen the images of chrome-surfaced cars and spaceships perfectly reflecting everything in the scene. While the chrome-covered images are tremendous demonstrations of ray-tracing, most of us don't live in chrome-plated worlds. Wooden furniture, marble floors and polished metal all reflect images, though not as perfectly as a smooth mirror. The reflections in these surfaces must be blurred -- with each surface receiving a different blur -- so that the surfaces surrounding the central players in a digital drama provide a realistic stage for the action.

Fluid Motion for Us Is Hard Work for the Computer
All the factors we've discussed so far add complexity to the process of putting a 3-D image on the screen. It's harder to define and create the object in the first place, and it's harder to render it by generating all the pixels needed to display the image. The triangles and polygons of the wireframe, the texture of the surface, and the rays of light coming from various light sources and reflecting from multiple surfaces must all be calculated and assembled before the software begins to tell the computer how to paint the pixels on the screen. You might think that the hard work of computing would be over when the painting begins, but it's at the painting, or rendering, level that the numbers begin to add up. Today, a screen resolution of 1024 x 768 defines the lowest point of "high-resolution." That means that there are 786,432 picture elements, or pixels, to be painted on the screen. If there are 32 bits of color available, multiplying by 32 shows that 25,165,824 bits have to be dealt with to make a single image. Moving at a rate of 60 frames per second demands that the computer handle 1,509,949,440 bits of information every second just to put the image onto the screen. And this is completely separate from the work the computer has to do to decide about the content, colors, shapes, lighting and everything else about the image so that the pixels put on the screen actually show the right image. When you think about all the processing that has to happen just to get the image painted, it's easy to understand why graphics display boards are moving more and more of the graphics processing away from the computer's central processing unit (CPU). The CPU needs all the help it can get.

Transforms and Processors: Work, Work, Work
Looking at the number of information bits that go into the makeup of a screen only gives a partial picture of how much processing is involved. To get some inkling of the total processing load, we have to talk about a mathematical process called a transform. Transforms are used whenever we change the way we look at something. A picture of a car that moves toward us, for example, uses transforms to make the car appear larger as it moves. Another example of a transform is when the 3-D world created by a computer program has to be "flattened" into 2-D for display on a screen. Let's look at the math involved with this transform -- one that's used in every frame of a 3-D game -- to get an idea of what the computer is doing. We'll use some numbers that are made up but that give an idea of the staggering amount of mathematics involved in generating one screen. Don't worry about learning to do the math. That has become the computer's problem. This is all intended to give you some appreciation for the heavy-lifting your computer does when you run a game. The first part of the process has several important variables:
  • X = 758 -- the height of the "world" we're looking at.
  • Y = 1024 -- the width of the world we're looking at
  • Z = 2 -- the depth (front to back) of the world we're looking at
  • Sx = height of our window into the world
  • Sy - width of our window into the world
  • Sz = a depth variable that determines which objects are visible in front of other, hidden objects
  • D = .75 -- the distance between our eye and the window in this imaginary world.
First, we calculate the size of the windows into the imaginary world.


Now that the window size has been calculated, a perspective transform is used to move a step closer to projecting the world onto a monitor screen. In this next step, we add some more variables.


So, a point (X, Y, Z, 1.0) in the three-dimensional imaginary world would have transformed position of (X', Y', Z', W'), which we get by the following equations:


At this point, another transform must be applied before the image can be projected onto the monitor's screen, but you begin to see the level of computation involved -- and this is all for a single vector (line) in the image! Imagine the calculations in a complex scene with many objects and characters, and imagine doing all this 60 times a second. Aren't you glad someone invented computers?
In the example below, you see an animated sequence showing a walk through the new How Stuff Works office. First, notice that this sequence is much simpler than most scenes in a 3-D game. There are no opponents jumping out from behind desks, no missiles or spears sailing through the air, no tooth-gnashing demons materializing in cubicles. From the "what's-going-to-be-in-the-scene" point of view, this is simple animation. Even this simple sequence, though, deals with many of the issues we've seen so far. The walls and furniture have texture that covers wireframe structures. Rays representing lighting provide the basis for shadows. Also, as the point of view changes during the walk through the office, notice how some objects become visible around corners and appear from behind walls -- you're seeing the effects of the z-buffer calculations. As all of these elements come into play before the image can actually be rendered onto the monitor, it's pretty obvious that even a powerful modern CPU can use some help doing all the processing required for 3-D games and graphics. That's where graphics co-processor boards come in.



How Graphics Boards Help
Since the early days of personal computers, most graphics boards have been translators, taking the fully developed image created by the computer's CPU and translating it into the electrical impulses required to drive the computer's monitor. This approach works, but all of the processing for the image is done by the CPU -- along with all the processing for the sound, player input (for games) and the interrupts for the system. Because of everything the computer must do to make modern 3-D games and multi-media presentations happen, it's easy for even the fastest modern processors to become overworked and unable to serve the various requirements of the software in real time. It's here that the graphics co-processor helps: it splits the work with the CPU so that the total multi-media experience can move at an acceptable speed. As we've seen, the first step in building a 3-D digital image is creating a wireframe world of triangles and polygons. The wireframe world is then transformed from the three-dimensional mathematical world into a set of patterns that will display on a 2-D screen. The transformed image is then covered with surfaces, or rendered, lit from some number of sources, and finally translated into the patterns that display on a monitor's screen. The most common graphics co-processors in the current generation of graphics display boards, however, take the task of rendering away from the CPU after the wireframe has been created and transformed into a 2-D set of polygons. The graphics co-processor found in boards like the VooDoo3 and TNT2 Ultra takes over from the CPU at this stage. This is an important step, but graphics processors on the cutting edge of technology are designed to relieve the CPU at even earlier points in the process.
One approach to taking more responsibility from the CPU is done by the GeForce 256 from Nvidia. In addition to the rendering done by earlier-generation boards, the GeForce 256 adds transforming the wireframe models from 3-D mathematics space to 2-D display space as well as the work needed to show lighting. Since both transforms and ray-tracing involve serious floating point mathematics (mathematics that involve fractions, called "floating point" because the decimal point can move as needed to provide high precision), these tasks take a serious processing burden from the CPU. And because the graphics processor doesn't have to cope with many of the tasks expected of the CPU, it can be designed to do those mathematical tasks very quickly.
The new Voodoo 5 from 3dfx takes over another set of tasks from the CPU. 3dfx calls the technology the T-buffer. This technology focuses on improving the rendering process rather than adding additional tasks to the processor. The T-buffer is designed to improve anti-aliasing by rendering up to four copies of the same image, each slightly offset from the others, then combining them to slightly blur the edges of objects and defeat the "jaggies" that can plague computer-generated images. The same technique is used to generate motion-blur, blurred shadows and depth-of-field focus blurring. All of these produce smoother-looking, more realistic images that graphics designers want. The object of the Voodoo 5 design is to do full-screen anti-aliasing while still maintaining fast frame rates.
Computer graphics still have a ways to go before we see routine, constant generation and presentation of truly realistic moving images. But graphics have advanced tremendously since the days of 80 columns and 25 lines of monochrome text. The result is that millions of people enjoy games and simulations with today's technology. And new 3-D processors will come much closer to making us feel we're really exploring other worlds and experiencing things we'd never dare try in real life. Major advances in PC graphics hardware seem to happen about every six months. Software improves more slowly. It's still clear that, like the Internet, computer graphics are going to become an increasingly attractive alternative to TV.
Back to the images of the ball. How did you do? Image A has a computer-generated ball. Image B shows a photograph of a real ball on the sidewalk. It's not easy to tell which is which, is it?

How Shockwave 3-D Technology Works

Introduction to How Shockwave 3-D Technology Works

Thanks to
To view the 3-D graphics in this article, you will need to download the newest Shockwave player.
In the past year or so, you may have heard about a new technology that lets you manipulate 3-D images over the Internet. Many Web sites have been using this sort of software for a while, but it has mostly remained a niche market due to a lack of universal 3-D viewer programs. Macromedia, in conjunction with Intel, NxView and others, hopes to bring this technology to many more Web users with the newest versions of the Shockwave player and the Shockwave authoring program Director.
But what does all this mean? In this edition of HowStuffWorks, we'll find out exactly what Shockwave 3-D technology is and how it works. We'll also explore some applications of the new technology and check out some very cool 3-D images.


The Newest Shockwave
If you spend much time on the Web, you have probably encountered Shockwave, a graphics format for animation and interactive presentations. Shockwave files are created by a program called Director, which was originally developed for CD-ROM use. The format is very popular with webmasters because it allows them to create elaborate Web content that can be transmitted fairly quickly over the Internet. See the HowStuffWorks Animation Tour for lots of cool examples of work done in this format.


A typical 2-D animation that might be created with Shockwave
In previous editions of Shockwave and Director, Web artists could create only 2-D animation. Two-dimensional animation comes in two forms:
  • Frame animation is something like classic cartoons -- you see movement as a series of 2-D still images shown in a set sequence. Your viewpoint is set by the movie's creator.
  • Vector animation uses 2-D objects (circles, squares, lines) that move with respect to one another. Since it is based on simple geometric equations, vector animation allows artists to create complex movies that have very small file sizes.
Check out How Web Animation Works to learn about previous versions of Shockwave and its cousin, Flash.
The newest edition of Director incorporates Intel Internet 3-D technology developed by Intel Architecture Labs. The program allows Web artists to create interactive 3-D animations and post them on the Web. The newest version of the Shockwave player allows most Internet users, even ones with dial-up connections, to view these intricate animations.
With Shockwave 3-D technology, users can actually download and manipulate 3-D models themselves -- they can become the director and move the camera. There are two ways to think about this:
  • You can download an object and rotate the object in front of the camera to see it from different perspectives.
  • You can download an environment and move the camera through it. This is basically the same thing you do when you play a first-person video game. The program puts you in a virtual 3-D world, and you control a "camera" in that world by way of your movements. You tell your camera to move left or right, forward or backward, through the environment.
Based on your actions, the computer draws a new frame of the scene from your new, slightly different perspective.


The same object viewed from two different perspectives.
This is a pretty complex operation: 3-D software must receive input from the user, interpret this input and decide how to redraw the image to create the desired sense of motion. When you're playing a game, your computer or game console can handle this fairly easily, but things get a lot trickier when you're sending this information over the Internet. Additionally, standard Web browsers are not automatically equipped to handle these models, which means that not everybody can access 3-D content. Macromedia's newest Shockwave player is designed to get around both of these problems, allowing most Web users to access 3-D files easily. In the next section, we'll see how the format and player manage this feat.


Uses of Shockwave Technology
Adding 3-D to Shockwave enables access to all sorts of new Web content. One of the most obvious applications is Web-based 3-D gaming. First-person adventure games and other games with fully realized 3-D worlds have dominated the PC and game-console market for almost a decade. The new Shockwave capabilities allow this sort of game to be played over the Web. Web-based 3-D gaming is getting a lot of attention, but it is only one market for the new technology. 3-D capability is perhaps better suited for advancing e-commerce. Web merchants can give their customers a much clearer idea of products in their catalog if the customers can see the product as a 3-D image. With 3-D models, online shopping is a little more like in-store shopping -- customers can rotate the item around, checking it out from every angle.


A 3-D model used to demonstrate a product on an e-commerce site
Customers can also modify 3-D models for their own particular needs. One of the most useful applications for this is clothes shopping. If an online shopper enters his or her measurements, the 3-D software can generate a model of that person's body, which can be "dressed" with 3-D models of particular clothes. This is a virtual version of the real-world dressing room.
This level of user interactivity is also a great addition to educational sites like HowStuffWorks. A 3-D model of an engine that you can turn around and interact with can offer a much clearer illustration of the mechanisms at work than a 2-D model -- it's more like actually handling and examining the engine yourself.



This 3-D model of a paintball gun makes it extremely easy to understand how paintball and BB guns work. Click on the image above to see the model.
For example, if you want to understand how a paintball gun works, a 3-D model can be incredibly useful. You can see exactly how the mechanism fits together and fires. Click here to see a 3-D model. If you want to learn more about paintball guns after seeing the model, see How Paintball Works.



As a demonstration of the new Shockwave 3-D technology, NxView has created this 3-D model of a four-speed manual transmission.
In all of these applications, the most significant benefit of 3-D is greater user involvement. You can decide what you want to look at instead of just viewing a pre-set movie. The difference is comparable to the difference between watching television and playing a video game.
To see more examples of Shockwave models, check out:


Making 3-D Content Accessible
In the last section, we saw that Shockwave's new player is a new format for creating and viewing interactive 3-D content on the Web. The idea of posting this sort of content on the Web is nothing new, but technology companies and Web sites haven't had much luck in bringing 3-D to a lot of viewers. There are two main reasons for this:
  • It takes a long time to transmit 3-D "movement" over low-bandwidth connections.
  • You often have to download a new plug-in every time you want to view another site's 3-D content.
The new Shockwave player specifically addresses these obstacles, so it could finally make 3-D content a significant component of the Web. The majority of Web users already have the Shockwave player installed and would only need to download the most recent update to add 3-D capabilities. Macromedia has set up partnerships with many Web companies in order to get people using its technology. Previously, Macromedia has had a lot of success with both Shockwave and Flash formats because they work well with all of the main browsers and are easy to install and update. Intel, NxView and other companies partnered with Macromedia because the company has a good track record with disseminating its player technology.
The new format is specially designed to work well with all bandwidth connections, even connection speeds as low as 28.8 kilobytes per second (KBps). It does this in a couple of ways.
When you view 2-D animation on the Web, the Web site sends each successive frame to your computer. In this way, everything in the animation must be transmitted over the Internet individually. In Shockwave 3-D technology, the Web site sends you a complete image only once. Then, when you want to move the image, the site only sends the bare-bones information necessary to make the desired move. It tells your computer how the outer wire frame should be adjusted, and your computer does the rest of the work to fill in the polygons and textures.
Most personal computers made in the past five years have processors designed to handle the complex 3-D worlds of advanced video games, so they are well-equipped for the job. By relying mostly on the power built into the client machine (your PC), there is much less information that needs to be transmitted from the server machine (the computer storing the Web site). The only hefty download occurs when you bring up the initial image. After that, the site only has to transmit mathematical adjustments, which don't require extensive bandwidth.
But what about this big initial download? Shockwave's new player addresses this problem with something called adaptive 3-D geometry. Adaptive 3-D geometry is a collection of complex algorithms that automatically scales a 3-D model for a particular Internet connection. If you have a slower connection, the Web site transmits an image with simplified textures and fewer polygons. If you have a faster connection, you receive a more complex image.



A simpler 3-D model has fewer polygons. This hand is composed of only 862 polygons.

To create a more detailed model, you have to add more polygons. This hand is composed of 3,444 polygons.
With these elements, you should be able to access 3-D content no matter kind of Internet connection you use. But how does somebody make Shockwave 3-D content themselves? In the next section, we'll find out what goes into producing a Shockwave 3-D animation and see how webmasters can put 3-D content on their site.


Developing New 3-D Content
Check This Out!
As a demonstration of the new Shockwave 3-D technology, NxView has created this 3-D model of a four-speed manual transmission.
We had the opportunity to speak with Miriam Geller, Macromedia's senior product manager for Director and the Shockwave player. To create a 3-D object like the automotive transmission in the example shown above, you use three different tools:
  1. You use a standard 3-D modeling package to create the 3-D object. For example, you might use 3D Studio Max or Maya. With these tools, you create the wireframe image and specify the polygons that cover the wireframe (see How 3D Graphics Work for details). You export from the 3-D modeling package using a new .W3D file format.
  2. You load the .W3D file into the Macromedia application called Director Shockwave Studio. This application helps you prepare the 3-D object for distribution on the Web. For example, you can:
    • Apply different techniques, such as a multi-resolution mesh or subdivision surfaces, to limit the amount of bandwidth or processing power needed by the 3-D object on the user's machine.
    • Add user-interactivity features. For example, you can make different parts of the 3-D object move in response to user requests.
    • Add effects, such as fog or rain, to the object.
    You export a normal .DCR file from Director Shockwave Studio and place it on the Web server.
  3. The user then downloads and views the .DCR file using his or her browser and the Shockwave player (version 8.5 or higher). [See, for example, this example of a .DCR file, which shows a 3D model of a paintball gun.]
This is not a trivial process, but for someone already familiar with 3-D modeling using a program like 3D Studio Max, it's a straightforward extension.

What are TrueType fonts?

Browse the article What are TrueType fonts?
What are TrueType fonts?
If you are sitting at a Windows or Macintosh computer right now, then you are looking at a TrueType font as you read this! Fonts are the different styles of typefaces used by a computer to display text. If you are like most people, you are probably looking at text in many different sizes and you may even want to print out a document. Early computer operating systems relied on bitmapped fonts for display and printing. These fonts had to be individually created for display at each particular size desired. If you made the font larger or smaller than it was intended to be, it looked horrible. And printed text was almost always very jagged looking.

In the late 1980s, Adobe introduced its Type 1 fonts based on vector graphics. Unlike bitmapped fonts, vector fonts could be made larger or smaller (scaling) and still look good. Adobe also developed a printing language called Postscript that was vastly superior to anything else on the market. Microsoft and Apple were very interested in these technologies but did not want to pay royalties to Adobe for something that could become an integral part of both companies' operating systems. For that reason, Microsoft and Apple joined to develop vector font and printing technology of their own. In the end, Apple actually developed the font technology, TrueType. Meanwhile, the print engine being developed by Microsoft, TrueImage, never really got off the ground.
TrueType technology actually involves two parts:
  • The TrueType Rasterizer
  • TrueType fonts
The Rasterizer is a piece of software that is embedded in both Windows and Mac operating systems. It gathers information on the size, color, orientation and location of all the TrueType fonts displayed and converts that information into a bitmap that can be understood by the graphics card and monitor. It is essentially an interpreter that understands the mathematical data supplied by the font and translates it into a form that the video display can render. The fonts themselves contain data that describes the outline of each character in the typeface. Higher quality fonts also contain hinting codes. Hinting is a process that makes a font that has been scaled down to a small size look its best. Instead of simply relying on the vector outline, the hinting codes ensure that the characters line up well with the pixels so that the font looks as smooth and legible as possible.
There are literally thousands of TrueType fonts available, many of them for free on the Web. A lot of these fonts have simply been scanned and converted from other sources. While most fonts should be perfectly fine, an improperly created TrueType font can include errors that could potentially crash your computer. Professionally designed fonts can cost a hundred dollars apiece but usually are heavily hinted and have been tested at a variety of sizes and angles for optimum quality. These features are important for advertising firms and publishing houses. For most of us, the free or inexpensive fonts work just fine.

Followers