| Ezra October 30, 2000, 12:45 PM |
|
Hey, all. I guess I'll try to answer a few of your questions.
First of all, the entire scene is raytraced, so you get reflections of everything in the scene, so I imagine the shadows from the balls on the ceiling between the pillars is a reflection. All I know is that there are a crapload of lights, so I wasn't surprised by all the shadows everywhere.
As far as coding a raytracer, I'd say that the hardest part is to make things as fast as possible so you can actually test your code. I did my entire tracer hard-core C++ style, since it makes the intersections for all shapes easier to handle. I basically inheirit a baseobject shape with all other shapes, and then use a standard draw command on all objects in my list. Same with lights, but slightly different. I use function pointers for shaders and lighting calculations, so I can do things like switch between soft and hard shadows on the fly, and different styles of shading/illumination such as phong, semi-phong, diffuse, and solid color. As I said, the structure is the hardest part, but the intersection calculations are also pretty hard. Spheres are not bad, but quadrics get a bit hairy, and when you're taking a class for raytracing, you're bound to have to derive your own intersection equations for experience. I did hyperboloids.
As for optimization, I have optimized everywhere up to dropping intersection calculations on a per-pixel basis. Another student and I managed to get the intersection calculation of a polygon with an arbitrary number of sides down to rediculously few calculations, using a baricentric method.
Anyway, good resources... I probably learned the most from my teacher here at DigiPen, who definitely knows his raytracing. I gleaned a few ideas from Advanced Animation and Rendering Techniques by Watt&Watt. Some lighting stuff I learned in a different class, focused on polygon rendering. Also, check out the Raytracing news board - I don't know where it's at right now, but it's not hard to find.
My raytracer handles a bunch of different object, but I haven't gotten into the really hard things. As you can see, spheres, quadrics, and polygons are handled in the picture. I also can do convex polyhedrons (any number of sides), hyperboloids, planar ellipses, and cylinders. As I've said, I'm still working on transmission.
Lastly, I think someone asked about DigiPen. I think DigiPen is a great place to learn anything that has to do with game programming, which definitely includes graphics programming. I personally am tilted more to that section of game programming, but there are other areas such as physics and math, game design, networking, and such that you will learn along the way. DigiPen is tough, taking upwards of 13 hours a day. We make games every semester, so that is our main drain of time, but things like raytracing and math take up a lot also. There are certainly things that need to be fixed around here, such as the AI segment of game programming, but as it is, the school is unique and is definitely producing some good game programmers.
So, I hope I've answered the initial bouts of questions. Good luck if you're working on a raytracer.
Andy Luedke
aluedke@digipen.edu
|