Ray Tracer


  • Monday, July 21, 2008 - 19:50

    So far our reflections only work on surfaces made of materials that are perfectly smooth. In the real world not all surfaces are pefectly smooth yet are still reflective. So to simulat this for doing refletions we cast multiple rays out from the reflection point to caclulate the direction they are cast we take the normal of the surface at the hitpoint and purterb it using a random gaussian variable. The roughness/smoothness is the standard deviation of the gaussian distribution used for perturbing the normals. So the larger the standard deviation the rougher the surface appears.

  • Sunday, February 3, 2008 - 00:55

    A ray tracing project from my computer graphics class. We built our own ray tracers from the ground up, its pretty cool!

  • Saturday, February 3, 2007 - 12:23

    So far all of our objects are dull and flat, we could easily make this more cool by adding in reflections. The technique is simple, we cast the ray from the eye, hit the object, and then cast another ray reflected off the object. This creates nice reflective objects, the first one only allows things to reflect once.

  • Saturday, February 3, 2007 - 11:48

    What are Jaggies

  • Saturday, February 3, 2007 - 11:45

    So far so good, things are looking pretty spiffy. But there is still something lacking as far as lighting goes. Any ideas? There are no shadows! This must be fixed, we mush have shadows. So how do we do shadows? We cast a ray into the scene, it hits an object and from that hit point we cast another ray to all the lights in a scene. So for shadows we just add one more step, when we cast a ray from the hit point to all the lights in the scene we check to see if anything is between the hit point and the light.

  • Saturday, February 3, 2007 - 11:44

    Well, with the hit test now working, its time to move on to diffuse lighting. This is pretty simple todo, go check Wikipedia to find out how. This isn't a walk through of putting together a ray-tracer. Diffuse lighting on our three spheres: < > A plane added to our scene. < > The next step is to add specular lighting.

  • Saturday, February 3, 2007 - 11:42

    The first step is drawing a simple hit test. In other words, no lighting, no reflections, no fancy stuff. Just draw pure white if found an object and complete black if there is nothing there. Here is a screen shot of the hit test:

     

     

  • Tuesday, October 31, 2006 - 00:16

    A few posts ago I added super-sampling to the ray tracer to help take care of jaggies. If you remember, this consisted of sending more rays into the scene. There is a cost of sending in all of these added rays. Thinking back on the picture of the circle and the super-imposed grid we really only needed to fix the edges, the center of the circle didn't change at all. So we really wouldn't need to do anything to fix the non-existant jaggies in the center of the circle. So, in order to save on processing by not tracing any more rays than we absolutely have to while still looking good.