UDP BVH Data into Max

Andrew Blanton's icon

Hi All,

I'm bringing mocap data into max from a neuron mocap system. Their software broadcasts bvh data via UDP on port 7002. If I use [udpreceive] I get the error 'OSC Bad message name string.' As far as I know, bvh is nothing close to OSC formatting. I also tried udpreceive with the CNMAT flag, that shows up as full packets, but I believe that's just placing a wrapper around my incoming bvh. Is there a good way to view this data in max?

Andrew Blanton's icon

Page 80 is getting closer here: https://neuronmocap.com/system/files/software/Axis%20Neuron%20User%20Manual_V3.8.1.5.pdf

Andrew Blanton's icon

Also, this looks close: http://adsr.jp/2012/04/perfume_grobal_site_project.php

LSka's icon

you may want to check [sadam.udpReceiver] from the Sadam Library (available in package manager), that should be able to receive raw UDP messages.

Andrew Blanton's icon

Ah! I forgot about sadam! I will give that a try.

elby's icon

Hi,

Old post, but I'm trying the same thing here, I'm able to get the raw BVH in max with sadam.udpReceiver but can't figure out how to map it to jit.gl.model... Anyone succeeded?

Jeremy Wagner's icon

I reverse-engineered this a while back. The BVH stream describes the joint rotations of the skeletal model, arranged in a hierarchical tree structure starting from the hips. The format assumes a header file that contains the lengths of the bones of the skeleton. The stream describes the Euler angles of the individual joints. Each frame comprises something like a list of 182 values.

The first two values of the stream are the header values [0, char00] followed by the hips' [xPosition, yPosition, zPosition, xRotation, yRotation, zRotation]. From there, the stream is parsed as x,y,z rotation triples in the following order:
right upper leg, right leg, right foot,
left upper leg, left leg, left foot,
spine, spine1, spine2, spine3, neck, head,
right shoulder, right arm, right forearm, right hand, {right hand fingers (19x3=57 values)},
left shoulder, left arm, left forearm, left hand, {left hand fingers (19x3=57 values)}
...followed by || to end the stream.

Confused? Me too, so I made a patch that tries to organize the values in the shape of a skeleton that I call "Max Man". Good luck, Jeremy

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


elby's icon

Hi,

Super thanks, looks like something I can use!