External Point3 Data, Max, and a Script to do it.
Here is a brief description of how get accelerometer point3 data from an iPhone/iTouch and import it into 3ds max.
First you must acquire some point3 data. In this case I used the accelerometer in my iTouch. Simply goto to the iTunes store and pick up the Accelerometer Data Pro. You need the “Pro” as this will save the data recorded to a .csv file and allow you to grab the data file via your wi-fi connection and a app controlled browser page.
So start the app on your iPhone/iTouch. Goto the capture tab and set the Hertz to 30 this will get you approx 1 sample per frame if you are at 30fps in your max scene. You can obviously adjust this to whatever you like, depending on how many or how little keys you wish to create.

Read the provided help file about the high and low pass filters and other functionality.
Run the Capture control, dance around the room, taking care not to hurl your gadget threw a window or at anyone in the room. Stop the data capture, access the browsers webpage from your pc on the same network. Save the file to your pc.

Since the csv file is created with a header, it makes sense to either rename it or delete it altogether. The first channel is named TimeStamp which as it happens is also a function in max, the script you will use next will throw an ERROR if this is not changed.
Here is a sample file:
Now you have the Data, open Max and install this script:
It was originally written by Bobo in a forum post, so I interfaced it and added some functionality

CSV2Keys Script Installation Video
Run the script (Maxscript Menu->Run Script…), set the scale (the data comes in quite small – o.o345 ect so enlarge it if you like) set the framerate, select the data file (.csv) and hit the go button.
This will create a Dummy object and create a Keyframe at the specified time for every line of the point3 data at the Hz you set the capture at.
So after some Key reduction and setting the tangents to smooth this is what the example looks like:

There you go, link a pflow emitter (or whatever) to the dummy and have fun!


This is great! Gotta try this
cu next week!
Be interesting to see what you come up with
I can’t wait to get to sunny LA, even if it rains, and get out of this Salt Lake smog!
So you finally decided to leave the nest ha? Great work on the accelerometer import dude!
Thanks, Hristo
LOL, flying around like a bird with only a half of wing
Thanks for the tute, unfortunately the CSV2Keys.zip file doesn’t seem to exist anymore…is it possible to upload it again or let me know where I can get it elsewhere. Thanks in advance.
It should work now, I must have renamed the .zip incorrectly last time it was updated. Thanks for letting me know
johnny, this is great,
but tell me, what data does it capture?
are you saying, it captures motion data?
can i dance and have the motion of my hand captureD????
IF SO ITS TIME FOR AN IPHONE!
Hi Ian,
The iPhone and iTouch 3rd gen have a built accelorometer, the app that I link to captures this acceleration data in the form of an X,Y,Z vector. So it is not an exact representation of how the phone is moving in 3d space but it is real close. The generation 4 has a 3 xis gyro scope in it, I haven’t got one so I don’t know what data it generates but could be cool
Anyway it does generate so cool motion data, make for some real interesting particle emitters!
hey johnny, this is really aweseome! thanks for making aware of it, my brother just got me some CSV data, this is incredible,
MOCAP for the MASSES!
one can also just turn the trajectory into a spline, put edit mesh on it and use each vertice to emit particles with position object,
or of course, just use the spline to create super interesting mesh
and also thanks for the pflow tutorial, i never realized one could put audio/noise/wave controller on the emission rate!
thanks man!
ian
Haha, cool I have used the trajectories as well as the reduce function on them but hadn’t thought of meshing the spline!
jea its great
and our next experiment
when he flys from philly to berlin here
hes gonna record the motion data on that!!!!
I get this error:
– Error occurred in doGetFileData(); filename: C:\Program Files\Autodesk\3ds Max 2010\Scripts\CSV2KeysTool.ms; position: 2636; line: 73
– Frame:
– theFileName: “C:\Users\Anselm\Desktop\accel_0529_120435.csv”
– lineCount: 355
– theTime: undefined
– thefile:
– called in btn_go.pressed(); filename: C:\Program Files\Autodesk\3ds Max 2010\Scripts\CSV2KeysTool.ms; position: 4287; line: 112
– Frame:
>> MAXScript Rollout Handler Exception: — No “”*”" function for timeStamp() <<
I suspect that you just need to delete the first line of the csv file. The script does not need a header in the csv. Just open the .csv in the maxscript editor and delete the first line of code and save. It should work after that.
I suppose I could write it to deal with the header but it works just fine as it is without it.
I see! i just read that above
Now i get this one…
—————————
MAXScript Rollout Handler Exception
—————————
– Compile error: Illegal input in readValue
– In line: ,,,
Please share an available directly
thanks
Here is the error:
– Error occurred during fileIn in
– Error occurred in anonymous codeblock; filename: C:\Program Files\Autodesk\3ds Max 2011\Scripts\CSV2KeysTool.ms; position: 3704; line: 96
>> MAXScript FileIn Exception: — Syntax error: at “, expected
– In line: spinner spn_theFrmRate”Eval @ <<
I have added a brief video showing you how to use the script.
CSV2Keys Script Installation Video