Sideband #47: POV-Ray 101

Sideband MachineBy all indicators (page reads, Likes, comments), most of my readers don’t find POV-Ray quite as interesting as I do. That’s too bad, because I’ve finally decided on a theme for this blog. It’s going to be all-POV-Ray all the time! Think of the fun we’ll have!

Yes, of course I’m kidding. Anyone who knows me at all (hello, have you met me?) would know better. Me, one topic? It is to laugh. Out loud. (Honestly, I don’t know how mono-topical bloggers do it.)

But I do promise this is the last post—for now—about POV-Ray. We’ll just swing by the gift shop, and then move on to other things.

stoolLast time I showed you how to make a stool (one, two, over a thousand, same thing; electrons are extremely cheap). The point was mainly to illustrate a bit of constructive geometry, the technique of building complex shapes from simple ones. I showed you some very simple examples in the first article.

The simple stool I made uses four cylinders for legs, eight more cylinders for the support rungs, and a combination of two shapes to make the seat. A flat wide cylinder might have made an acceptable seat, but adding a torus at the edge gives it a nice curve.

I mentioned that texture is a key in life-like image rendering. A huge part of the art here is the lighting of a scene, and the textures of the objects in it. Compare the image here, with its wood texture legs, to the images from last time!

Caged LightBack when we toured my virtual theatre I promised to show you how I made one of the back stage light assemblies. I’ve worked more on that assembly since the tour, so the image  here looks a bit better than in that post.

Take a moment to look at the lamp and see if you can determine what went into its construction. I’ll give you a hint that it uses a lot of cylinders, two spheres and five toruses.

Or tori if you prefer. (In Latin, do you call a love of toruses Tori Amos?)

Most, if not all, the cylinders should be easy to spot. They’re used in the base as well as for the straight wires of the safety cage. The base of the bulb is cylinder, and so is most of the glass envelope.

Click to see with textures!

With textures turned off. Click to see the difference with textures!

For the most part, the construction is very simple—it’s kind of just a bunch of cylinders—which is good, since its only purpose is to dress up my theatre scene a bit. The hardest part is curved wire at the end of the cage, and “hardest” in this case just means “not as trivial as the rest.”

This object, unlike the stool, is what prop people call a practical prop. That is, it really works. This light is an actual light in POV-Ray; it is one of the sources of light that illuminate a scene. In fact, the (need for) the light source came first; the idea to dress it up to look like something is fun (or art; whatever).

Caged Light (exploded)

Eleven cylinders, two spheres, five tori and one invisible box all to dress up a light source!

To the right is an “exploded” view of the lamp that reveals the individual pieces. In a real lamp, we could take it a part and lay out the pieces. In a CGI lamp, I just tell each individual piece to “be someplace else.” In the lingo, each piece is translated to a new position nearby.

(In both cases, click on the thumbnail for a full-sized version.)

The view also contains a small non-exploded version of the lamp in the upper left for easy comparison. (It also provides a simple demonstration of how objects can be scaled—biggered or smallered—in a scene.)

Between the little lamp and the parts is a diagram of how the end of the safety cage is made. It starts with three tori (reddish) which are rotated on 60° angles.  Then an intersection operation with a(n invisible) box keeps only the parts of the tori inside the box.

EPS Conduit

I’m working on an ‘EPS Conduit.’ This test uses just three cylinders with some special texture effects.

The glass and metal appearances come from textures. The light source itself (which is never actually rendered, hence the idea of making them visible) is in the center of the round part of the (yellow) bulb.

That’s the zero point of the lamp, its self reference point. Only the bulb and the six straight wire segments are left in their correct (non-exploded) positions; all the other pieces were “shoved” a bit.

As you might guess, the lamp components need to not block the light, so they are set to not cast a shadow. Light sources light them, but the light passes through to light objects behind them (it’s magic). The base is not so set, so it does cast a shadow.

It’s just a choice on my part. I went back and forth about letting the safety cage cast a shadow. The problem is that POV light sources are very sharp. With the wires so close to the light source, it casts giant, very sharp, shadows.

BOOL Engine

It’s like a tinker toy set for computer geeks.

In fact, those caged lights do cast large (but not as sharp) shadows. There are ways to make the shadows more realistic, but they increase rendering time significantly. (Many of the theatre images already take about an hour each to render.)

This concludes my brief tour of POV-Ray, but it’s hardly the last you’ll see of POV-Ray images here. It’s a wonderful tool for illustrating some of the things I want to talk about. I put it to use in the Dimensional Coordinates post, and I’ve used it a lot in these posts.

It’s a cool way to make something. It’s kind of like sculpting or building, but without all the marble chips or wood splinters.

About Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts. View all posts by Wyrd Smythe

4 responses to “Sideband #47: POV-Ray 101

  • Snoring Dog Studio

    It is cool! And no one will lose a finger in the process. I bet the learning curve for that software is steep!

    • Wyrd Smythe

      I suppose it depends on your background. If you bring a bit of image rendering, 3D manipulation, scripting experience and maybe a little trig, then it’s probably fairly easy to learn. If you have no background in any of those things, then there is a lot to learn.

      You can make a red sphere with:

      sphere {<X,Y,Z>, R texture {pigment {color Red}}}

      The X, Y, Z and R are replaced with numbers. The first three are the location of the sphere, the “R” is its radius. A one-foot diameter blue sphere 5 feet about the center would be:

      sphere {<0,5,0>, 0.50 texture {pigment {color Blue}}}

      In many regards, like English, the basics aren’t really beyond anyone’s grasp. It’s the developed skill and art that makes the difference. Some of it is pure time put in; some of it is aptitude for this sort of thing; some of it is background and inclination.

  • reocochran

    sorry, just want you to know i like your work! short and sweet. going to have a rough ride to work, snow! bleah! blah?

    • Wyrd Smythe

      I’ve had the wonderful advantage of working at home all week! I didn’t even realize we’d gotten another cold sna until I wondered why the furnace was working so hard to keep the place warm. Checked the weather, and it was -11! Ah, no wonder! Poor furnace!!

%d bloggers like this: