Comments (15)
Hi,
Can you provide your .glb and .blend if made from it?
from sceneform-android.
Yes of course cat.zip
You'll notice in the blender file that all of the actions have been doubled. I was experiencing strange behaviour before I stumbled upon this ugly hack, but it seems to work. I was checking my .glb files with https://gltf-viewer.donmccurdy.com/ , and both in this webtool and in sceneform the actions aren't doubled and seem to play correctly individually.
from sceneform-android.
Ok, I figured out what was happening.
I fixed your issue and will soon commit it.
I can confirm that you have to call the animator?.cancel()
since the auto cancel will work only if you start a new ModelAnimator with the same index.
Thanks for your feedback.
from sceneform-android.
Can you make the test with the master version?
from sceneform-android.
Yes I can confirm the latest master version works 👍
As a side note, I tried using jitpack to get the master branch dependency with:
implementation 'com.github.thomasgorisse:sceneform-android-sdk:master-SNAPSHOT'
However I couldn't get it to work, so just built it locally.
Thanks for looking into this issue 👏
from sceneform-android.
@ThomasGorisse should it be resolved in 1.20.2?
I have the same issue with the example [sample-ar-model-viewer], also I'm unable to switch between animations on my project.
I can provide You with a sample project with .glb file and code to test it. I can record the video for You if You need it. Thank you
from sceneform-android.
Did you try to test your model on a Gltf Viewer?
Are you animations listed there?
from sceneform-android.
Yes :)
Also getAnimationNames() return [Farewell, Greeting, Idle, No, Pointing, Talking, Yes]
from sceneform-android.
from sceneform-android.
video_2021-12-13_14-10-08.mp4
You can Track the queue I'm running the animations. Incrementing works just fine, but I can't go back for example from Pointing to Greeting.
from sceneform-android.
private fun displayDebugAnimationList(arCharacter: RenderableInstance) {
val availableAnimations: List<String> =
arCharacter.animationNames
Log.d("Animations", availableAnimations.toString())
debugButton.setOnClickListener {
val adapter = ArrayAdapter<String>(
requireContext(),
android.R.layout.simple_spinner_dropdown_item,
availableAnimations
)
AlertDialog.Builder(requireContext())
.setSingleChoiceItems(adapter, 0) { dialogInterface, index ->
Toast.makeText(
requireContext(),
"set animation: ${availableAnimations[index]} index: $index from: ${availableAnimations.toString()}",
Toast.LENGTH_LONG
).show()
arCharacter.animate(index).start() // same with animate(availableAnimations[index])
dialogInterface?.cancel()
}
.create()
.show()
}
}
from sceneform-android.
Also, I'm on:
git pull origin master
From https://github.com/SceneView/sceneform-android
* branch master -> FETCH_HEAD
Already up to date.
from sceneform-android.
Ok @ThomasGorisse I think It's because I didn't call .cancel() on ObjectAnimator...
objectAnimator?.cancel()
objectAnimator = ModelAnimator.ofAnimation(arCharacter, index).apply {
start()
}
With this change, it's working and I can go to the previous animation. Thanks again mate! <3
from sceneform-android.
Great!
I'm curious. Could you provide a screen record just to see what it looks like?
from sceneform-android.
Now I can switch from 0->1->2->1->0 etc
https://user-images.githubusercontent.com/16974890/145821470-cad80459-c8db-4322-bb50-1ca40cab393c.mp4
Thanks
from sceneform-android.
Related Issues (20)
- Issue with Face Model HOT 5
- Issue With Skybox HOT 1
- Issue with centered node HOT 2
- Shadow position is not correct, shadow appears at the middle of the object. HOT 2
- VideoNode Size Problem HOT 3
- Unauthorized Access Error for Sceneform Dependency Version 1.22.0 HOT 2
- What is Engine and how to use it? HOT 1
- How To Change Texture Images HOT 2
- Color of model on scene doesn't match color of texture (warm white instead of white) HOT 2
- Failed to create arsession HOT 4
- How to combine multiple node into one HOT 2
- java.lang.IllegalStateException: Calling method on destroyed View when i have scene inside horizontalpager
- Camera doesn't open and crashes when Proguard is enabled (R8) in Sceneform. HOT 1
- measure with camera HOT 2
- Scan Qr code using sceneform HOT 2
- Crash on App Start: NoSuchMethodError for acquireEnvironmentalHdrCubeMap HOT 1
- sceneform AugmentedFaceNode performance
- Scan Human Skin
- how to get a image in portrait mode
- Support for Compose Multiplatform
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sceneform-android.