[PD] Vertex transformations

chris clepper cgc at humboldtblvd.com
Fri Apr 2 08:58:29 CEST 2004


On Mar 31, 2004, at 7:52 AM, Stefan Turner wrote:

> Chris,
>
> Thanks for the reply. If it's of any use, an idea I
> had for transforming vertex positions and colours is
> just something like:
>
> [gemhead]
>  |
>  | [1.2\ [3.4\
>  |  |     |
> [transform-vertex $fx $fy+$f1 $fz*$f2]
>  |
> [model whatever.obj]

It's actually even simpler than that right now:

[gemhead]
|
[vertex_model my.obj]
|
|  1.0 0.5 2.0  range 100 1200
|   |		     |
[vertex_offset]
|
[color_scale 1 1 1 .5]
|
[vertex_draw]

This chain will open a .obj model then offset vertices 100 to 1200 by 
1.0,0.5,2.0 and then adjust the alpha to 50 for the entire array.  I 
have no idea if this will even be the final structure of the vertex 
arrays, but it should give you an idea of where it's headed.  Serious 
development of these objects will resume in the next few weeks after 
some more little details are ironed out of the current version of GEM.


> where 'transform-vertex' takes any number of floats
> referenced $f1, $f2...etc (like expr: apologies if I
> got the syntax wrong, I don't have pd on this
> computer) and has $fx,$fy,$fz for the current vertex
> coords. The example above would therefore shift by 1.2
> in the y axis and scale by 3.4 in the z axis. A
> similar thing could be done with colours. I think even
> though this is quite simple it would do for many
> applications.

An expr type object for both vertex and pixel manipulation would be 
quite interesting to have.  I think the development for such an object 
would be quite involved though.

> This could be more useful in conjunction with a
> 'gem-moses' which would act as two 'separators', the
> relevant one being chosen depending upon the vertex
> position, or something along these lines.

Yes, something like this is a planned object ( vertex_separator or 
split or something like that).

cgc

>
> I would try to code these myself but I don't think I
> am up to doing externals yet... Anyway these are just
> ideas and I'm sure you have something similar going
> on. Good luck and make sure you tell us all when
> you've got something!
>
> Cheers
> Stefan.
>





More information about the Pd-list mailing list