Coder Social home page Coder Social logo

Comments (15)

ThomasGorisse avatar ThomasGorisse commented on June 18, 2024

Hi,

Can you provide your .glb and .blend if made from it?

from sceneform-android.

Knotworking avatar Knotworking commented on June 18, 2024

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.

ThomasGorisse avatar ThomasGorisse commented on June 18, 2024

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.

ThomasGorisse avatar ThomasGorisse commented on June 18, 2024

Can you make the test with the master version?

from sceneform-android.

Knotworking avatar Knotworking commented on June 18, 2024

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.

kustraslawomir avatar kustraslawomir commented on June 18, 2024

@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.

ThomasGorisse avatar ThomasGorisse commented on June 18, 2024

Did you try to test your model on a Gltf Viewer?
Are you animations listed there?

from sceneform-android.

kustraslawomir avatar kustraslawomir commented on June 18, 2024

Yes :)
image
Also getAnimationNames() return [Farewell, Greeting, Idle, No, Pointing, Talking, Yes]

from sceneform-android.

kustraslawomir avatar kustraslawomir commented on June 18, 2024

Blender:
image

from sceneform-android.

kustraslawomir avatar kustraslawomir commented on June 18, 2024
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.

kustraslawomir avatar kustraslawomir commented on June 18, 2024
 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.

kustraslawomir avatar kustraslawomir commented on June 18, 2024

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.

kustraslawomir avatar kustraslawomir commented on June 18, 2024

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.

ThomasGorisse avatar ThomasGorisse commented on June 18, 2024

Great!
I'm curious. Could you provide a screen record just to see what it looks like?

from sceneform-android.

kustraslawomir avatar kustraslawomir commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.