Zombie Zen

Posts tagged "Raytracer"

Texture Mapping!

Posted on
Tree texture-mapped onto cube

It’s been a while since I’ve posted because of some events that required my attention, but I’m back with yet another goray rendered image! A lot has changed in the rendering infrastructure (refactoring and such), and now it supports spot lights and texture mapping! Texture mapping and Blender export have not been merged to the trunk yet, but they’re coming soon.

The other exciting news is, if you’re bold enough, you can play with goray, too! Check out the Sourceforge project!

After fixing my ray/triangle intersection code, I’ve moved to working on the material system for my raytracer. I’m starting on the simple material first: Lambert shading with recursive raytracing for reflection.

For those who don’t know that much about raytracing, the Wikipedia article is surprisingly informative. The cool part is that the same code that you use to compute the normal scene just gets called recursively to create the reflection. It also makes physics class fun when you can readily see that just by applying the Law of Reflection, you can make cool effects. Next stop, Snell’s law!

When you have a bug in an enterprise program, money is lost. When you have a bug in a graphics program, art is created.

I’ve been working on rewriting parts of the raytracer I wrote in Go in x86-64 assembly. The test model I’ve been using is Suzanne, one of the primitives in Blender. Needless to say, something in the assembly code is not right, but it’s the first actual image the raytracer has spit back since I removed the pure Go implementation of the ray/triangle intersection code.