In this section, you will learn what ray-tracing is, how it works, what POV-Ray is, and how POV-Ray relates to the rest of the ray-tracing world. This is a good section if you've never experimented with (or even heard of) ray-tracing before.
Ray-tracing can generate very beautiful and complex scenes, and can open exciting possibilities as a new method of creating visual art. One of the most important advantages of computer-based ray-tracing over more "orthodox" art forms is that it removes the need for technical skills (such as the ability to paint, draw, or sculpt) that may take years to master, and places the burden on the computer. This leaves the user to be as creative as possible, without having to spend years learning difficult skills. In fact, you should be well on your way to creating some exciting pictures before you're far along this tutorial.
Ray-tracing can require millions and even billions of complex mathematical calculations and, as such, is usually done by computer (and even then, is not a speedy process). Usually, in the computer-based ray-tracing procedure, a file containing the description of a scene (in terms that the ray-tracing software can understand, and usually in some human-readable format) is converted, by the computer, into an actual image of the scene. Later on in the tutorial you will learn how to use the POV-Ray software to create scenes of your own, with the help of your computer.
Of course, ray-tracing is not a magical technique that makes all art easy. Certain types of scenes are difficult or impossible to create with ray-tracing software. In most cases, you will find that ray-tracing is good at generating mathematically simple objects, such as those composed of spheres, cones and cubes, and poor (slower or more difficult to describe) at generating more complex objects, like a human face. There are several ways of getting around these barriers, but ray-tracing, like all forms of art, does have certain inherent limitations.
Because ray-tracing is based on math, ray-traced scenes have some distinct characteristics. For example, in a simple ray-traced scene, all objects are in focus, and all shadows are crisp and well-defined; in fact, every object in the scene is mathematically perfect. (When was the last time you saw a mathematically perfect pear?) Because of this, images produced by ray-tracing tend to look slightly odd, or even surrealistic, a side-effect many artists can exploit to their benefit. It is, interestingly enough, considered a mark of a "true ray-tracing artist" to be able to create more realistic, "less perfect" scenes.
First, an internal model of the scene is generated, with your computer screen included as the receiving "eye" in the model. Then, the software traces imaginary light rays backwards from where their endpoint lies (a pixel on your computer screen) to their initial point (some light source in the scene). This step is repeated, pixel by pixel, until the entire image has been created.
The reason the software traces the light rays backwards, instead of starting at the light source, is for efficiency's sake -- if a light ray doesn't end up on your screen, then you, as the user, don't care about it (because you'll never see it). By tracing the light rays backwards, beginning at the computer screen, the software can assure that every light ray it calculates is one you care about, because it knows that it will end up on your screen.
In their journey, the light rays can be reflected by mirrors, refracted by glass, or undergo various other contortions, all of which result in a single pixel of the final image. Because the ray-tracing software must trace one ray of light for each pixel in the output image, and because the light rays can undergo so many contortions, the process of ray-tracing can take a very long time, depending on the size and complexity of the image and the processing power of your computer. Unless you have an extraordinarily fast computer, you will most likely find yourself waiting around impatiently for your scene to finish rendering once you've begun to ray-trace in earnest.
POV-Ray is no toy. Despite not generating any direct income from their POV-Ray software, the POV-Ray Team (the people responsible for POV-Ray) has managed to create a commercial-quality product and, in the true spirit of the Internet, distribute it widely and without charge. As a consequence, POV-Ray is one of the most popular ray-tracing programs to date. We, the authors of the Tutorial, think that POV-Ray is one of the greatest things to come out of the Internet (gee, is it a little obvious?), which is why we decided to create this Web page.
At any rate, POV-Ray is what is known as a "rendering engine". What this means is that POV-Ray will take a file as input and generate an output file, but does not have much in the way of interface. There are modellers available for POV-Ray that will do that kind of visualization for you, if you choose, but we recommend you only start using those tools once you have a firm grasp of the POV-Ray language. Otherwise, you'll get stuck down the road.
Describing scenes to POV-Ray is fairly simple. You give POV-Ray a file containing a description of every object in the scene, written in the POV-Ray language (which you will learn later in the tutorial). Each object's description consists of:
The Path of Learning is not meant to cover every single detail of the POV-Ray language. Such a task would be tremendous (although the Language Reference has come very close). Instead the Path will guide you as you learn about each section, and, when appropriate, refer you to more complete sources of information. At the end of the Path, you should be well on your way to being a certified POV-Ray blackbelt.
Once you have POV-Ray, how you set it up is highly dependant on your operating system. We're not about to teach you how to use your own computer; if you can't set it up yourself, ask a local computer guru to help.
As we mentioned above, POV-Ray doesn't have much of an interface; on most operating systems, you will give POV-Ray the name of your input file, the name of your output file, and a whole bunch of other options via the command line. You will also need some form of image viewer and/or converter in order to display the output files that POV-Ray creates; again, this is highly operating-system-dependant.
POV-Ray also comes with documentation and example scenes; these make excellent references if you're stuck or need to know more.
Ok, we're ready to start learning the real stuff now!
|Top of Document||Main Page||Step 2: POV-Ray Basics|
The Online POV-Ray Tutorial © 1996 The Online POV-Ray Tutorial ThinkQuest Team