PDA

View Full Version : input spreadsheet euler angles- 3ds max 9


RockstarKate
10-18-2007, 03:25 PM
Hi, I hope someone can help me out.
I'd like to animate a car during a rollover accident. An engineer has given me a spreadsheet with euler angles for each time. Is there a way I can easily input this information into 3DS Max? I'm somewhat it the dark about how to proceed, so anything anyone can tell me will be greatly appreciated. Ideally, I could come up with a somewhat automated way to do this- importing the data from excel or from a text document rather than having to enter it by hand.

Thanks!
-Kate

mef
10-25-2007, 05:40 PM
Hey Kate.
I've experimented with this and came up with this idea on how you can utilize the data.

Save the Exel data as a text file. Then in the text file, format the data so that the numbers are separated by a comma and reside within parens with the pound symbol at the beginning so that the data looks something like this in your text file:
#(value1, value2, value3,...)

In Max, assign a script controller to the rotation channel of your choice and then create a variable.

Copy the text from the text file, including the '#' all the way to the ')'

Go back into Max and in the script controller window click on the "Assign Constant" button and paste into the "Value Expression" Field. Click "Evaluate" and close the window. If you get an error, make sure that you don't have a stray comma somewhere.

In the "Expression" window type the name of your variable (I'll call this VAR for now) followed by square brackets. In the sqaure brackets type F+1.
The text in the expression window should look like this:
VAR [F + 1]

Press evaluate and then play the animation.

There is a problem that I haven't gotten around yet, however. Once there is no more data, Max will throw an error.
I'm still starting out with scripting, so I'm not sure how to get around this. Maybe one of the scripting gods on this board can help with that.

I've attached a file so you can see what I did.

Hope this helps.

Marc

CGTalk Moderation
10-25-2007, 05:40 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.