VOICE Home Page: http://www.os2voice.org |
[Newsletter Index] |
By Thorsten
Thielen © September 2001, Translation: Christian
Hennecke |
Computer-generated imaging has experienced heavy development in the last years:
few movies get by without using computer-generated effects, few TV-advertisements
or TV news programs don't use any computer-generated animations, even whole movies
are being produced with computers. The level of realism and natural looks of computer-generated
images has become incredible. Often you can't really tell the difference from nature
any more. [Editor's note: see the film "Final Fantasy" to experience
how far this technology has evolved.]
One method to create such realistic images is the so-called raytracing. From
a point of view (camera) simulated light (rays) is cast upon a modelled scene. These
rays then hit the objects that have been placed in the scene and the computer calculates
the color of the related pixels. Effects like mirroring, transparency, refraction,
etc. can be simulated, too, and add a photorealistic look to the images - if you
invest enough work that is. :-)
There are also raytracers for OS/2 available, though the number to choose from
has never been really large, and since development of Neon Grafix 3D has ceased,
the reviewed POVRay remains the single alternative though a very good alternative
that doesn't leave much to be desired, at least for my personal demands.
POVRay offers convenient options for the modelling of objects and the
scenery: besides common, relatively simple objects like sphere, quadre, cylinder,
cone, and torus it offers quite a number of other kinds of objects:
While one already has a number of outlines to choose from this range of basic
objects, the real strengths of POVRay come into play as Constructive Solid Geometry
(CSG) enters the arena. Overlaying two or more basic objects makes it very easy
to generate any combination of objects. To create a simple drinking-glass, for instance,
take a normal cylinder and subtract a slightly smaller cylinder from it to create
the inner hollow space. POVRay offers four kinds of overlays:
These features allow one to compose models of nearly any complexity for POVRay.
The next step to a beautiful, realistic picture are textures. After all,
things are not defined by their form only, but also by color and surface structure.
Stuff of this kind often can add more to a good picture than the modelling itself.
Because of this, POVRay offers an overwhelming number of possibilities. Textures
can be roughly differentiated into three areas:
The options POVRay offers especially in the area of textures are much too numerous
to be able to describe them in such a review, so I recommend the POVRay manual.
A third area that is important for raytracing is lighting. And, as if
it could be different, POVRay offers everything for your heart's content. Besides
the usual pointed light-sources, spotlights and cylindric light-sources (whose light
rays move in a cylindric form and which are very suitable for the display of e.g.
"laser beams") are available. So-called "area lights" allow
for more realistic and smoother casting of object shadows (while requiring more
computing power). Light-sources can be assigned any color and brightness. You can
even adapt the decrease in light intensity by greater distance to your liking.
Another important setting that influences the look of the generated images is
the camera. Different kinds of projection generate different effects (fish-eye,
parallel projection, etc.) and the camera identifier feature enables you to define
different cameras for a scene and exchange them quickly so you can view a scene
from different perspectives, for instance.
POVRay has many further features in store, e.g. atmospheric effects like fog,
rainbows and of course sky spheres for creation of realistic sky views. The "media"
concept provides rendering of e.g. smoke or fire - though I haven't got that far
in this area and thus can only say that this area is quite complex and needs some
experience, but is able to create extraordinary results.
So far we have only looked at static images, but POVRay is also capable of generating
animations of course. (OK, of single frames precisely that form an animation
if truth be told. A program that puts them together to an AVI or MPEG file is still
required.) Movement of objects, changing of textures, lighting, etc. are available.
Here we arrive at a point that casts some shade on POVRay. At least for some, while
it's more of an advantage for others (e.g. for me :-)):
include "colors.inc"
background { color Cyan }
camera {
location
<0, 2, -3>
look_at
<0, 1, 2>
}
sphere {
<0, 1, 2>, 2
texture {
pigment { color Yellow }
}
}
light_source {
<2, 4, -3> color White}
povray +Idemo.pov +Odemo.tga
Even though this method of programming/scene definition may seem quite inconvenient
to some and admittedly requires a certain imagination, it offers several advantages;
the positioning of objects, for instance, can be controlled much better than by
placing them with e.g. a mouse. Applying modifications to a scene, e.g. to hide
certain objects for a short time to decrease rendering time for a preview, is easily
achievable by just commenting out a line. Moreover, this format provides the useful
capability of generating scenes or objects using macros, which makes creation
of e.g. trees, grass, etc. very flexible and easy. The sky-scrapers in the first
screenshot were done using a macro.
Moray, a graphic modeller for POVRay is available. However, it is shareware
and there are only versions for MS-DOS and Win32. The MS-DOS version runs under
OS/2, but it is neither up to date nor will it be updated any more. I had a short
look at Moray and it seems to be a powerful program, but I found parts of the interface
to be overly complicated. There is also a native, free modeller called ForeSpace
(available on Hobbes) for OS/2 PM that seems to be quite OK (I had a very short
look), but seems to still contain some bugs.
Besides the port to OS/2 by Stefan Schwarzer, there is another version by Alexander
Mai. His package also includes a realtime viewer for XFree86/OS2. A comment from
Stefan:
Both ports (Alexander's and mine) are based on the same version of POVRay and have their pros and cons. As Alexander's port is compiled for XFree86/OS2, he could offer the realtime preview very easily. My port includes the POVRay help as INF file and a few REXX scripts to create some desktop objects for drag and drop rendering. I guess the best is to use my port with Alexander's binary ;-).
To draw the conclusion: POVRay is a powerful tool for creation of computer-generated
images whose usage might not suit everybody, but which honours the work invested
with remarkable results.
References:POVRay |