Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoplay All Animation #1531

Closed
7 of 10 tasks
FaradayNova opened this issue Sep 13, 2020 · 5 comments
Closed
7 of 10 tasks

Autoplay All Animation #1531

FaradayNova opened this issue Sep 13, 2020 · 5 comments
Labels
type: feature New feature or request

Comments

@FaradayNova
Copy link

Description

I have done significant research to find a similar answer, and have found questions close, but either not entirely relevant or not fully pertaining to my exact question

I am exporting from Blender's gltf glb exporter. and have 144 individual objects and 144 nla tracks. 1 track per each
in i am able to call upon individual animation tracks, and switch between them, including cross fade between animation tracks. This is not what I need

I would like to know if there is a way to play all NLA tracks simultaneously with a single auto play command?

https://gltf-viewer.donmccurdy.com/ had the desired result,(animations - "Play All")

I can't seem to find code or attributes that correlate with the same "Play All" function on https://gltf-viewer.donmccurdy.com/

Version

  • model-viewer: v1.2.1

Browser Affected

  • Chrome
  • Edge
  • Firefox
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows
@elalish elalish added the type: feature New feature or request label Sep 14, 2020
@elalish
Copy link
Collaborator

elalish commented Sep 14, 2020

Indeed, model-viewer's API only plays a single animation at a time, cross-fading between. This was simply because animation hasn't been getting a lot of use and this was a simple API. It may be time to expand that now. I'd like to get a bit more information about use cases and API ideas to figure out what would be best to add next. I don't really want to expose all of the three.js animation API, as it's pretty complex.

Also, if you just want to "play all", why not pack them all into a single animation?

@mithru
Copy link

mithru commented Sep 14, 2020

This is something my team is also exploring. Literally last week, we decided to use three.js over MV directly for this specific use case: animation of product interacting with a secondary object which is also animated - the secondary object changes while the product stays. Our 3D team found it simpler to animate the objects individually so it can be mixed and matched with other similar 3D objects.

Right now, we're just using a static model for glb, and for iOS AR we're using a .reality file that includes the animation. We weren't happy with the inconsistency, so switching to threejs.

@elalish
Copy link
Collaborator

elalish commented Sep 14, 2020

@mithru could you share a link so I can see your use case? Our animation support certainly needs work. Also, PRs are welcome if you have an idea for what would be helpful to expose. Should be fairly easy if you're already familiar with three's API.

@mithru
Copy link

mithru commented Sep 16, 2020

Got into trouble last time I shared an ongoing project. Sharing something similar instead. Hopefully this explains things better. My apologies if not.

https://mithru.github.io/AR-test/model-viewer-template/ (please excuse the weird scale here)

In the link above, there are 2 characters in a single loaded GLB. Both of them have separate animations (only one plays on the link I sent, but if you download and open the GLB, you'll see them both animate). The 2 animations could be packaged into a single animation, but that starts to get messy when you want to create multiple combinations of characters with the same choreographed animation. It's not a big lift for smaller sets or one-off animations, but the moment we hit a few combinations, every iteration / design review will have us redo all the GLBs.

Allowing all animations in the GLB to play at one go would be a quick fix for this particular case.

What we're building involves a few other things (like mirror materials) that I'm not sure makes sense for MV, so we'll use threejs regardless for this particular project.

However, I have had a few times in the past where I had to ask my 3D team to send me GLBs with packaged animation. They were small projects so wasn't a big deal to send it back really.

@elalish
Copy link
Collaborator

elalish commented Sep 16, 2020

@mithru Thanks, that makes sense.

@elalish elalish closed this as completed Apr 1, 2021
@google google locked and limited conversation to collaborators Apr 1, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants