FORUMS: list search recent posts

Using External Data to Control Animation

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
David May
Using External Data to Control Animation
on Feb 8, 2007 at 6:49:55 pm

My name is David May, an Engineering student at the University of Michigan.

A project i am working on involves importing descrete data in tabular format to control the motion of a sphere using maya's MEL. Lets say this data contains x and y coordinates of ball as a function of time.

For example, in excel i plot the functions y=t^2 and x=t, essentially a ball falling with some initial x velocity and its y velocity accelerating with time. This should give me 3 sets of data x, y, and t.

Is there a way that i can import these data into Maya to set the positions of a sphere object as a funciton of time. I have experience with controlling object's scale/pos/rot with MEL, so it would be easy for me to create this animation directly in maya, however, it is KEY that i use EXTERNAL DATA to control an object.

If you can point me to any tutorials, help files, or functions that import external data that i can insert to a MEL array or matrix that would be fantastic.

Thanks everyone,

David



Return to posts index

David May
Re: Using External Data to Control Animation
on Feb 8, 2007 at 6:50:18 pm

oops sorry for the double post, i had to sign up.


Return to posts index

Steve Sayer
Re: Using External Data to Control Animation
on Feb 8, 2007 at 8:49:22 pm

Hmm, it seems today is MEL day!

It is certainly possible to use external data. Maya can open and read external files, so if you can save your external data as a tab- or comma-delimited text file, you're in business.

In your Maya docs, there are three main sections: Learning Resources, Using Maya, and Developer Resources. Under Developer Resources find the MEL Commands reference. Across the top are categories of MEL commands. Under the 'System' heading click on the section for 'Files'. This will bring you to the section outlining such commands as fopen, fread, fwrite, etc., which are exactly what you want. You can read each line in as a string, then use string-related commands (another section in the reference) to parse them for the data.

That should point you in the right direction. If you need more specific help, let me know. Good luck!


Return to posts index


David May
Re: Using External Data to Control Animation
on Feb 12, 2007 at 6:34:23 pm

solid, ill let you know how it goes after i look into those docs... now to find time to do so!

thanks again


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]