Export camera data from AS for Lightwave?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
madrobot
Posts: 670
Joined: Mon Apr 07, 2008 3:07 pm

Export camera data from AS for Lightwave?

Post by madrobot »

Export camera data from AS for Lightwave?:
Is this doable? Is there a script for this?

(Or has Chucky lost his mind? If so, I shall set up a paypal button in my sig so we can all throw in to have him put down by the vet.)
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

What type of data does LW need for import? I suppose it should be simple enough to export a text file with a list of key frames for camera movement data. The MAIN problem would be interpolation. The interpolations for keys in each program are most likely different and won't match precisely. The other option would be to output EVERY FRAME with a value. This would negate any interpolation issues but would create more complex data files.

Should be a "relatively" simple script... depending on what the import data needs to look like for LW or if it is in some kind of binary format and not plain text. If it isn't an ascii text format (like the AS format is plain text) it might not be possible.

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

I think that obtain a value for each frame is not so bad. Some hints here:

The MohoDoc has three variable members that retrieves the camera channels:

Code: Select all

fCameraTrack (AnimVec3)
the camera tracking animation channel

fCameraZoom (AnimVal)
the camera zoom animation channel

fCameraRoll (AnimVal)
the camera roll animation channel

fCameraPanTilt (AnimVec2)
the camera pan/tilt animation channel 
Then a simple loop can retrieve all the values of the camera for all the frames:

Code: Select all

LM_Vector3 GetValue(int)

Return the value of this channel at a given frame.
Return value (LM_Vector3): value at the given frame 
when (int): frame number
Same with the rest of camera channels if needed.
-G
Post Reply