Get started with Sceneform animation. This guide shows you how to:
- Set up your development environment to support animation
- Loading and running an animation in the sample app
This guide assumes that you have already installed and configured the Sceneform SDK for Android. If not, see the Quickstart for Android for installation and setup steps.
If you are new to working with skeletal animation, see Model animation concepts for an introduction.
Set up your development environment
- Install Android Studio version 3.1 or higher with Android SDK Platform version 7.1 (API level 24) or higher, and make sure you've also installed the Google Sceneform Tools (Beta) plugin.
- Make sure that your Android device is connected to the development machine via USB. See ARCore Supported devices for detailed information.
Build and run the sample app
To build and run the Animation sample app:
Import the Animation sample into Android Studio. This is located at
samples/animationfolder in the Sceneform SDK.
To look at the animation assets in Android Studio, navigate to
app/sampledata/models. These assets are:
andy_dance.fbx. Primary dancing Andy animation model.
andy_wave_l.fbx. Andy waving left animation data.
andy_wave_r.fbx. Andy waving right animation data.
baseball_cap.fbx. Andy's baseball cap.
In Android Studio, click Run .
Choose your device as the deployment target, and click OK to launch the sample app.
As part of the build process, Android Studio compiles the assets into an
On your device, grant camera access for the Animation sample app. Then try out these steps:
- Find a plane, then tap anywhere on the plane to add dancing Andy to the scene.
- To begin animating dancing Andy, tap the menu.
To add or remove the baseball hat from Andy's head, tap the hat icon.