So my curiosity was piqued thanks to the discussion here and I decided to have a bash at writing a GLSL shader that renders a heightfield map given an image, rather than having to use a plugin. The attached qtz uses a sample movie on the Desktop and feeds it through a blur to smooth out the heightfield before rendering. It works well with photographic movies rather than flat graphical content - put your favourite movie in and see what happens!
The GLSL code has been hacked together working from the VertexNoise.qtz example in the Developer documentation. Since this is my first attempt at such thing, there's likely to be bugs and missing functionality, so caveat emptor.
Hopefully this proves some fun/use to someone. Cheers, A.
HeightField Experiment.qtz
Description: application/quartzcomposer
On 28 Nov 2007, at 21:42, Alex Drinkwater wrote:
Just wondering if the techniques used in this examplehttp://developer.apple.com/samplecode/PBORenderToVertexArray/ index.htmlhave any relevance to the GLHeightfield texturing problem. Sadly I know next to nothing about OpenGL, but it strikes me that the example application does exactly what we're all looking for. Cheers, alx http://www.toneburst.net http://machinesdontcare/wordpress.com --- Alessandro Sabatelli <[EMAIL PROTECTED]> wrote:I've been chasing this Rutt-Etra image for a long time... raster.jpg It's great to hear you guys are going after it again. I had the luck of seeing Benton's Rutt-Etra in person in New York awhile back. .xX On Nov 28, 2007, at 11:22 AM, vade wrote:Here is the code ive used to attempt this myself.It is nonfunctional, the texture coordinates created forthe VBO mesh are not'useful', in the sense that they do not map to 0 -1 fro the edgesof the quad, so while I can in fact texture thequad, it only hasone texel mapped. Ive asked the GL List about this after doing someresearch. Theusual answer is to use interleaved VBO arrayswhich render outvertices, texture coordinates, normals, etc, allwithin oneinterleaved buffer. That is beyond my skill :( Ive attempted to create a second VBO to "render"out a set oftexture coordinates, bind them beforegl_DrawElements, but to noeffect (99.999 percent because I have little cluewhat I am doing).Ive also heard the suggestion to use gl_GenCoords,but again, I amfar too novice a GL programmer to fully grok howto use thesesuggestions. Here is my code, hopefully it will not bounce fromthe list.http://abstrakt.vade.info/ILOVETHEQCLIST/GLHeightField_Vade.zipFYIW, I personally know Bill Etra, and have beentrying on and offto get this working for him in a native app - tomake a Color 3DRutt Etra performance application for him. Ive hada pretty goodversion built in Max/MSP/Jitter, but the speed issimply not there.This VBO method is incredibly fast. We both would be grateful to have a helping handwith ourdifficulties! Thanks ! On Nov 28, 2007, at 11:57 AM, Alex Drinkwaterwrote:Hi Pierre-Olivier! Thanks for getting back to me. On 28 Nov 2007, at 16:32, Pierre-Olivier Latourwrote:Try the GLSL Grid patch I know about that one. What I want is a heightfield grid though (ratherthana static grid), that can be textured, lit etc. by placing it inside Lighting/GLSL patches, andinputtinga texture image, as well as the displacementimage.The current Heightfield plugin can be placedinside aLighting patch, but can't be properly lit, as faras Ican tell. It also doesn't accept an image as a texture, to be displayed on the surface of thegrid.Cheers, Alex On Nov 28, 2007, at 3:20 AM, Alex Drinkwaterwrote:Fingers crossed this will make it to the listthistime. This is my fourth attempt to post thismessage,as my mailserver timed out trying to contact thelistserver after several hours on each of my previous attempts. Does anyone know if it would be possible tomodify theGLHeightfield plugin so that it produces a mesh that can beusedinside a GLSL patch in Quartz Composer, or can be textured with animage,or lit effectively using the Lighting patch? At themoment,it seems that the mesh produced by the plugin does not play wellwithother QC patches (unless I'm missing something basic here). At the moment I'm not too bothered with lighting the mesh, but I'd verymuchlike to be able to texture it with an image. I know it's just an example plugin, but it's tantalisingly close to what I I's like it to be able to do- just notquitethere. Anyone any thought? Cheers, alx http://www.toneburst.net http://machinesdontcare.wordpress.com___________________________________________________________Want ideas for reducing your carbon footprint?VisitYahoo! For Goodhttp://uk.promotions.yahoo.com/forgood/environment.html_______________________________________________ Do not post admin requests to the list. They willbeignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/quartzcomposer-dev/pol%40apple.comThis email sent to [EMAIL PROTECTED] ________________________________ Pierre-Olivier Latour - [EMAIL PROTECTED] Technologist - Apple, Inc.___________________________________________________________Yahoo! Answers - Got a question? Someone outthere knows theanswer. Try it now. http://uk.answers.yahoo.com/ _______________________________________________ Do not post admin requests to the list. They willbe ignored.Quartzcomposer-dev mailing list([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.comThis email sent to [EMAIL PROTECTED]_______________________________________________ Do not post admin requests to the list. They willbe=== message truncated === ___________________________________________________________Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html_______________________________________________ Do not post admin requests to the list. They will be ignored.Quartzcomposer-dev mailing list ([email protected] )Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/adrian%40clayinteractive.co.uk This email sent to [EMAIL PROTECTED]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]

