简体   繁体   中英

Forge Viewer animation

We have some animated objects in our 3DS Max file. Would it be possible to display these animations in the viewer? We've seen some examples from the Forge developers showcasing animated robots. Would really like to get information on how to achieve animations in the viewer.

The model derivative translation of the .MAX file does not include animation. It uses the current keyframe state of the geometry to translate, and no animation is included. At the moment, only certain translation types include source animation. For example, the Fusion format can contain animation, and those can be played back in the Forge Viewer. See here for information on that aspect: https://forge.autodesk.com/blog/show-animation-and-cam-content .

Because the Forge Viewer is using three.js, you can add your own animation. This is how the robot was animated (assuming you are referring to these samples: interactive: http://mimikron-project.s3-website.us-east-2.amazonaws.com/ and preforming: http://mimikron-project.s3-website.us-east-2.amazonaws.com/cyberdancer.html )

There are two good blog posts that discuss this starting here: https://forge.autodesk.com/blog/know-how-complex-component-transformations-viewer-part-1-basics (and see end for part 2 link). Note the running sample of the gyro clock is posted here: http://giro-watch.tk/ You can see the time is animated based on the browser current time, and there are also controls for interactive animation/transforms.

Hope it helps, kevin

In addition to Kevin's answer, if you are using (or can use) .fbx then you could extract the animations data by using the FBX C++ SDK and load it in the viewer but the whole workflow has to be a custom implementation.

I just published a new sample that uses the hierarchical transforms approach exposed in the blog article. It also lets you save the transform state in the database and perform smooth animation to transition between two arbitrary states:

See the live demo here and the code at Viewing.Extension.Kinematics

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM