jit.gl.render xyz coordinates

RobG's icon

Hi all,

I'm using jit.gl.render in tri-grid mode (and playing a movie into it for testing purposes). If I set the geometry dims to 4, I get a grid of 3 x 3 squares with diagonals going across each square. OK so far. I would like to analyse the position of each intersection so I get a list of xyz coordinates as they move. Simple question - how do i do it?!

Cheers

Rob

===================================

Rob Godman
Reader in Music
Programme Leader for Composition

John Lill Centre for Music Studies
Faculty for the Creative and Cultural Industries.
University of Hertfordshire
United Kingdom

T (44) 01707 284583
M 0781 249 1670
E r.godman@herts.ac.uk

justin's icon

i think a patch would be useful to understand what you are trying to do... it's a bit unclear what you are using to create the geometry in jit.gl.render.

as an initial pointer, i would suggest something like geometry matrix > jit.spill, then parse the list out into groups of 3 (xyz coords).

hth,

justin

RobG's icon

Hi Justin,

Thanks for your reply. I'm using the jit.gl.render.grid patch from the Jitter examples folder as a starting point. If I put jit.gl.render in tri-grid mode it will output the grid that I'm after. Changing the value of the geometry dims message will give me a greater or lesser number of squares (i.e. grid with a higher or lower resolution). It's an xyz reference of these intersection points that I'm after.

Does this make sense?

Cheers

Rob

justin's icon

hi rob,

it kind of makes sense... although an idea of what you want to do with the xyz data could lead to other (perhaps more elegant) solutions.

on my system (mbp 2.16 / osx 10.4.11 / latest maxmspjitter) the plane doesn't render in tri_grid mode, despite rendering with other modes. so perhaps i'm not seeing the same behaviour as you are?

Anyway i have posted an example of what i mentioned (jit.spill solution). But i can think of better ways to do this with jit.gl.grishape > jit.gl.mesh... But as i said at the start of my post, it depends on what you want to do afterwards.

justin

Max Patch
Copy patch and select New From Clipboard in Max.

justin's icon

and an example of the other way...

j

Max Patch
Copy patch and select New From Clipboard in Max.

RobG's icon

Hi Justin - sorry for the late reply on this one. I couldn't open these patches (even with placing additional headers). However, from having a look at the text I see where you are going and have got a load of numbers! I understand the matrix is now giving me a list of numbers but I'm not sure that they are really coordinates of the grid?

Cheers

Rob

justin's icon

yes, it looks like the coordinates are not right... could be a problem with the ordering of the coordinates. I have tried with triangular grid, but it doesnt seem to differ.

some insight from someone at c74 would be good. dont have much time at the moment to look into this!

here's the patch as an attachment.

j

RobG's icon

Hi - many thanks for this. yeap, still not sure what all these numbers mean! (not the first time I've had this feeling in all my years of using max/msp). However, i suspect there is a solution in here and I'll dig further.

Cheers

Rob