[fluxus] pdata

Dave Griffiths dave at pawfal.org
Thu Oct 27 06:04:36 PDT 2005


hi all,

just doing some thinking/typing on the fluxus wiki, and thought I'd throw
this one out there...

pdata is currently the way we expose the primitive data arrays (the
points, vertex colours and texture coords etc) to the scheme scripts - I'm
thinking of extending this to do a lot more work.

firstly, add support for user created and named pdata and add float,
colour and matrix types. this would not be used directly inside fluxus but
would be carried around with the primitive and allow you to use it as
convenient storage. (so far this is similar to the concept of attributes
in renderman)

I'd also add some pdata handling calls so you could easily copy, delete or
rename them, it would also be nice hook for accelerating processing of
arrays inside fluxus by executing them with one call, ie:

(pdata-op-transform "t" (mscale (vector 2 2 2)))

would scale all the texture coordinates in one call
or

(pdata-op-add "p" "velocity")

would update an entire particle system
or something specialised, but quite commonly needed:

(pdata-op-getclosest "p" (vector 10 0 0))

get the closest vertex to the input point - think fast flocking systems or
deformation tasks where currently you need to loop through each vertex in
scheme doing some simple calculation

and the last point, which is really appealing, is that any pdata could be
automatically passed through to glsl shaders so you could write vertex or
fragment shader programs for your fluxus scripts, based on your own custom
information (for instance, move the actual deformation code to the
hardware, and let fluxus control what happens)

cheers,

dave




More information about the Fluxus mailing list