22
Apr
08

More Isosurface Raytracer Screenshots

I’ve just twigged what was wrong with the perspective in the previous screenshots- I was setting the range for the Z-axis of the eye coordinates so it went negative. Negative Z-values go right through the surface, and you end up looking at it from behind, but with reversed perspective. Very odd.

Here are some screenshots of the corrected version.

Incidentally, I should mention that the Isosurface being rendered is Paul Bourke’s ‘The Blob’, though according to tonfilm’s comments in the HLSL code, you can use other Isosurface recipes too. Time to look for some, I think! This looks like a good candidate.

It’s also worth noting that this shader produces quite a lot of aliasing. I may be wrong, but I think it’s probably quite hard to get around that with this type of rendering method. Raytracing works by casting rays at the object, and ultimately, these rays either hit something, in which case a shading calculation is carried out, or they don’t, and the background colour is returned. They can’t ‘half-hit’ the object, so you get aliasing.

These screenshots look nice and smooth because I captured them full-screen (1440 x 900), then reduced them down in Photoshop. Supersampling, essentially. I can’t imagine supersampling working at anything approaching a decent framerate with this shader in QC though, unless the output size was verry small, or you have a REALLY fast graphics card. I’m sure it will be possible in the future though.



The next challenge will be to make the camera orbit around the raytraced object in a convincing way. Currently, you can only move the virtual camera on the 3 axes, but you can’t change the ‘point of interest’, so what you essentially end up doing is moving the rendered object past the camera. I have a screenshot showing how this is done in VVVV. The difference is, in VVVV, you can get access to the list of vertices outside the shader itself, so it’s possible to apply matrix transformations to the mesh and camera position values outside the shader. This kind of thing isn’t possible in QC, so it has to be implemented in the Vertex Shader. I just have to try and get my head around how to do this though…

Advertisements

6 Responses to “More Isosurface Raytracer Screenshots”


  1. 1 desaxismundi
    April 22, 2008 at 4:14 pm

    Hehe..there you are 😉

  2. 2 toneburst
    April 22, 2008 at 5:19 pm

    Hiya!

    Good to see you here!

    Kinda works, but not quite sure how to implement camera movements. It’ll have to be done in the vertex shader. Hmm…

    alx

  3. May 1, 2008 at 2:36 pm

    Wow. Looking good. Really good.

  4. 4 toneburst
    May 1, 2008 at 3:40 pm

    Cheers makemassair!

    It looks better now you can rotate it. Glad I got that one sorted out!!

    It’s a real GPU-killer though. I only get a few FPS on my MacBook Pro/X1600 256MB, sadly. Haven’t tried it on the MacPro yet though. Fingers crossed it performs a bit better.

    a|x

  5. 5 Neb
    July 16, 2008 at 7:19 pm

    Fantastically awesome. Love the colours. Watching the test videos on vdmx, fascinating (and very tight) how it follows the sound. Makes me wish I could wrap my head around the hardcore GLSL goodness.

    Keep up the great work!

    – Neb

  6. 6 toneburst
    July 16, 2008 at 8:45 pm

    Cheers!

    All credit to the guys who actually wrote the code- Keenan Crane and Tebjan Halm (tonfilm).
    In terms of the audio-syncing in the video, it’s all just based on 4 different VDMX Audio Analysis bands, going though some very simple Behaviour Chains. I tweaked the range and amount of influence of the bands on different IsoSurface parameters using the knobs on the Trigger Finger, and used the SpaceNavigator to move and rotate the whole thing in a fairly wobbly way.

    I’d love to make this run faster though. It’s several seconds-per-frame on my MacBook Pro (though more or less realtime on the MacPro). I suspect it’s falling back to software rendering because the shader uses branching, which would explain the huge difference between framerates on the two machines. I’d like to be proved wrong on this though. Or to find a much more efficient RayTracer, alternatively….

    a|x


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


Twitter

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

April 2008
M T W T F S S
« Mar   May »
 123456
78910111213
14151617181920
21222324252627
282930  

Links

Blog Stats

  • 468,678 hits

%d bloggers like this: