
Perlin Noise Raycasting on the GPU
7 months ago
my dear flickr, vimeo and skype buddy Marcus Wendt made me curious about Raycasting so this is a very first try of Raycasting in GLSL. For the Data volume I simply used some 3D perlin noise. I think this method is really promising, since it is a lot easier to implement than marching cubes in my opinion and should have better realtime possibilities on up to date GPUs (which I don't really have right now).
I will propably work on this idea a little more serious when Macs snowleopard and OpenCL will be released.
this tutorial and a few papers I found online was really helpful:
daimi.au.dk/~trier/?page_id=98
I will propably work on this idea a little more serious when Macs snowleopard and OpenCL will be released.
this tutorial and a few papers I found online was really helpful:
daimi.au.dk/~trier/?page_id=98
-
Vimeo: About / Blog / Developers / Jobs / Community Guidelines / Community Forums / Help Center / Site Map / Merchandise
/ Get Vimeo

Previous Week
a|x
The results I've been getting are definitely intriguing, but also definitely not quite right.
Here's a couple of examples:
machinesdontcare.files.wordpress.com/2009/06/tb_trier_borg_notright_01.png
machinesdontcare.files.wordpress.com/2009/06/tb_trier_borg_notright_02.png
machinesdontcare.files.wordpress.com/2009/06/tb_trier_borg_notright_03.png
As you can see, the view through each face of the front-face cube looks OK, but doesn't match with the view through the other faces.
Just out of interest, are you using a cube as the geometry to render the volume, or a plane? It seems unclear in Peter's writeup.
Sorry for all the questions...
a|x
Your welcome!
I got my shader working in the end. It's sort-of realtime (well on my ageing MacBook Pro, I get around 12fps at 640x360).
Here's a couple of examples of it in action:
vimeo.com/5181309
vimeo.com/5181078
You're right though, I imagine separating the texture-creation and rendering steps would probably speed things up. Unfortunately, I'd need to create a custom OpenGL plugin for Quartz Composer to be able to deal with 3D textures. It's something I'm planning, but I'm not there yet.
I'll have to look into using a cube to render the volume again. It wasn't working for me last time I tried, so ended-up rendering to a quad, and taking the frontface and backface-culled textures as inputs to the shader.
There's potential for more fun with this one, I think :D
a|x
a\x
But generally you are right, openCL should be great to give it another try. even though I dont think it will be a big difference since its on the GPU allready anyways. The biggest benefit is propably that you can program more in a c style way, since you have easy access to all the pixels and rays while in the shader you can only acess the current pixel/fragment at a time without knowing whats going on around it (unless you have some kind of texture to sample from).
I am currently working on someother realtime rendering stuff and actually I am looking alot more forward to an openGL 3.0 implementation on mac than using openCL :)
My experience so far of using OpenCL in Quartz Composer has been mixed, I must admit. I'm intrigued by the possibilities, but it's flakey in Snow Leopard at the moment. I've been getting lots of crashes, quite a few of which have been of the nasty kind, requiring a hard-shutdown.
I'm going to try and emulate some of the things I used to do with GLSL shaders, so I can make some kind of meaningful A/B comparison in terms of speed.
What's the deal in terms of OGL 3 on the Mac? I was hoping for some kind of Geometry Shader patch in QC 4, but no such luck, sadly....
a|x
1. better Multisampling on an FBO (GL EXT framebuffer multisample) for anti aliasing in an deferred renderer for instance.
2. GLSL #130
3. alot of useful extensions in the core
a|x
a|x