Buddy's Homepage!

About Me
Fun Stuff

Buddy's First Raytracer

Nov. 16/02
Check out my CS488 page to see what my new raytracer can do!

Mar. 11/02
Here's some pics of the normal interpolation on a model. The left ball is the regular model.. the center is the model with the normals interpolated between the vertices.. and the right one is an actual sphere. There are some incorrectly shaded triangles on the very right edge of the center sphere if you look carefully, I'll have to look into that..

Mar. 9/02
First off, a little something for you're enjoyment!

This image demonstrates all the newest features:
  • CSG
  • Sense8 NFF model loading
  • Boxes
The objects on either side demonstrate the CSG (reflective sphere minus sphere on the left and a box minus box on the left) and the center object is a Sense8 NFF model of a Klingon Warbird (found at http://www.dcs.ed.ac.uk/home/objects/wtk.html). I still have to convert boxes to use quads instead of triangles, and I want to add normal interpolation to the models.

Mar. 8/02
I'm sure no one else noticed, but I had this dumb-ass naming system for my raytracer pics (the day I put them on the site).. now I'm scrapping that and going for descriptive names. I had some weird idea of making it easy to link my picutres to which update I had (or to keep a rough time-line of my raytracer), but it's gone now. The other new thing is I've decided my raytracer warrants its own section now! No more hidden away in my pictures page, but now a page all it's own! (It's even got it's own menu item (look near the top of the web page))
Anyhow, for more exciting news.. \ .. CSG works! :>

I made a box class last night as well.. if you look closely you'll see missing dots in some places, and some bright spots along the edge of the upper box, this is the artifacting from the fact that each side of the box is made up of 2 triangles.. but this weekend I'll change it over to use one quad per side and that should fix that right up!
Back to the CSG.. although I've only shown it with the sphere and the box, it works with any of the primitives I have implemented and looks darn good if I say so myself! I'll also update the code to the newest version soon. The CSG stuff looks really cool if the object is reflective, but I only had a few minutes and this scene was already set up (it's a basic scene, but I was copying the first few pictures from http://www.cl.cam.ac.uk/Teaching/1998/AGraphics/l3a.html). The top half of the image just displays the basic sphere and box objects, then the bottom half demonstrates the (going left to right) union, intersection and subtraction operators.
I'm glad it works.. didn't go to bed until 1:30am last night working on it! It's even cooler 'cause I figured out how to do it on my own.. it's pretty simple actually..

Mar. 7/02
Ok! Well I thought I was pretty much done with the ray-tracer but yesterday on the walk home from work I figured out just how easy CSG (Constructive Solid Geometry (ie: a sphere with a cylinder carved out of it)). So I spent last night making it work. Just one bug to find a way around and then I'll put up some screen shots!

Feb. 22/02
Sorry to let you all down, but this is not another update of my raytracer, rather it's just a point of information -- this is a great article on raytracing various 3D shapes. Maybe I'll finally add cones to my raytracer now..

Feb. 8/02
Hey all you raytracing fans, it's your lucky day! Here's the code for my raytracer. It hasn't been prettied up at all, so beware! I hope it helps you learn the basics of ray tracing. In fact, email me to let me know what you're doing with it.
PS - The raytracer now more nicely supports bump-mapping

Jan. 22/02
I've been doing a fair bit of work on the ray-tracing this past weekend. It now supports:
  • spheres
  • planes
  • triangles (but in a bad way, I'll improve the algorithm tonight)
  • point lights
  • ambient light
  • spot lights
  • procedural textures (including texture scaling and translation)
  • soft shadows
  • reflections (which can be set to any level of blurry-ness)

Two coloured spheres and a coloured plane. The plane and green sphere are also reflective.. (the hi-res picture has an extra reflective plane)

Cool semi-hacked bump mapping! Soon to be implemented nicely..

The standard reflective spheres above a checkerboard. Note the soft shadows!

Showing off spotlights. Each spotlight has the same inner cone angle with varying degrees for the outer cone (I think the outer cones are 0, 10 and 20 but I'm probably wrong)

Jan. 16/02
Here are some screen shots from my raytracer I am working on in my spare time.. this first picture is a little softened by the low jpg quality it was saved in.

Simple spheres and planes (with fake texturing). There are 5 spheres, 2 planes and 2 point lights.
Copyright © 1999-2013 Morgan "Buddy" Betts