The Basics

The Basics

Let's start at the beginning. This section is devoted to the various types of graphics possibilities that exist on computers. Keep in mind that everything in this chapter is simply about putting a colored pixel on the screen, even though the process of doing so might not be that easy at times.

Raster Vector Painting

Raster and vector image formats are explored in Chapter 22 , Image Processing. What's important to know is that there are programs designed specifically to work with both formats. As a digital artist, you work visually with pixels or objects to produce what is seen on the screen. To get a triangle or circle on the screen, either you have to draw it by hand using a mouse or tablet, or you use some application feature to assist you in the creation of the figure. Either way, it is your skill and and your hand/eye coordination that gets the images drawn on the screen. This is not the only way to produce computer graphics, however. Another is to describe a scene and have a program draw it for you. This is what you do when using a ray tracing application.

Ray Tracing

Ray tracing is a process by which elements of light ”color and intensity ”are calculated with respect to other elements in an environment. Here are a few ray trace applications for Linux.

Blender

http://www.blender.nl

K-3D

http://www.k-3d.com

MagicLight

http://home.bip.net/mikael_aronsson

PovRay

http://www.povray.org/

In order to create an image, you create a scene file that describes the environment and objects that will appear in the image. A ray-trace engine reads the scene file and generates the output image. This is the method employed by PovRay. PovRay takes a standard ASCII file, the scene file, as its input and delivers a graphic image as its output. Other tools that integrate modeling and rendering components store their data in formats similar to a scene description file. If this sounds confusing, don't worry, it will start making sense later in the chapter. The point to get here is that the scene file is not made up of binary data that maps to bits of an images, but rather is a description of the objects and their properties as they would appear after being rendered.

Like a lot of Linux tools, PovRay has a complex set of command line arguments and options. Managing those arguments and options can be challenging, so tools have been created to ease the pain.

Front-Ends

A front-end is a program, typically GUI based, that assists in the operation of another program, typically command line, that has a lot of parameters and options. There are a lot of front-ends written for PovRay. PovRay has many command line options. A front-end application can assist in managing those options and help you to understand which options to use to produce the best results when rendering a scene. A front-end will not help you produce a better scene file.

Here's a sample of some PovRay front-ends:

Gpfe

http://digilander.iol.it/2g/tcltk-e.htm

gPov

http://www.nasland.nu/software.php?program=gpov

modray

http://kcopensource.org/modray.php

Peflp

http://mogzay.multimania.com/

povfront

http://perso.club-internet.fr/clovis1/

tkRender

http:// members .nbci.com/raydarx/

XPovRay

http://www.metroweb.co.za/~r0cknr0l

If you would rather work visually, then perhaps you should use an application that lets you see your scene file graphically as you work on it. This application is called a modeler.

Modelers

Did you create the typical ashtray back in your elementary school art class? I did. Did the teacher show a picture of a real ashtray before letting you loose to create your own masterpiece? The process, which probably resulted in something that almost re sembled an ashtray, was modeling. You took a primitive substance, in this case a lump of clay, and formed and shaped it, removed bits and pieces, added some back on, and then smoothed and roughed it up. This is modeling. And this is exactly what you do with a 3D modeling application.

Some modelers only produce a scene file; they don't render the scene. Others are packaged with a rendering engine. Finding a modeler suited to your needs may take a while, since each one is in a different stage of development. If you are working with PovRay for rendering, then you will want to find a modeler that outputs a PovRay scene file.

Here's an interesting list of modeling applications to get you started:

3dom

http://threedom. sourceforge .net/

3dPM

http://rupert.informatik.uni-stuttgart.de/~kraftts/

Blender

http://www.blender.nl/

Extreme Wave

http://agnews.tamu.edu/~jpalmer/ewave/

g3d

http://condor.stcloudstate.edu/~hebl9901/g3d/

Giram

http://www.giram.org/

gSculpt

http://gsculpt.sourceforge.net/

Innovation3D

http://innovation3d.sourceforge.net/

K-3D

http://www.k-3d.com

MagicLight

