I have been searching for animating 3D objects via sceneform. I am very new to AR. Can anybody provide a sample for 3D animation (like a moving human)?

2 Answers

4
Steven Mohr On

Sceneform does not support animated renderables (like support for the animated FBX file format) right now. You can only move or rotate objects but you can't get something like a walking human easily.

0
ARGeo On

Sceneform SDK for Android v1.7.0 supports animation (15th February 2019).

  • Sceneform includes an optional animation library, com.google.ar.sceneform:animation which enables animation playback.

  • Added ModelAnimator and AnimationData classes. Sceneform now has the ability to play animated models.

  • Added SkeletonNode class which can be used to bind nodes to bones in a skinned renderable, making it possible to attach objects to bones, access the positions of bones, and manipulate the positions of bones directly.

  • Added AugmentedFaceNode to the UX library which can be used to render visuals with ARCore's Augmented Faces feature. See the new sample in the /samples/augmentedfaces/ directory.

  • Added Vector3.equals(Vector3) and Quaterion.equals(Quaterion).

  • Exposed Quaternion(Vector3 eulerAngles) and Quaternion.eulerAngles() publicly.

Sceneform lets you import models with animation. You can use Sceneform APIs to play back and control the animation, and attach nodes to a model's skeleton.

For instance, the Sceneform Animation sample includes files used to build models of Andy the android and a baseball hat. The Andy model contains animation data, while the baseball hat is a non-animated model. When you run the sample, Andy breakdances and waves his arms while the hat remains fixed to his head using a node.

It's important to differentiate between model animation in Sceneform versus property animation in Android.

Model animations are created ahead of time by artists using modeling and animation software. They contain Skeletal Animation Data. These animations must be exported as fbx files, then imported into a sfb file (binary asset) to be used in Sceneform. Property animation is a fundamental Android concept and is not specific to Sceneform. This kind of animation can change any mutable value on a Java object that has a getter and a setter. The animated values can be set dynamically, but cannot be packaged into an sfb file.

Hope this helps.