If the Internet is a series of tubes, then this is the catch-basin.

Gimp Tutorial - Mirrored Ball on Checkered Plane

Date/Time Permalink: 07/15/07 07:30:20 pm
Category: Graphics Tutorials

I can hear everybody now: "Petey!" you all say, slapping your foreheads Howie-Mandel-style, "Can't be!!!" Everybody knows that Mirrored Ball on Checkered Plane is the exclusive domain of 3D ray-tracers, in programs like Yafray and Blender and POVray, and in fact is such a cliche that it's the canonical first image you post in a POVray group as a rite-of-passage.

You're right; I'm pulling your leg. Gimp isn't a ray-tracer, no way, no how. To quote the Cheese Shop sketch, I was deliberately wasting your time. However, you can fake it. So this will be a faux Mirrored Ball on Checkered Plane. Not for art's sake, nor skill's, but for the sake of being a smart-ass.

How to do Mirrored Ball on Checkered Plane in Gimp

1. Start your new file and make a checkerboard with Filters-> Render-> Pattern-> Checkerboard. Do a little math to be sure the checkerboard maps evenly to the plane.

step 1

2. Get the Map Object dialog with Filters-> Map-> Map Object. In the dialog's 'options' tab, select 'plane', 'transparent background', and 'tile source image'. In the 'orientation' tab, under 'position' move the 'Z' slider to -0.60000 and under the 'rotation' section move the 'Z' slider to -85.0. If this part seems to be screwed-up, it's because it is. See Irrelevant Rant Δ at the end of this post.

step 2

3. Next, select the top half of the image with the box selector and delete it, cropping the horizon.

step 3

4. Name the current layer "Plane', and make a new layer called 'Sky'. Move Sky below Plane.

step 4

5. Use the gradient tool to drag down a sky gradient. Here I used the gradient 'horizon 2', with a vertical guide to keep it straight, and dragged about 8/10ths of the way down to get the horizon in the right place.

step 5

6. Make another new layer named 'Clouds'. Keep Clouds between Sky and Plane. Turn off the eyeballs on Sky and Plane to make them invisible. Get the paintbrush, select a sphere brush, make white the active foreground color, and draw some clumps of spheres on the Cloud layer.

step 6

7. Clouds not poofy enough? Do a Gaussian Blur at 25.0. Better now?

step 7

8. Select and drag and copy and paste and resize, rotate, and skew and overlap the clouds to your hearts content. You almost can't go wrong with clouds. Then quit playing around and turn the sky and plane back on; we're almost there!

step 8

9. Do Image-> Flatten image. Remove the vertical guide. Duplicate the layer and name the bottom one 'background' and the top one 'ball'.

step 9

10. Open that Map Object dialog again and this time select 'sphere' in the options tab and in the orientation tab move the Position's Z slider back to -0.00000 and the Orientation's Z to plus-20.0. Since mirrored balls are shiny, go to the Material tab and play with the numbers to make it look more polished. generally raise ambient, diffuse, and specular. Don't touch 'highlight' - it's broken.

step 10

11. Add you a drop shadow layer and resize it into position. If you're really picky, select a tiny sliver of a box along the horizon and Gaussian Blur it at about 11.0. Flatten the image.

Tada!

And that's Mirrored Ball on Checkered Plane... the HARD WAY!

Δ Irrelevant Rant:

The designers goofed in the orientation part of Gimp's Map Object dialog. The 'position' elements of X, Y, and Z are correct: X moves it side-to-side, Y moves it up and down, and Z moves it closer and farther away. This movement is along the axis. Rotation should be around the axis - perpendicular to it. In the 'rotation' section of the dialog, however, the Y element is correct while the X and Z are backwards.

Check POVray's discussion of co-ordinate systems. Do the "Computer Graphics Aerobics" exercise.

Rotating on the X axis *should* wobble top and bottom.
Rotating on the Y axis *does* wobble left and right, albeit right-handed instead of left-handed.
Rotating on the Z axis *should* rock from side to side like a roller-coaster banking.

How annoying.

Now, I'm just doing this to call attention to a lack of consistency within Gimp's own dialog, and to explain to new folks who are just learning 3D graphics why it is they feel cloudy and confused when looking at this dialog. As soon as I ferret out the right person to snivel at I'll snivel - if I was a tenth the programmer I wish I was I'd fix it myself.

Update: 9/29/07 - Here's a 3D 8-ball over at PolishLinux, done with similar techniques.

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon