3D Graphics in Computer Animation and Real Time

3D graphics is heavily used in many industries, including aerospace, medical visualization, simulation and training, science and research, and entertainment. In entertainment, two fields stand out in their 3D graphics use—movies and computer games. Movie and game 3D graphics are divided into two disciplines for their creation, where computer animation is used for movies and real-time 3D is used for games, although games sometimes also play movies.

Any type of 3D computer graphics typically uses a mathematical model, for example, groups of triangles or points, to represent a 3D object on screen. The final on-screen display is simply a 2D image computed from various parameters, such as position relative to the viewer, lighting effects, and surface color. The process of making this 2D image from the 3D information is called rendering.

The rendering happens similarly in computer animation and real-time 3D, and both techniques must render for the user to have something to view. However, there are some important differences. Movies are rendered in advance of viewing, almost always on a different computer than the user is using, and the rendering takes as much time as the rendering software needs to finish the images. When the movie is complete, it is obtained by the user, who watches the movie playback on his computer.

Real-time 3D (RT3D) uses special software and hardware to render and display the graphics on the user’s computer while the user is viewing them. That is, the software and hardware renders a frame, immediately displays it to the screen, and then repeats this process until the experience is done or the user halts it. The final displayable image is often called a frame, like a frame in a movie reel.

Because the software and hardware is rendering while the display is happening, the amount of time available for this rendering must be very small (a fraction of a second) in comparison to pre-rendered movies. In big-production movies using 3D computer animation, complex single frames have been known to take 48 hours to render! The time to render can vary, but a RT3D application’s render must typically be finished and displayed within 1/30th of a second. How fast the software and hardware can do this is measured by frame rate. The frame rate is how many full screens or frames a given application refreshes or redraws per second. The goal in real-time graphics is to have a frame rate high enough that the viewing experience is smooth and seamless and yet allows interactivity. What makes real time real time is that it is interactive. Therefore, when 3D graphics are rendering and displaying fast enough to interact with, then it can be called real time.

This begs the question—how fast is fast enough to interact with? Unfortunately, there is no universal answer, but for games, we can have an idea. Fast enough is entirely dependent on the type of gameplay you are trying to create. A top-down or isometric-view type game may need only 15 frames per second (fps) to satisfy the player. However, a cutting-edge first-person shooter or race game will require 60 fps or greater. Still other games may simply be short segments of movie playback and do not require truly interactive 3D graphics at all.

One last thing to remember about movies is that although prerendered movies can have a fast enough frame rate—for example, 30 fps for video—they are still not considered interactive because the playback will always be the same. By rendering in real time, the renderer can change what will be shown in the next frame, based on user input and game logic, making the experience potentially different every time.

Software versus Hardware

There are two main ways to render 3D graphics, software rendering and hardware-accelerated rendering. It is possible to combine the two, but most RT3D games stick to hardware-accelerated rendering in an effort to maintain interactive frame rates.

Software rendering is what the movie industry typically uses to render frames. Software rendering means that the rendering code runs on a general purpose CPU using specialized graphics algorithms. Software rendering for computer animation is notoriously slow because the scene complexity and frame resolutions are so high, but they can be sped up if limited to quicker algorithms and simpler scenes. Software rendering is often an attractive alternative for 3D games because it doesn’t require special 3D hardware. However, the graphics quality must be highly limited in this case, particularly the screen resolution, to maintain interactive frame rates. Software rendering is popular on handheld devices because handheld displays have a low resolution, and most handheld devices have no 3D hardware acceleration.

Today, most PC games require 3D hardware acceleration if the game is to be RT3D.



Practical Java Game Programming
Practical Java Game Programming (Charles River Media Game Development)
ISBN: 1584503262
EAN: 2147483647
Year: 2003
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net