Archive for March 26th, 2008

26
Mar
08

Radial Vertex Displacement Mapping

Thanks to some great work (and a fortuitous accident) from the good people at Kineme.net, it’s now possible to use moving images as Displacement Maps in a GLSL Vertex Shader in QC. So I thought I’d give it a go.

Radial VDM 01Radial VDM 02Radial VDM 04Radial VDM 03

The input is the iSight camera, with luminosity modulating the Radius parameter of a function to bend a GLSL grid into a sphere, so what we have is essentially a radial distortion of a sphere, based on the luminosity of the input texture.

This is very cool, and something I’ve been wanting to do for ages. It opens the doors to all sorts of mesh-related fun, as you can potentially use custom CIFilter or GLSL Fragment shader code to create different displacement images to feed into the patch.

The only problem is, it runs quite slowly on my machine. It’s undoubtedly much faster to do this kind of thing with Vertex Buffer objects, but that means custom OpenGL code in a QC plugin, which is way beyond my capabilities currently. Sadly.

Advertisements



Twitter

March 2008
M T W T F S S
« Feb   Apr »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Links

Blog Stats

  • 484,156 hits
Advertisements