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.

Attachment: HeightField Experiment.qtz
Description: application/quartzcomposer





On 28 Nov 2007, at 21:42, Alex Drinkwater wrote:

Just wondering if the techniques used in this example

http://developer.apple.com/samplecode/PBORenderToVertexArray/ index.html

have 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 non
functional, the texture coordinates created for
the VBO mesh are not
'useful', in the sense that they do not map to 0 -
1 fro the edges
of the quad, so while I can in fact texture the
quad, it only has
one texel mapped.

Ive asked the GL List about this after doing some
research. The
usual answer is to use interleaved VBO arrays
which render out
vertices, texture coordinates, normals, etc, all
within one
interleaved buffer. That is beyond my skill :(

Ive attempted to create a second VBO to "render"
out a set of
texture coordinates, bind them  before
gl_DrawElements, but to no
effect (99.999 percent because I have little clue
what I am doing).

Ive also heard the suggestion to use gl_GenCoords,
but again, I am
far too novice a GL programmer to fully grok how
to use these
suggestions.

Here is my code, hopefully it will not bounce from
the list.



http://abstrakt.vade.info/ILOVETHEQCLIST/GLHeightField_Vade.zip

FYIW, I personally know Bill Etra, and have been
trying on and off
to get this working for him in a native app - to
make a Color 3D
Rutt Etra performance application for him. Ive had
a pretty good
version built in Max/MSP/Jitter, but the speed is
simply not there.
This VBO method is incredibly fast.

We both would be grateful to have a helping hand
with our
difficulties!

Thanks !


On Nov 28, 2007, at 11:57 AM, Alex Drinkwater
wrote:

Hi Pierre-Olivier!

Thanks for getting back to me.

On 28 Nov 2007, at 16:32, Pierre-Olivier Latour
wrote:

Try the GLSL Grid patch

I know about that one.
What I want is a heightfield grid though (rather
than
a static grid), that can be textured, lit etc. by
placing it inside Lighting/GLSL patches, and
inputting
a texture image, as well as the displacement
image.
The current Heightfield plugin can be placed
inside a
Lighting patch, but can't be properly lit, as far
as I
can tell. It also doesn't accept an image as a
texture, to be displayed on the surface of the
grid.


Cheers,

Alex






On Nov 28, 2007, at 3:20 AM, Alex Drinkwater
wrote:

Fingers crossed this will make it to the list
this
time. This is my fourth attempt to post this
message,
as my mailserver timed out trying to contact the
list
server after several hours on each of my previous
attempts.

Does anyone know if it would be possible to
modify the
GLHeightfield
plugin so that it produces a mesh that can be
used
inside a GLSL patch
in Quartz Composer, or can be textured with an
image,
or lit
effectively using the Lighting patch? At the
moment,
it seems that the
mesh produced by the plugin does not play well
with
other QC patches
(unless I'm missing something basic here). At the
moment I'm not too
bothered with lighting the mesh, but I'd very
much
like 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 not
quite
there.

Anyone any thought?

Cheers,

alx
http://www.toneburst.net
http://machinesdontcare.wordpress.com





___________________________________________________________
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/pol%40apple.com

This email sent to [EMAIL PROTECTED]

________________________________
Pierre-Olivier Latour - [EMAIL PROTECTED]
Technologist - Apple, Inc.





___________________________________________________________
Yahoo! Answers - Got a question? Someone out
there knows the
answer. Try it
now.
http://uk.answers.yahoo.com/
_______________________________________________
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/doktorp%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will
be
=== 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]

Reply via email to