GPU Raycasting Now Working

Finally got it to work!
So, here’s Borg and Blob surfaces rendered in a GPU-accelerated GLSL raycaster shader:

As you can see, there’s a certain graininess to the render. This I actually quite like. It can be smoothed-out by decreasing the step-length that each ray is incremented by, but this slows down render times exponentially.

Obviously, there’s no lighting calculation being done, and I’m not working out normals at all. I quite like the ghostly quality you get from this simple opacity-accumulation-style render though.

Thanks once again to Peter Trier for sharing his method, and I’d also like to thank Viktor N. Latypov for his encouragement on this project.

Here’s a clip of the shader at work on a Blob surface. I’ve added some colour to the rendering by mixing-in the ray XYZ-position as RGB colour, to add a bit of interest to the volume.

..and the Borg surface:

And this time, modulating the ray’s start position with live video input:


4 Responses to “GPU Raycasting Now Working”

  1. 1 Rob
    June 15, 2009 at 6:40 pm

    oh my! looks very good! will you be publishing your code on this one?

    • 2 toneburst
      June 15, 2009 at 9:56 pm

      Thanks Rob.
      My code is mostly Peter’s, in fact. Most of the work was in setting up QC and tweaking the shader code to work with an surface equation, rather than a pre-rendered 3D texture.
      I’d like to optimise the code a bit more, but I’ll eventually release the whole QTZ into the wild.

      Would be nice to produce a QC plugin to render 3D textures, too, with some extra options. That’s a little way in the future, though.


  2. 3 Peter Trier
    June 15, 2009 at 7:43 pm

    Hi Alex, thats is some beautiful and cool images. Glad you could use the tutorial.
    Keep it up.

    • 4 toneburst
      June 15, 2009 at 9:53 pm

      Hi Peter!

      Good to see you here. Thanks again for the code- I’ve been trying to do this for a while now, and am happy with the way it’s turned out.
      Now to find more isosurfaces to render, I think 😀



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Error: Twitter did not respond. Please wait a few minutes and refresh this page.

June 2009
« May   Jul »


Blog Stats

  • 477,478 hits

%d bloggers like this: