AB4D Forum

Full Version: FBX animations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to play FBX animations using PowerToys and Assimp ?
AssimpImporter does not support animating the read objects.

But if you can convert fbx model to 3ds, the you could read and play the animations with Reader3ds.

Another option is to read the animation data from the Assimp Scene and manually animate the objects with interpolating between keyframes.

For example if you read the scene with the following line (from AssimpViewer sample):

Code:
_rootWpfModel3D = _assimpWpfImporter.ReadModel3D(fileName, texturesPath);

_assimpWpfImporter.ImportedAssimpScene.Animations - contains a collection of Animation data objects. Animation object defines MeshAnimationChannels and NodeAnimationChannels collections.

One NodeAnimationChannel defines animations for one object. The object instance is specified by the NodeName property - you can get the created WPF object with using _assimpWpfImporter.NamedObjects dictionary. The NodeAnimationChannel also defines the PositionsKey, ScalingKeys and RotationKeys - those collections define the changes of the specified object in time - for example PositionsKey can be:

PositionsKey[0].Time = 0;
PositionsKey[0].Value = (0, 100, 0);

PositionsKey[1].Time = 20;
PositionsKey[1].Value = (0, 200, 0);


This means that the object specified with NodeName moves from position (0,100,0) to position (0,200,0) from frame 0 to frame 20.

In the future I will try to implement animation of read objects, but currently I do not have time for that.