- Sceneform SDK for Android
was open sourced and archived ( github.com/google-ar/sceneform-android-sdk
) with version 1.16.0.
- This site ( developers.google.com/sceneform
) serves as the documentation archive for the previous version, Sceneform SDK for Android
1.15.0.
- Do not use version 1.17.0 of the Sceneform Maven artifacts
.
- The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
Sceneform animation
Stay organized with collections
Save and categorize content based on your preferences.
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 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.
Both property and model animation support Android's Animator API
. They both support listeners
,
playback control (start/stop/end/pause/cancel), duration, and start delay.
Only limited support for TimeInterpolators
playback is provided in the model animations. Reverse playback is not
supported in model animations.
-
To see Sceneform animation modeling in action, review the Animation
sample.
-
To see property animation using Sceneform in action, review the Solar System
sample.
Model animation concepts
Before you start working with animated models, it's a good idea to understand specific
concepts relating to skeletal animation
,
as well as related restrictions and features that apply to Sceneform.
-
Bones.An animated model contains bones
that are connected together,
forming parent-child relationships in a hierarchy. Animation alters the
position and orientation of bones during playback.
In the same way that moving a parent Node
in Sceneform causes all child Node
s to also move, moving a parent bone in Sceneform moves the children.
Bones are movable by animation or accessed as a node via the SkeletonNode
class. When bones are accessed as a Node
, the new positions are
overwritten every frame by animation if one is playing.
-
Skeleton.The skeleton
comprises all of the bones together, forming a
hierarchy of parent-child relationships.
For example, a model of a human arm might contain bones such as
"left shoulder", "left upper arm", "left elbow", and "left forearm" and so
on. Starting from the "left shoulder" as the parent of this hierarchy,
"left upper arm" would be assigned as a child. The children of "left upper
arm" might be the "left elbow" and lower bones. When the shoulder bone is
rotated, the upper arm, forearm, elbow and any bones below would move in
tandem.
Sceneform doesn't have an API for changing the parent-child relationships
between bones in the skeleton. This must be done ahead of time in an
external modeling and animation package.
Even models depicting inorganic objects can utilize skeletons to facilitate
realism. For example, a model of a couch could have bones and a skeleton.
-
Skin.The skin
is a weight applied to the drawn surface mesh of the
model. The position and shape of the skin mesh is calculated from the nearby
bones. This bone to skin connection maps to how the model deforms, providing
for more realistic movement.
The skin must be prepared ahead of time using a modeling and animation
package. Sceneform can alter the material of the skin mesh to change a
model's appearance.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003eSceneform allows importing and controlling 3D models with pre-made animations, including attaching objects to model skeletons for dynamic interactions.\u003c/p\u003e\n"],["\u003cp\u003eSceneform supports both model animation (baked into the model file) and property animation (dynamically controlled in Android), each with its own features and limitations.\u003c/p\u003e\n"],["\u003cp\u003eModel animation in Sceneform relies on concepts like bones, skeletons, and skinning to define the structure and movement of animated objects.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize Sceneform APIs to control playback, attach nodes, and interact with animated models within AR experiences.\u003c/p\u003e\n"]]],["Sceneform allows importing and controlling animated models via its APIs, including attaching nodes to a model's skeleton. Model animations, created externally and imported as `*.sfb` files, differ from Android property animations, which modify Java object values dynamically. Sceneform model animations use skeletal animation, where bones, connected in a hierarchical skeleton, drive the movement of the model's skin. Bones can be manipulated via the `SkeletonNode` class. The skin mesh appearance can be customized in sceneform.\n"],null,["# Sceneform animation\n\nSceneform lets you import models with animation. You can use Sceneform APIs to\nplay back and control the animation, and attach nodes to a model's skeleton.\n\nFor instance, the Sceneform [**Animation**](//github.com/google-ar/sceneform-android-sdk/tree/v1.15.0/samples/animation)\nsample includes files used to build models of Andy the android and a baseball\nhat. The Andy model contains animation data, while the baseball hat is a\nnon-animated model. When you run the sample, Andy breakdances and waves his arms\nwhile the hat remains fixed to his head using a node.\n\nSceneform model animation vs Android property animation\n-------------------------------------------------------\n\nIt's important to differentiate between *model animation* in Sceneform versus\n*property animation* in Android.\n\n- Model animations are created ahead of time by artists using modeling and\n animation software. They contain [skeletal animation data](#model-concepts).\n These animations must be exported as\n `*.fbx` files, then imported into a `*.sfb` file to be used in Sceneform.\n\n- [Property animation](//developer.android.com/guide/topics/graphics/prop-animation)\n is a fundamental Android concept and is not specific to Sceneform. This kind\n of animation can change any mutable value on a Java object that has a getter\n and a setter. The animated values can be set dynamically, but cannot be\n packaged into an `*.sfb` file.\n\n Both property and model animation support\n [Android's Animator API](//developer.android.com/reference/android/animation/Animator)\n . They both support\n [listeners](//developer.android.com/guide/topics/graphics/prop-animation#listeners),\n playback control (start/stop/end/pause/cancel), duration, and start delay.\n\n Only limited support for\n [`TimeInterpolators`](//developer.android.com/reference/android/animation/TimeInterpolator)\n playback is provided in the model animations. Reverse playback is not\n supported in model animations.\n- To see Sceneform animation modeling in action, review the\n [**Animation**](//github.com/google-ar/sceneform-android-sdk/tree/v1.15.0/samples/animation)\n sample.\n\n- To see property animation using Sceneform in action, review the\n [**Solar System**](//github.com/google-ar/sceneform-android-sdk/tree/v1.15.0/samples/solarsystem)\n sample.\n\nModel animation concepts\n------------------------\n\nBefore you start working with animated models, it's a good idea to understand specific\nconcepts relating to [*skeletal animation*](//en.wikipedia.org/wiki/Skeletal_animation),\nas well as related restrictions and features that apply to Sceneform.\n\n- **Bones.** An animated model contains *bones* that are connected together,\n forming parent-child relationships in a hierarchy. Animation alters the\n position and orientation of bones during playback.\n\n In the same way that moving a parent `Node` in Sceneform causes all child\n `Node`s to also move, moving a parent bone in Sceneform moves the children.\n Bones are movable by animation or accessed as a node via the [`SkeletonNode`](/sceneform/reference/com/google/ar/sceneform/SkeletonNode)\n class. When bones are accessed as a `Node`, the new positions are\n overwritten every frame by animation if one is playing.\n- **Skeleton.** The *skeleton* comprises all of the bones together, forming a\n hierarchy of parent-child relationships.\n\n For example, a model of a human arm might contain bones such as\n \"left shoulder\", \"left upper arm\", \"left elbow\", and \"left forearm\" and so\n on. Starting from the \"left shoulder\" as the parent of this hierarchy,\n \"left upper arm\" would be assigned as a child. The children of \"left upper\n arm\" might be the \"left elbow\" and lower bones. When the shoulder bone is\n rotated, the upper arm, forearm, elbow and any bones below would move in\n tandem.\n\n Sceneform doesn't have an API for changing the parent-child relationships\n between bones in the skeleton. This must be done ahead of time in an\n external modeling and animation package.\n\n Even models depicting inorganic objects can utilize skeletons to facilitate\n realism. For example, a model of a couch could have bones and a skeleton.\n- **Skin.** The *skin* is a weight applied to the drawn surface mesh of the\n model. The position and shape of the skin mesh is calculated from the nearby\n bones. This bone to skin connection maps to how the model deforms, providing\n for more realistic movement.\n\n The skin must be prepared ahead of time using a modeling and animation\n package. Sceneform can alter the material of the skin mesh to change a\n model's appearance."]]