Isosurface Raytracer (With thanks to tonfilm)

toneburst's picture

This is my QC/GLSL conversion of tonfilm (Tebjan Halm)'s Isosurface raytracer shader for VVVV, based on original code by Keenan Crane. The isosurface is Paul Bourke's 'The Blob' (though I'll probably try adding other ones later).

I've also just added support for the the 3DConnexion SpaceNavigator, so if you have one, plug it in and see what it does.

It's not 100% ready, and will need a fast GPU. It works slowly on my MacBook Pro with X1600/256MB, but flies on my MacPro with a 512MB card.

Thanks to Tebjan, Guillaume Pouchoux (Desaxismundi) and Kineme's very own psonice (hope you're enjoying your holiday, mate), for all their help.

PreviewAttachmentSize
tb IsoRaytrace 1.0 (SNav).qtz89.12 KB
Isoray_01.png
Isoray_01.png82.28 KB
Isoray_02.png
Isoray_02.png71.25 KB
Isoray_03.png
Isoray_03.png98.05 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
GPU emphasis

I'm going to second that "will need a fast GPU" :) still trying to load it on my macbook (3 minutes...)... ;)

yanomano's picture
IsoRaytrace strange on PPC

Strange on my PPC G5 : the patch fully load with the isosurface raytraced for 1/4 second on startup, then I have just a raytraced sphere....

yanomano.

toneburst's picture
Odd...

Did you try any of the controls? Could be to do with the SpaceNavigator setup...

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

toneburst's picture
Sorry about that...

It IS a bit of a killer.... Hope it didn't crash your machine completely :(

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

yanomano's picture
ok

oh yes sorry! It works now thanks.

cwright's picture
no prob :)

It took a few more minutes, then I got the raytraced sphere at 60fps. any changes made it stall for a long time again though. No crashes though :)

toneburst's picture
Has anyone ever tried

doing an 'offline' render from QC? I image you could use an Image Writer plugin, and some LFOs etc. to automate some parameters, to do non-realtime rendering.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

toneburst's picture
Testing video embedding

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

toneburst's picture
Works then...

..cool.

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

echolab's picture
some results

hi alex

had a lot of fun playing around with your shader, even if it's far from realtime on my pb with x1600/256mb. respex for yor hard work!

i uploaded some of the screenshots to a flickr set: http://www.flickr.com/photos/27704199@N02/sets/72157605644058635/

greetz grischa

btw. big ups to all at kineme for what you are doing... .

toneburst's picture
Very Nice

Nice colour-scheme there! I wonder if it runs in realtime in the 512MB GPU MacBook Pros...

Glad you enjoyed the QTZ, anyway. All credit to Keenan and Tebjan for their original code. I've started working on an alternative raytracing engine based on some Apple example code, so maybe that will be faster. I'll keep you posted on my progress.

Cheers,

alx

Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

snerg's picture
Thanks for sharing

Thanks for sharing this!

I've played with several of your qtz patches now, I have so much fun playing with them that I didn't spend much time learning from the code just yet.

However I really think they will prove to be valuable for learning :)

Snerg

Markh's picture
Controls?

I get the same thing the patch fully load with the isosurface raytraced for 1/4 second on startup, then I have just a raytraced sphere. The only controls I can see are on the base layer.. The A1 A2 ect I've unpublished the imputs moved the siders and all I can change are the colors and camera view.... What do I alter to get the cool stuff!

regards Mark H

toneburst's picture
Ooops

I made a bit of a mistake in the original upload- if you don't happen to have a SpaceNavigator plugged-in, the controls for the Isosurface shape drift towards 0 on their own. Thanks Markh and Yanomano for pointing out the issue. Sorry for not getting onto this stupid bug earlier.

This new version should have fixed the problem.

Sorry about that guys.

a|x http://machinesdontcare.wordpress.com

PreviewAttachmentSize
tb IsoRaytrace 1.01 (SNav).qtz92.47 KB

toneburst's picture
Cheers.

I'm learning a lot myself!

a|x

Markh's picture
Oooops

Thanks Ajx. but I cant seam to download that attachment, I'm getting an allert - I dont know if this is a problems at Kineme's site or at your end of things...

ta Mark

smokris's picture
kineme.net site bug

Mark --- try it again now. I think Drupal got confused about the plus symbols in the filename.

toneburst's picture
Ironically Enough

I didn't have '+'s in the filename originally. They appeared when I uploaded the file the first time to Kineme. I downloaded the file, updated it, then re-uploaded the modified version.

a|x

smokris's picture
Drupal Double-encoding?

I apologize if I seemed to imply that you'd done something incorrectly --- this is definitely a website issue.

I think something like the following happened:

  • You upload your original file. The filename has spaces in it. In URLs, spaces can be represented as either the plus symbol or %20, so I guess Drupal opts for the more compact alternative.

  • For whatever reason the web browser doesn't translate the plus symbols back into spaces when downloading the attachment --- according to my tests, neither Safari 3 nor Firefox 3 does.

  • When you re-upload the file (now with plus symbols in the filename), Drupal gets confused and fails to properly keep track of the file.

I'll see if I can track down this bug sometime, but in the meantime, please avoid plus symbols in filenames when uploading.

toneburst's picture
Makes Sense

I seem to be able to download the file OK now. Should I re-upload with no spaces or plusses?

a|x

smokris's picture
Not necessary.

Not necessary --- I fixed the attachment in this instance.

Markh's picture
A++++

great work! fantastic... now I've just got to figure out how your done all of this..

Thanks again mark

toneburst's picture
Cheers Markh

I'd love to say it was all my own work, but I'd be lying. All the credit should go to Keenan Crane and Tebjan Halm, who are the geniuses who actually understand how all that shader code actually works. I really just translated the source from Tebjan's HLSL to GLSL, and setup the controls etc. in QC.

I was pretty amazed when it actually worked, I can tell you!

a|x

psonice's picture
More surfaces

Not my own work at all, but parapete (or 'parcelshit' as he's calling himself lately for some reason) did a 1k demo for linux with an isosurface thingy: http://www.pouet.net/prod.php?which=51762 and I ported it to osx with QC.

The file is here: http://psonice.untergrund.net/files/demos/DirtyHarriet.zip (no .qtz in there as I built it as an app, but the shader that makes the surface is here: http://pastebin.com/ffe0c54f (some minor tweaking needed to make it work, but nothing that won't be obvious from reading the errors in the glsl editor)).

I'll stick the .qtz somewhere later.

toneburst's picture
Cool.....

Can't get it the app to work on my Tiger G5 here, but very much looking forward to trying this on my Leopard MacPro at home. The Fragment shader looks a lot shorter than the Isosurface raytracer I translated a while back, too...

Good work, mate!

a|x

toneburst's picture
Interesting...

Just got the app working in Leopard. It's interesting. The zoom is a bit weird, mind you. The GLSL shader isn't the easiest to read ;)

I've got a funny feeling if it was all commented, and the variables given meaningful names, it wold be as long as the one I converted...

a|x

psonice's picture
Size coding

It's like that because it was made to fit in 1k ;) So e.g. all the variables have 1 character names to save space, and the vertex shader is missing (I don't think QC will even let you do that, but the default one will do fine).

toneburst's picture
QTZ

Do you happen to have that QTX handy psonice? I can't seem to get the shader to run without crashing (both QC and Shader Builder).

a|x

psonice's picture
QTZ it is...

Sorry, totally forgot about that. Here's the .qtz file.

PreviewAttachmentSize
massive clod.qtz9.96 KB