Project: 3D Craft -- Gallery

Copyright (c) 1999 Chuck McManis, All Rights Reserved

Welcome to the gallery. With the August '99 release of the library it includes the ability to take a snapshot of the screen and store it in a "PNG" file. PNG stands for Portable Network Graphics and was created pretty much in response to the stupid patent on GIF images. PNG images are patent free and get good compression, especially on "artificial" types of pictures like things generated by my simple 3D code. You can read all about it on the PNG Home Page. If you create something cool with the library take a snapshot and send it to me at p3dc@home.mcmanis.com with a description of how it was created and if its cool I'll post it here.

Of course some browsers won't display PNG graphics, so I've converted the files to JPGs for putting here on the web site. Sigh.

The Gallery Proper

The image at right is the "Marble Cube." It was created by the simple demo ModelTest in the win95 demos directory. The neat thing about this model was that it was an easy test case for texturing since a cube is pretty easy to texture map. When debugging the code, having only six faces to deal with and a straightforward lighting model helped a lot. You can see the origin has X, Y, and Z arrows centered on it. These arrows are useful for orienting your eyes to the scene and are created by calling p3dc_draw_axes.


Blow it up!


Blow it up!

The image to the left is the "Marble Sphere". This is a sphere that was generated automatically by a C program I wrote that tesselates an octagon.That program was based on the sphere.c program written by Jon Leech. The sphere has 66 vertices and 128 polygons. It doesn't appear too round when you are up close to it, but it looks great when it fills less than 1/4 of the screen. And there is a two-tone version here.
The image at right is taken from "SceneTest" which I wrote to test multiple camera views. Its hard to tell from the thumbnail at right but there are actually three camera views being displayed. The top 2/3 of the image (640 x 360) is a 16:9 aspect ratio view being displayed by a fixed camera located at position [10.0, 10.0, -25.0]. In the lower right there is a 4:3 aspect ratio view (standard CRT ration) (160 x 120 pixels) that is coming from a camera located nominally at [5.0, 5.0, -5.0] but I say nominally because the program allows you to move it with the arrow keys. This camera is "targeted" on the moving airplane so it constantly changes its view direction to keep the airplane in sight. If you look at the expanded picture you will see that the airplane is heading for the sphere and the camera is dutifully tracking it. Finally there is a small square view (100 x 100) that is coming from a camera whose position is fixed relative to the flying airplane model giving something of a 'spotter plane' view. In the full size image you can see the plane in this view. This camera maintains an orientation that is identical to the model.


Blow it up!


Blow it up!

The image on the left is another in the multicamera series. This one is taken from a recent build of SceneTest which has a few objects and several views. The coolest thing about this one is that the sphere on the right is the earth and the sphere on the left is the moon! I built a new utility for tesselating spheres using latitude/longitude patches (rather than triangles) and built one with about 200 polygons. Then I slapped on the earthmap JPEG that is floating around the net (after converting it into a texture that P3DC understood of course!) This now gives P3DC the ability to do planets if you have a 256 x 128 texture you want wrapped around it. As above the views are:
upper left -- fixed view,
upper-right -- user camera view,
lower-left -- view from behind the plane.