View Full Version : understanding .mots?

05-11-2010, 11:41 PM
I have some data in excel, that I'd like to use to animate an object.

I've looked around at some options, all of which struck me as confusing.

Especially as my data is not in regular intervals. I have a keyframe at 1 sec and 2 secs, and 5.3 secs etc.

Any suggestions on the best way to turn sporadically timed excel data into a moving null with the same timing?

I thought maybe I would just write my own .mot file, but when I open up a .mot file in Wordpad, I dont understand quite like I'd hoped I would. In particular, where is it telling LW which frame each key is on?

05-12-2010, 01:53 AM
The easiest thing would be to just load your excel data directly using an lscript. I could write one in an hour or so if it can be saved in an ascii format like CSV...

05-13-2010, 07:33 PM
Hey Dodgy,

Thanks for the reply. Sorry for the delayed response, got pulled into another mess for a couple of days.

So yeah, I can write a .csv out of excel with my:
time, x, y, z
on each line.

Right now my time is in MM:SS.S format, but I could convert that to frame numbers in excel if need be.

I'm afraid I dont know much of anything about how to even run a script, much less write one.

I would appreciate any help you can give me in figuring this out...

I've attached my data if it helps, the forum didn't like the .csv, so I changed it to .txt


05-15-2010, 08:42 PM
Attached is a scene file that has the motion from your excel file. I did what you were trying to do with the .mot file but with an .lws file instead. A little experimentation showed me how the motion is stored in the file.

example motion channel:

Channel 0
{ Envelope
Key 0 0 3 0 0 0 0 0.99972229936128853556 0
Key 1 1 3 0 0 0 1 1 0
Key 2 2 3 0 0 0 1 1 0
Key 3 3 3 0 0 0 1 1 0
Key 4 4 3 0 0 0 1 1 0
Key 5 5 3 0 0 0 0.99972229936128853556 0 0
Behaviors 1 1

The Key commands control the motion. The first number is the coordinate value in meters. The second number is the time in seconds, not frames. The third number is the type of curve. The 3 stands for linear. I was not able to figure out what the rest of the numbers are. I put zeros in these spots and it seems to work.

-Joe Lertola

05-16-2010, 12:02 AM
Okay, there's a plugin here:


called Import CSV on the plugin part of my web page, which will do ask you ask.

05-17-2010, 06:05 PM
You guys are AWESOME! Thank you soo much.

Still kinda wish I had a better idea what was going on inside the .mot/.lws's, but for the moment I am just glad to have this working.

Thank you.

Joe, your eyeballcube is freakin me out, pretty sure it will be in my dreams tonight.

Dodgy, I like your tribute to The White Stripes. We just got to get you on Micheal Gondry's radar and look out...

05-26-2010, 12:09 AM
Hey Guys thanks again.

I just got another plane project, this time with rotation too, and using my interpretive genius, I was able to modify Dodgy's script to deal with time, pos, and ROTATION. Three cheers to me for changing the number 3 to 6! YEAH! bet you wish you had my skills Dodgy.:hey:

I've attached it here if anyone wants to turn a .csv into motion...
had to change the .ls to .txt to upload it, so change it back to .ls and load it as a plugin.

Then make sure your data is formatted like so:
time ,pos ,rot

be sure to put an opening 0 if you have less than 10 minutes, or it will squawk at you.

Thanks again Dodgy