Final Project
My goal with this project was to generate a cool looking scene utilizing
as many of the functions of my ray tracer as possible. So I got this idea
to build a 3D arcade in the computer. First I needed some kind of model
for the arcade. Next I planned on adding some textures to make the arcade
look real. Finally, I would add lighting and maybe a table to give the scene
some character. Here's how it went. . .
Step 1: Geometry
Well, when you need a model for something, what do you do? Look on
the internet of course! While this is often the best way to go, finding a
compatible 3D model of an arcade is no easy task. I gave up on that
within an hour of looking. So, my only solution was to do the model
myself. I wasn't too worried about this. I figured an arcade is a simple
enough object that I could just enter the geometry by hand. So I went
to NickelCade to measure some arcades and take some pictures. I
was in and out in about 20 minutes. I had two drawings of arcades,
complete with measurements, and a plethora of pictures. So I got home
and started unloading pictures into my computer. Well, it turns out that
glare is quite a problem indoors and with bad lighting, so I was only able
to use a couple of the pictures as textures. Anyway, on to getting the
thing in the computer. . .
Step 2: Data Entry
This is what took most, well, nearly all of my time. I have a great little
ray tracer, but entering geometry into it is another story. I had to figure
out how to triangulate a large object (with plenty of non-90 degree
angles) in a 3D coordinate system. While this is not too difficult as
long as you know your basic geometry skills, it is VERY time
consuming. Not only do you have to enter every vertex for every
triangle, but you have to enter the vertices in the right order to make
sure the normals come out right. Anyway, long story short, I finally got
it all entered, with material properties set and surface normals correct.
Here's the results:
Here's the basic scene. The ceiling is the light source. The floor is glossy.
The
screen and the top of the arcade are obviously texture mapped. I was going to
make a cylinder primitive for the joystick, but it seemed like so much work
for
such a small object. Besides, I think the reflective sphere spinner and buttons
are cooler anyway.
Here's a closeup of the screen. Good ol' Reptile. The texture isn't perfectly
rectangular,
which I did on purpose. The corners are rounded off in an attempt to create
a bubble
effect on the screen. Also, the screen is recessed in the machine.
Here it is at a couple different angles. You can see that the control board
is tilted, as
well as the top. Hey, I think I just invented a new computer mouse style. .
.
All the above images are 512x512, 100 samples/pixel. I will put some higher
samplings
on here when I get a chance.