Monday, April 19, 2010

Cover art design with PovRay 2

This is the second blog in a multi-part series on Pov-Ray.

Pov-Ray (Persistence of Vision Ray Tracer) is software that renders a 3-D image from a script. Pov-Ray was initially started in the 1980s by David Kirk Buck and Aaron A. Collins. In the 1990s, development was handled by a team of extremely talented and dedicated programmers who have produced upgraded versions of this remarkable, and free software.

Pov-Ray is covered in a very good article in Wikipedia. The Wikipedia article includes a superb, public domain Pov-Ray rendering, shown here:

Click on image for larger size

Before you try any project like this, you've got to start with something small. Every Pov-Ray newbie starts with a simple scene consisting of a ball, placed over a plane.

Here is an example:

Click on image for larger size

The Pov-Ray script for the scene is:

global_settings { assumed_gamma 1.0 }

// ----------------------------------------

camera {
location <5.0, -12.0, 2.0>
up z sky z
look_at <0.0, 0.0, 0.5>
angle 40
}

sky_sphere {
pigment {
gradient z
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.2 rgb <0.2,0.3,0.9>]
}
}
}

light_source {
<3, 1, 2>*1000
color rgb <2.2, 1.8, 1.5>
}

// ----------------------------------------

plane {
z, 0
texture {
pigment {
checker
color rgb 1, color rgb 0
}
}
}

sphere {
z*1.4, 1
texture {
pigment { color rgb 1 }
finish{
diffuse 0.3
ambient 0.0
specular 0.6
reflection 0.8
}
}
}


Every Pov-Ray script contains command lines that specify a camera, one or more sources of light, and one or more objects. The camera, light source, and objects are provided coordinates on an imaginary 3-D grid. The Pov-Ray script calulates the pixels on an imaginary camera screen (corresponding to the final image) receiving rays of light that leave the light source(s) and travel through scene. The color of the light that reaches each pixel position on the camera is determined by the properties of the objects in the scene.

Tomorrow, I'll explain a little more about the mechanics of building and executing a Pov-Ray script (called a .pov script) from within the Pov-Ray application.

- © 2010 Jules Berman

tags: graphic art, 3-D rendering, cover art, self-publishing
Science is not a collection of facts. Science is what facts teach us; what we can learn about our universe, and ourselves, by deductive thinking. From observations of the night sky, made without the aid of telescopes, we can deduce that the universe is expanding, that the universe is not infinitely old, and why black holes exist. Without resorting to experimentation or mathematical analysis, we can deduce that gravity is a curvature in space-time, that the particles that compose light have no mass, that there is a theoretical limit to the number of different elements in the universe, and that the earth is billions of years old. Likewise, simple observations on animals tell us much about the migration of continents, the evolutionary relationships among classes of animals, why the nuclei of cells contain our genetic material, why certain animals are long-lived, why the gestation period of humans is 9 months, and why some diseases are rare and other diseases are common. In “Armchair Science”, the reader is confronted with 129 scientific mysteries, in cosmology, particle physics, chemistry, biology, and medicine. Beginning with simple observations, step-by-step analyses guide the reader toward solutions that are sometimes startling, and always entertaining. “Armchair Science” is written for general readers who are curious about science, and who want to sharpen their deductive skills.