![]() |
|
FBX animations - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9) +--- Thread: FBX animations (/showthread.php?tid=3960) |
FBX animations - badpointer - 01-21-2016 Is it possible to play FBX animations using PowerToys and Assimp ? RE: FBX animations - abenedik - 01-21-2016 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. |