Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Andy Luedke, posted on October 30, 2000




Image Description, by Andy Luedke



I'm a Senior at DigiPen Institute of Technology, and in my raytracing class I made this raytracer. This scene file was created by my teacher, and I must say I was a little surprised at first that my tracer could actually make it look so wicked. I believe there are 15 lights in the scene, with the three spheres, 5 columns (made as quadrics), and the polygons. I went ahead and busted out an image with the phong illumination and soft shadows, and here's the result. I've been working on transmission for a day or two, but it's not really in a state to demo yet.

BTW, with soft shadows calculated for each pixel (up to 19 shadow feelers per reflection), max depth of 30 for reflection, and phong illumination, this took about 8 minutes to render at 1000x1000 resolution on my P-III 650, and no, I don't do any of the sneaky tricks for optimizing raytracing at the cost of precision.

-Andy Luedke
aluedke@digipen.edu


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Mace

October 30, 2000, 04:05 AM

Thats some beautiful eye-candy. Thanks.

One thing though... Im curious about where you placed the
lightsource that throws the ball shadows on the ceiling between the two pillars. Or is it some kind of reflection?

 
Navreet Gill

October 30, 2000, 04:43 AM

very cool stuff man... I am just wondering... how hard is it to learn ray tracing? and how big can the code get?

 
Alexander Blach

October 30, 2000, 05:24 AM

Well, in my opinion raytracing is very intuitive. Just read about it. When you understand the basic concept of it you should get quite good results pretty soon.

 
Jrz

October 30, 2000, 07:20 AM

Do you have any good books/urls about ray tracing?

 
YYRaVeNYY

October 30, 2000, 08:45 AM

Yo, you did a good job!
Perhaps you could increase the image quality by using more than one view-ray to calculate your pixel color. That would smooth your image a bit. It also will increase your rendering speed a lot, but the result is very good...

 
Strepto

October 30, 2000, 09:30 AM

Hi

Im writing a ray tracer too. Altough its for realtime purpose. When Im finished with it, matter of weeks, I'll post it here an image of the day maybe. You say you don't use tricks to speed your raytracer. I do! But I also concentrate on maintaining good image quality. Currently it runs 19fps in 320x200.

If you are a guru in raytrace speedup tricks Id like to share ideas with you...

 
Dex

October 30, 2000, 09:47 AM

That looks great, you'll probable pass that class :)

One question, does the resolution (which seems a bit high, being 1000x1000) make the raytracer a lot slower, or just a bit?

 
bit64

October 30, 2000, 09:54 AM

Nice screenshot.

Couple of questions for you:

1) Do you like Digipen? I have a BS in CS and was considering going to a school like Digipen, to focus more on Graphics programming. Do you think this would matter?




2) Does your ray-tracer handle objects that aren't primitive? I notice that your scene is made of spheres cylinders and planes, could you render a sponge or a leaf? Also, you say you are a senior at Digipen, is this the most complex problem you have worked on in the way of graphics programming? Do you work with realtime applications?



Did I say it was a nice screenshot? =) It is.

 
morgan

October 30, 2000, 10:00 AM

Straightforward ray tracing is very easy to learn; it should take about a week of hard work to have a decent ray tracer. The shading algorithms are the same for writing a triangle rasterizer; the only thing that is different is how you compute which pixels to draw.

The complexity is when you try to be fast for complicated scenes, or when you try to intersect complex surfaces. It is basically a visible surface determination problem.

-m

 
Max

October 30, 2000, 11:29 AM

"One question, does the resolution (which seems a bit high, being 1000x1000) make the raytracer a lot slower, or just a bit?"

For a standard ray tracer, each pixel is calculated independently, so the rendering time is directly proportional to the number of pixels in the output image. So yes it tends to be a lot slower.

Max

 
Jeroen

October 30, 2000, 12:15 PM

For a good introduction to raytracing, try "Advanced animation and rendering techniques" by Watt&Watt (It's in the book review section). It has 3 chapters devoted to it: A basic introduction, a practical approach and an advanced chapter with improvements (speed- and otherwise) on the basic algorithm.

Jeroen

 
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

 
Dex

October 30, 2000, 03:14 PM

Thanks Max,

I should have realised that though :)

 
DarkReaper

October 30, 2000, 05:15 PM

Very nice, I wish phong was supported by video cards. Would you mind posting the source code for that? ;)

 
Tim Wojtaszek

October 30, 2000, 05:19 PM

Another question about Digipen if you don't mind. I attended a summer game programming course at the Canadian campus, are you there or the one in Washington? Have you been to the other? Thoughts about the two? While I was there I was talking with some of the recent grads, and one of them said that although he loved the school, he was getting turned down because he didn't have an accredited (sp?) comp sci degree. I was wondering what your take on this is, and how your experience has been with gaming companies with regards to degrees. I personally think that if you can show them a demo to prove your abilities that should demonstrate your knowledge, but not every company is like that? Anyway, nice pic, what games are you working on?

 
Ezra

October 30, 2000, 05:44 PM

As far as source goes, I can't exactly do that... Everything I develop at DigiPen is DigiPen's property, because of the academic licenses and such. That binds me in many a way, including releasing source developed here.

As far as DigiPen goes, I'm not worried about getting a job. The degree will be accredited soon, which will make my degree accredited whether I graduate before or after DigiPen becomes Nationally accredited. I attend the Redmond, WA campus, which is the primary now. I don't even know if they use the Vancouver anymore other than for workshops. You talked about a demo, and from my time at DigiPen, I'll have 4 fully playable demos, which should get me a good lead over the comp sci major from the major university. Right now, the Seniors are making a team-based, ninja capture the princess game. I'm working on a webpage, which I might be able to post a link to here sometime.

Andy Luedke
aluedke@digipen.edu

 
Kevin

October 30, 2000, 07:53 PM

Out of curiousity how many other people who read this board are near the Digipen, Redmond, Wa. campus? I do not attend Digipen, but pass by it nearly every day. If there are enough people with an interest, perhaps it would be neat to get together?

Also, for persons in the Redmond, Wa area, Digipen hosts a monthly gathering of game developers titled "Sputnik." However, since I have been attending Sputnik (hardly at all now :-( ) it has focused less and less on code. I have wished that there was another Sputnik that focused more on code and less on post mortems (as important as they are), etc. If there were enough persons with an interest, it would be neat to get together on an informal basis (e.g. going out to pizza and/or beer together) and talking computer graphics and science.

Anyways, that was just a thought.

Ezra, good job--the reflections and light model are right-on!

 
Vorteks

October 30, 2000, 09:58 PM

Truly amazing! I don't yet have the skill level to do something like this, I'm still developing my first 3D engine, but I hope I will someday post an image like this one.

 
Dan MacDonald

November 01, 2000, 08:40 PM

I drive by digipen on my way to work every day

 
DarkReaper

November 08, 2000, 03:45 PM

You can't give us the source, but can you give us the executable to stare at?

 
This thread contains 20 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.