Notifications
Clear all

[Closed] import spreadsheet to animation?

I have a very similar situation and need to read in 6 values from a csv file.
(My first maxscript)

The data is aranged in the following order:
Column A contains the X value
Column B contains the Y value
Column C contains the Z value
Column E contains the Yaw value
Column F contains the Pitch value
Column E contains the Roll value.

Each row of data has been exported to correspond to a frame rate of 30 frames per second (0.0333).

If I could create a box or dummy then advance it 1 frame for each row it would help me get started.

Thanks
David

2 Replies
(@focomoso)
Joined: 11 months ago

Posts: 0

Are you asking how to animate an object over time? That’s a read the manual question…

with animate on for t = 0 to 100 do at time t obj.pos = [aVal,bVal,cVal]

where a, b, and cVal are the values pulled from the file as described above. Similarly for rotation.

(@ddustin)
Joined: 11 months ago

Posts: 0

The manual? You mean there is one? (kidding)

Those were purely noob questions.

I was able to import the data from the csv file and get my objects to rotate and move based on the file information.

The software that exported the file uses a different coordinate system then max (trying to figure out what “different” is exactly).

Thanks,
David

The hard part (most likely) will be getting rotations right. Max uses some “unusual” (well, at least to my old brain) ways of handing rotations that aren’t as straightforward as positional stuff.

I’ve actually never quite figured out rotations in Max, particularly as they apply to bipeds and hierarchies. But good luck to you with your stuff.

Mike,

I got the rotations figured out. It had to do with converting the euler values to quaternion.

Now I am trying to change the pivot of the box I am creating (used to show the x,y,x,yaw,pitch,roll of the data) so it is like that of the exported software.

I need the Z to be pointing sown as opposed to up, so I just need to rotate it 180 degrees.

Any thoughts there?

thanks,
David

You can change the pivot point the same way you can rotate and position – not at my Max machine right now or I’d look it up for you in the Maxscript manual. Just change it so it points the way you want.

Page 2 / 2