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:

accel_Jan1610_115024.csv

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.zip

Run the script, it will reside in the Fume&Flow category in the Customize UI dialog, create a button, shorcut, whatever to activate it. Open the interface, set the scale (the data comes in quite small – o.o345 ect so enlarge it if you like) set the framerate, 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!

6 Comments to External Point3 Data, Max, and a Script to do it.

  1. This is great! Gotta try this :) cu next week!

  2. Ansi on January 17th, 2010
  3. 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!

  4. admin on January 17th, 2010
  5. So you finally decided to leave the nest ha? Great work on the accelerometer import dude!

  6. Hristo Velev on January 18th, 2010
  7. Thanks, Hristo
    LOL, flying around like a bird with only a half of wing :)

  8. admin on January 18th, 2010
  9. 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.

  10. shane on June 21st, 2010
  11. It should work now, I must have renamed the .zip incorrectly last time it was updated. Thanks for letting me know :)

  12. admin on June 21st, 2010

Leave a comment

Search

 

Archives