Rotating 3D objects more then 360 degrees?
-
Can you supply a sample of the data a 360 rotation in VICON looks like to you as OSC data?
I can only imagine 2 data ranges.
First that the rotation is represented similar to degrees.. 0->360
Or maybe something like 0 -> 50 and 0 -> -50.
Although the second really make little sense.
As OSC these values are probably mapped the the 0->1.0 range but a data sample would help us know for sure.
In Isadora to scale the values you could either use the built in Min and Max setttings (as shown in the previous screen capture.) or take a look at the 'limit-scale value' actor.
Note the Scale Min and Scale Max shown in the previous screen capture should set the range of the input to 2X full rotations. (0->360 will be 1) -
DusX,
I can provide some sample data. . . . How would it be most useful to share?I can provide a video capture of my screen as the data is coming in, or I can write out the data ranges it is providing. . .Let me get the whole thing running again and see what I can do.Maybe I can save the data into a text file that can be read back in realtime. . .Thanks!-Alex O -
I am running into a few issues getting VICON up and running to OSC but here is a screen shot from the last bit of captured data that I have at the moment.
Basically it shows that the number range is much larger then -360 to 360.Looks like I'm dealing with numbers that range from between -3200 to 1000 or so . . . it may be adding degrees on each rotation?Once I get this going again I'll send another update. -
Dear Aolis,
Well, first of all, are you very sure that the Vicon is feeding you angles, and not absolute x/y/z coordinates? The data you're receiving makes me suspect that this is the case.In any case, please take a look at the attached User Actor called "wrap-angle.iua". It receives any floating point number and "wraps it" so that it stays within a range of -360 to +360\. (E.g., if you feed in a value of 364.5, the output will be 4.5; if you feed in -372.5, the output will be -12.5) This will allow you to receive an angle of any value, and ensure it ends up in the proper -360 to +360 range.Best Wishes,Mark -
It looks a lot like you are getting precise mm positions from the mocap in distance to the zero point after you calibrate, Here is a project that can spit out OSC directly from a vicon system
https://github.com/kylemcdonald/ofxViconThe included OSC example does not give out rotation only position (I suspect this is the code you are using to get OSC from the vicon as it does not do it natively). You can add a few lines to the OSC example to get the rotation as well- dealing with it in Isadora is another issue. Getting rotation would give you 4 values (qx qy qz qw) not 3 (x y z) - I am guessing here you are tracking 3 rigid bodies with only x y z positions.To try and test this just scale the x y and z values and try and move 2 rigid bodies around each other (watch out for negative values). See if the movement you draw reflects the real movement. If so you are dealing with position not rotation. As yet Isadora does not support quarternion input so you will have to find a workaround to use the rotation. -
hello I have build some endless rotary control for midi and osc, added marks value-wrap, works fine on the 3d actors (360) more detailed value sample recording infos needed …. ?
best...btsIsadoraCore QuartzComposer MacOSX10.8…
-
I think this is what you are looking for, For Quaternion(x,y,z,w): roll = Atan2(2yw - 2xz, 1 - 2yy - 2zz); pitch =Atan2(2xw - 2yz, 1 - 2xx - 2zz); yaw = Asin(2xy + 2zw); However the order you apply these in will change the outcome. You may or may not get the results you are looking for. You will come across gimble lock and sometimes the applied rotation will not look anything like what you want it to. You can then use the position data that you have above to position the object.
-
Yay!!!! Thank you for this information. I am just getting back to this problem. . .
-Alex -
Indeed, it turns out I am dealing with location and not rotation. . .
Also, Mark, Thank you for this wrap actor. . . I'll report back if I make any further headway.I love you Isadora Forum.-Alex -