Exporting bone rotations over time?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/03/2003 at 07:28, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.012
Platform: Windows ;
Language(s) : C++ ;---------
Hi!
Let's say I've created a skeleton with soft IK and have animated a walk cycle from frames 0 to 30 (by just animating the tip goals and root goals).
Now, let's say I want to dump the rotational values of each and every bone for every frame to a file.
Where would I begin looking? I'm still quite a newbie at plugin-developement, but I thought this would be somewhat interesting if I would want to get animation data over to a game-engine or something :).
Regards
/Sherlock -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/03/2003 at 23:31, xxxxxxxx wrote:
First you must establish a format for the file. The easiest is if the game supports some kind of ASCII data. Then you have to learn how to open a BaseFile with a Filename. You also have to learn to convert the data you need to strings with LongToString() and RealToString() and write these with BaseFile::WriteString(). Finally you have to learn how to find the data you need in the scene by iterating through all objects, writing out the necessary data.
The easiest way would be to create a SceneSaverData plugin. Then you'll only have to find out the SceneSaverData::Save() function and don't have to worry about specifying the Filename. Please see the STL.cpp example in the SDK. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/03/2003 at 23:45, xxxxxxxx wrote:
Hey, thanks :)!
I have a file format ready (Blitz Basic 3D has one that supports boned animation), and I've managed to export meshes with their materials to that format (using the STL-example in the SDK). So that wasn't so much of a problem.
My problem lies with exporting the animated data, namely the rotations and positions of each bone for every frame... is there a recommended way to go about this? Given that the bones probably will be indirectly animated by being constrained to "goals", so it's the goals that are "keyed", and not the bones themselves, how do one get the "solved" rotation/position for the bones for every frame?
Regards
/Sherlock -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/03/2003 at 23:35, xxxxxxxx wrote:
No hints? Well, I suppose I've got to do this the hard way and make a trial-and-error-fieldtrip :).