Interpreting 3d Motion capture data in Max MSP gen/jitter

Martin Daigle's icon

Hello!

I am working on a patch that takes many points of XYZ coordinates and I am trying to create a 3D data visualizer.

I am trying to generate points in space such as a point cloud of sorts that would allow me to zoom in and change the color of the point that I selected. I have tried using jit.gl.gridshape and jit.gl.gridshape which allows me to have one point in space, but I need 24.

I thought that perhaps Jit.gl.multiple would help me manage this, by inserting all of the XYZ coordinates inside of a matrix. As of now, I am not able to send a steady stream of data to more than one cell at a time...

Perhaps there is already a project out there that has all the answers to my questions, feel free to drop a link to them if something comes to mind. eel that I am not far... I have all the data stored in the MTR object if anyone wants to give a crack at it I'd love your help!

3DGenDataVisualiser.maxpat
text/plain 1.27 MB
DataVisualizer

Cheers,
M

MakePatchesNotWar's icon

Hello,

Its sunday and it was either videogames or this so why not be somewhat productive and help someone out?

Can you give a clue on what scale the xyz-values are so they can be normalized? Everything becomes much easier when values are between -1 and 1 and right now i'm seeing the x-value in a range of -422. - 527 y in a range of -79 - 822 and z in -1 - 1249?

If anyone else wants to have a go i cleaned up the patch a bit so it might be easier to work with

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

MakePatchesNotWar's icon

Points are moving. Selecting one of those points and zooming in is a less trivial task to which i have no clear immediate answer. Maybe if jit.gl.multiple is used instead of jit.mesh you could with jit.gl.picker but i don't know i'd have to look into it later

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

Martin Daigle's icon

thanks LUVULONGTIME!

The data is raw from qualisis track manager so the range is quite wide. I'll spend some time with your updated patch but this is pretty much what I was looking for. I'll try some stuff and repost my findings!

Cheers

MakePatchesNotWar's icon

Glad to help and even though there's less objects than your original patch i can imagine there's a lot to unpack. If you have any questions feel free to ask...

I tried using jit.gl.multiple and see if jit.gl.picker worked but i'm not really getting any good results it seems and i'm not sure if that's me or the object?
Regarding zooming in on an object once its selected you could try "faking" it and adjust the overal size of jit.gl.multiple/mesh while at the same time increasing the scale of the object you have selected?

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

(use "enable" to turn of the mesh and "worldcube" to see how jit.gl.multiple responds to jit.gl.picker)

Martin Daigle's icon

I have one bottleneck at the moment!

I am trying to change the color of specific points. for example In my grid, I want to change the color of 0 0 to Green and perhaps make this one bigger. I want to have malleable control over each point for a presentation.

how would you approach taking this from your reply patches?
And many thanks again for the help!

MakePatchesNotWar's icon

"I want to have malleable control over each point for a presentation."

You need to dive into matrix-manipulation and jit.gen because it usually is the best tool for this. Here's how i would approach changing the color of a specific point and i think adjusting the scale as well is a good exercise for you to try :)

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

Martin Daigle's icon

yes, you are right! I have probably done 10h of lessons on the subject with some of the amazing instructional videos on YouTube. My reflexes and comprehension of these objects still lack unfortunately. I'm really hoping to get better, perhaps going through these tutorials over again will help.

I know that this troubleshooting with you really helped, since Matrices are esentially lists... and my XYZ coordinates are a large lists which needed to be separated in 3s... your proposed way makes a lot of sense to me now!

much appreciated!

MakePatchesNotWar's icon

"since Matrices are esentially lists... and my XYZ coordinates are a large lists which needed to be separated in 3s"

Exactly, Max is all just numbers and ways to convert those numbers into something else.