http://home.bip.net/mikael_aronsson/

MindsEye

http://mindseye.sourceforge.net/

mg^2

http://www.op.net/~finklesk/3d.html

Pygmalion

http://web.kyoto-inet.or.jp/people/tantaka/pygmalion/pygmalion-en.html

Sced

http://http.cs.berkeley.edu/~schenney/sced/sced.html

A 3D modeler lets you place primitive shapes on the screen (cubes, cones, pyramids , etc.) that can be manipulated using a variety tools. These tools allow you to combine, separate, shrink, and otherwise mangle the figures. As with vector painting, each object on the screen is a unique object capable of being selected for moving, shaping, or anything else you can image. The end result is that you sculpt your objects into more sophisticated objects. For example, from spheres, cubes, a lathe tool, and possibly some other objects and tools, you can construct a chess piece. The process can be quite detailed.

In addition to shaping, you can determine the color and/or texture for the surface of the objects you construct. Attributes such as reflectiveness , granularity, and hue, among a host of others, allow you to control almost every aspect of the appearance of your object. Don't like your wood-textured chess piece? Change it to a shiny black-onyx texture using a simple properties change. Modelers are the word processors of 3D graphics.

Once you've created a collection of objects, you might want to try your hand at putting them in motion.

Animation

Classic animation hasn't changed much over the years . The concept behind animation is simple: Draw each frame of an animation, changing the shapes on each frame ever so slightly, and then flip through those frames really fast. If done properly, the shapes will appear to move and change shape smoothly. The human brain can be fooled into thinking that a series of still images with an object that changes position or shape is real motion. Your mind compensates for the gaps of time in between the frames . Without this ability, we probably wouldn't have movies, television, or computer monitors . Luckily, we do, and computers have introduced a new way of making animation easy, even for the nonartist.

Here's a sample of some animation applications:

Blender

http://www.blender.nl/

K-3D

http://www.k-3d.com

MindsEye

http://mindseye.sourceforge.net/

Computer animation is essentially the same as classic animation. You produce a series of still images and then play back the series very rapidly on the computer monitor. A bouncing ball is made by drawing a ball on each frame, progressively different for each frame. The physics involved in the ball bouncing is totally up to you, the animator, to determine. In one world, balls may gain energy when they hit a wall and begin to move faster as they hit more and more walls. Of course, with computers, we have the ability to describe a behavior of an environment and properties of the balls and walls so that the computer can calculate how a ball should react when striking a wall. This frees you from the task of managing every little object in a scene.

Consider the problem you would have if you wanted to animate a bee flying over a field of tall grass on a windy day. Animating each one of the thousands of blades of grass for each frame of video would leave you so mentally exhausted, you would probably leave out the bee or give up entirely. With animation applications, the amount of work you have to put into an animation varies with the sophistication of the application. It will be some time before the Linux animation applications get to a level equivalent to the tools used to make major motion pictures, but with a little work you can achieve some very nice results. Even so, there are some cases where you need the computer to do most of the work for you, such as a 3D scene in an arcade game. In this environment the graphics generation is specialized and geared toward a single purpose: real-time 3D graphics presentation.

3D Game Engines

A new breed of 3D animation tool is the 3D game engine. Popularized by the many 3D shooters available today, these engines are designed to optimize the presentation of a scene for real-time game play. In traditional computer animation, the rendering of thousands of frames could take days or weeks for just an hour of video. This obviously wouldn't work too well for a game, so designers aimed specifically at the goal of real-time 3D graphics generation.

Here are a few notable 3D game engines:

Crystal Space

http://crystal.linuxgames.com/

DUMB

http://samba.anu.edu.au/dumb/

QuakeForge

http://quakeforge.net/

World Foundry

http://wf-gdk.sourceforge.net/

Like PovRay, Crystal Space uses a standard ASCII text file to describe scene data for the engine. Rendering is not ray-trace quality, but it is real time, and the quality is good enough.

Now that you have a general understanding of the types of applications for graphic production, let's introduce 3D graphics techniques by exploring PovRay.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

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