I'm new to Sceneform (1.15.0) and related 3D file formats like fbx and glTF. I saw the sample animation project (Andy Dance) on how to run animations and the sceneform documentation.
What am I trying?
Run animations that are present in the sceneform fbx assets. I have 2 assets- a ka27 helicopter and a 3d model
Both these fbx assets have some animation. When I try to import these assets into Android Studio, it currently throws an error which I've overcome by adding the sceneform asset into my sampledata
directory and adding the information in the app/gradle
file. The .sfa and .sfb files are generated correctly.
sceneform.asset('sampledata/models/ka27.FBX',
'default',
'sampledata/models/ka27.sfa',
'src/main/res/raw/ka27')
But now if I try running the animation, I can see the helicopter in the scene, but without animation-
arFragment.getArSceneView().getScene().addChild(helicopterNode);
AnimationData animationData = helicopterRenderable.getAnimationData("ka27");
ModelAnimator helicopterAnimator = new ModelAnimator(animationData, helicopterRenderable);
helicopterAnimator.start();
My Questions-
- Are these assets correct and compatible with sceneform animations?
- In
getAnimationData
, what is the parameter that needs to be passed? Can i find this information by opening this asset? (I tried importing these assets, including sceneform's sampleandy_dance
intoBlender
andUnity
and while I can see the animation playing, I really can't seeanimation data
name property anywhere.) - Do
.fbx
to.glTF
converted assets retain their animation? - Can sceneform run
.glTF
animations? - Do animations have to be exported separately for sceneform? If yes, then how?
Sample illustration of the app in which the .fbx
animation does not work-