Thursday, November 20, 2008

FBO Multisampling

I was using pBuffers in OpenGL when FBOs were coming around. Moving to FBOs seemed like a huge increase in simplicity and functionality. I started using them all the time. However, I have always wanted to add a little bit of anti-aliasing, but never quite knew how.

Sometimes googling for OpenGL functions returns pages of garbage and spec files don't always provide clear examples to use. Well, I have found a web page of someone who has had the same problems and has posted his solution including the setup, blitting, etc.

Normally I wouldn't post a blog on a code snippet, but I think this deserves another link so more people will run across this little OpenGL gem.

Thanks, Stefan!

(click here) for multisampling in an FBO.

Friday, November 07, 2008

Sunflow - A Java ray tracer

After all the posts and articles I've written on why I don't think interactive ray tracing is the future of games, I have always said ray tracing has its place. One ray tracer I have become acquainted with a bit ago was Sunflow, a really neat Java ray tracer written by Chris Kulla.

Ajax model rendered in Sunflow by Tartiflette

First of all, this guy knows ray tracing. He's a programmer at Sony Imageworks and has created a very robust ray tracer with a very intuitive code base. Some may wonder why someone would write a ray tracer in Java when C++ is clearly faster. It's true, most C++ code runs faster than Java if its written by a competent programmer (which he is), and even Chris admits this. However, he notes that in his experience C++ is only about 20% faster and for a non-interactive renderer, this isn't much of an issue. Especially since writing it in Java would make network rendering much simpler (see project Helios). If you are familiar with ray tracers, you can open up the source code and easily navigate around and see what is going on.

The Sunflow project is a couple years old now and has a host of features including caustics, normal mapping, photon mapping, multi-threading, and a shader API that allows you to write your own materials in Java. Many people have provided exporters from Maya, Blender, XSI, and a few other modeling programs.

Although it's only version 0.07.2, it is stable and supports many features that most artists will be satisfied with. So check out the website or at least look at the gallery.