STARGÅTE

Charles Wallace

CSC-471-01 Spring 2004
Introduction to Computer Graphics
Final Project

Main Scene

General Description:

For anyone who hasn't seen the 1994 movie "Stargate™", or the still-running spin-off series "Stargate SG-1™," the stargate is an interstellar transportation device. It is a giant ring that allows any object (including people) to pass from one planet to another simply by dialing an address and stepping through the portal. The dialer, or DHD (Dial Home Device) is the squat object in the foreground. The stargate itself is the big ring in the background. The way an address is dialed is typically by hitting 7 symbols (out of 39 total) on the DHD that correspond to 6 coordiantes in space, plus one for point of origin. An inner ring spins around so that each symbol can be aligned ("encoded") with the appropriate chevrons, and set, or "locked" into place. When the 7 symbols are locked in, the stargate activates. The portal (an outgoing wormhole) appears as a mass of water that appears out of thin air inside the inner radius of the gate. First it "flushes" forward in a spherical shape, then pulls backwards in a conical shape, then comes to rest in the center of the gate, appearing as a glowing, gently rippling pool of water.

This is primarily an artistic piece, with limited interactivity. My stargate does everything except create a tunnel through space connecting far-off extra-galactic planets. The main character from the show, Col. Jack O'Neill, said it best:

"Kind of a ring-thing. Comes with a dialer with symbols. It spins around and lights come on and it kinda...flushes sideways."

User's Guide:

Firstly, the camera is fully mobile. The user can rotate it by clicking and dragging the mouse. The user can also use the arrow keys to move the camera. Left and right "strafe" the camera side-to-side. The up and down arrow keys move the camera forward and backward, respectively. The user can also mix and match those three types of camera movements (rotate, left/right, forwward/backward). The camera code, though written by me, derives its principle from Pete Lawrence (CPE major who took 471 in Winter 2004), who had cool camera code that I wanted to understand and emulate.

Secondly, the user can utilize several keyboard commands to change the program:

'q' or 'Q'
Quits the program.


' ' (spacebar)

Activates the Stargate startup animation. The gate will dial a pre-programmed address (the planet Abydos in the movie), activate, and turn off after 38 seconds. (In the show, a wormhole can typically only be sustained for 38 minutes before the gate shuts off.) Since the animation runs on an independent timer, it is usually a good idea to alter only the camera during the process. Hitting any of the other command keys during this time may result in some strange behavior.
'w' or 'W'
Cycles through the three wormhole stages: off, flushing, and waving. Originally a testing command, I left it in for the user to play with.
'd' or 'D'
Cycles through the three wormhole drawing stages: mesh, flat shading, and smooth shading. The smooth shading looks the best, the flat shading gives the user a clearer view of how the light is reflecting, and the mesh shows the user what the wormhole really looks like under the guise of water. This is also a testing command left in for fun.
'e' or 'E'
Toggles the fog on Earth.
'a' or 'A'
Toggles the fog on Abydos.
'p' or 'P'
Switches between the two planets.
'f' or 'F'
"Flushes" the stargate. More testing fun.
's' or 'S'
Toggles the spinning of the inner symbol ring. The ring reverses direction after each stop.
Numbers '1' through '7'
These control the three stages of each of the seven chevrons: off, encoded, and locked. Off is where the chevron sits in its original position and remains unlit. Encoded is when the chevron lights up and shifts inwards. Locked is when the cvevron snaps back into its normal position, but stays lit. (It should be noted that a stargate actually has 9 evenly-spaced chevrons around the outside. Only seven are needed for standard use. An eighth can be used as an address extension, analogous to an area code for a phone number. The use of the ninth cevron is still unknown. Since most stargates are positioned standing upright encased in stone steps, only 7 of the 9 chevrons are usually seen.)
'r' or 'R'
This resets the program to default values. The camera moves to its starting point, and the stargate is turned off.
'h' or 'H'
Prints a help menu in the command window.
There is also an easter egg (pictured below) that is up to the user to find. If you're a fan of Ambrosia Software games, you know what to do.

Thirdly, when the gate is active (the wormhole is waving), the user can move the camera through the wormhole and appear on a new planet! (Actually, the scene simply changes. As I said earlier, wormhole physics is a hell of a thing to get to work correctly.)

Technical Description

I used a lot of GLUquadrics. The gate is made of 3 disks and 2 cylinders. The DHD has ~22 cylinders, 2 spheres, and 3 disks. Thankfully OpenGL automatically creates normals for these. I also used quite a few GL_POLYGONS. The obelisks, chevrons, and stairs are all made of them, and I hand-crafted most of the shapes by hand ? first on paper, and then in code. I wrote the normals too (and did NOT use GL_NORMALIZE), so that the lighting would look good. My notes are full of various little drawings and calculations, the most insane of which is a diagram of the triangle (.m) mesh I wrote by hand in SimpleText and then fixed in Notepad. It has 413 vertices, connected by 760 triangles. Did I mention that I was insane?

The texturing also took a good deal of time and painstaking work. Each texture you see in the scene was run through Adobe Photoshop for, at the very least, resizing, and at the very most, complete alteration. The rock and birck textures of the stairs are a good example of the former, while the symbols on the stargate are a great example of the latter. Whatever time I spent in lab working directly on the project, I spent an equal amount at home customizing textures and writing my circle mesh. And writing this report, come to think of it. I spent a lot of time on this project, making it as accurate as possible, and I'm pleased with the result.

MALP Transmissions

(It makes sense if you watch the movie/show.)

In the effort to not get myself or Prof. Wood or Cal Poly(™? They wish!) sued by the Sci-Fi Channel™ or MGM™, I am not going to post any pictures from the show or movie on this project report page. If you are interested in comparing my project to the "real" stuff, look up some images on Google™; that's where I found all of my inspiration. Don't bother looking for this exact scene, however; I made it up. The whole thing is just a mish-mash of different shapes (obelisks) and ideas (ancient Egypt / Abydos) I liked. Most of the textures I used also came from various sources across the web. I did not make notation of them as I went, so if you see this and you hate me for stealing your stuff, I'm sorry. At least I'm not distributing this stuff for money.


"Kind of a ring-thing."


"Comes with a dialer with symbols."


"It spins around..."


"...and lights come on..."


"...and it kinda...flushes..."


"...sideways."
 


After I took the initial screen shots, I finally finished the DHD, and took some pics of it. If you look at the above pictures,
you can see the difference. I originally left the rim off of the DHD design because I wasn't sure I could make it look right.
Once I got near the deadline, I took some time to toy with it, and got it to look pretty true to form.
 


A close-up of the wormhole / water.
 


A close-up of the wormhole / water mesh. It simulates waves with simple sine functions altering the height of the z-axis coordinates.
 


My night-time "easter egg." I stumbled across this inversion code entirely by accident, but kept it because it looks so cool.


My new world - Earth. Specifically, Big Sur. I think the Greek columns work well with the scene.
(Don't the columns look they are holding up the sky?)


Big Sur from the other side.


What would Big Sur be without fog?


Come to think of it, Abydos could use a severe sandstorm, like in the movie.

Resources

For the most part, I used Google to grab quick data, so a lot of sites aren't listed because I didn't keep track of them. The most useful sites I did keep track of:

Thanks