Math 155B - Introduction to
Computer Graphics - Winter 2004
Project #5 - Getting started with the
RayTrace software
Overview: For this assignment you will manage to
compile and run the RayTrace software. You will also create a simple scene
by modifying RayTraceData.cpp or RayTraceData2.cpp in order to learn how to use
the ray trace software.
Due date: Wednesday, March 2, midnight.
Turn in: Email (or post on the web if very large) a GIF or JPEG
file showing the scene you have created. Grading will be a on a Yes/No basis.
What to do:
-
Get the source and project files in one of the following ways:
- In the public class directory in the APM basement computer lab PC,
there is a folder called RayTraceProjects. This contains a
Visual C++.NET version of the project (or "solution"). You should also
be able to get these files by ftp or ssh from ieng9.
- Download a
Visual C++ 6.0 version of the project from beta version being posted at
the textbook's web site.
- IMPORTANT: Due to bugs in how
ACS remote mounts volumes and/or in Visual Studio, you can only run Visual
C++.NET on the APM basement computers if you put all the files into a folder
in the Workspace folder. THIS
WORKSPACE FOLDER IS NON-PERMANENT AND WILL BE DELETED WHEN YOU LOGOFF OR EVEN
IF THE MACHINE CRASHES. It is
possible to recover files from the Lost and Found. See more below.
- Look at the sample images and read the overviews on the web. The
web site for the new beta version of the software is at
http://math.ucsd.edu/~sbuss/MathCG/RayTrace/index2.html. There is a
supplemental page that describes the
differences between Release 1.0 and the
Release 2.0 versions of the software. Appendix B in the book describes
only the Release 1.0 version of the software.
-
Run the main project RayTrace (make that the "active" or "startup"
project in Visual C++). At first there is a small OpenGL rendered window.
Press "g" or space to switch to ray tracing mode. Press "G" to return to
OpenGL rendering. Use arrow keys to adjust the view position, and HOME/END
to adjust the distance. Resize the window bigger, but be prepared to wait
longer.
-
For large windows, be sure to be using Release mode or some optimizing
compiler.
-
Look at the documentation in the appendix. Look at the source code in
RayTrace.cpp, RayTraceData.cpp, RayTrace2.cpp, and
RayTraceData2.cpp. This will look confusing at first, but I will go
over a lot of it in class on Friday.
- Change the scene shown in either
RayTrace or RayTrace2. At a minimum use a shape, such as a
torus, that does not exist in RayTrace. Experiment with materials
a little. Find out how to make a transparent glassy object.
- Capture a screen image and mail it to Peter Schwer
(pschwer@cs.ucsd.edu) and me
(sbuss@ucsd.edu).
Grading: Just your emailed image (GIF/JPEG format)
will be checked.
Workarounds: Strategies for
dealing with the fact you need to put files in the Workspace folder for Visual
Studio to work.
Do one of the following:
- Be very careful to copy all your files back to a permanent location,
such as your ieng9 class home directory before you log out. Also, do
this before the system crashes or freezes up on you. (Anytime you make a
lot of changes, save a copy of your source file somewhere).
Every time you login, you must copy the files back to the workspace
area.
- Alternately, put the important source files (mostly, the ones you will
modify, such as RayTrace.cpp, RayTraceData.cpp, RayTrace2.cpp,
and RayTraceData2.cpp) into a fixed location in your permanent ieng9
class home folder. Put these files into the RayTrace and RayTrace2
projects in place of the source files presently there. Then update the
#includes in these files to refer to the correct locations for the header
files. (Or update your #include path variable.)
This second approach takes a little work to setup, but is
more foolproof. You will still have to copy all the project and solution
files and the rest of the source files to the workspace everytime you login,
but you do not need copy anything out of the workspace before logging off.
- If all else fails, try to recover your files from the "Lost and Found"
folder in the C: drive.