Skip to content
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

Model with animation support? #26

Closed
katopz opened this issue Oct 14, 2023 · 12 comments
Closed

Model with animation support? #26

katopz opened this issue Oct 14, 2023 · 12 comments

Comments

@katopz
Copy link

katopz commented Oct 14, 2023

Hi, Thanks for creating this. You're life saver!

BTW i'm not sure model with animation support?
Far as I try rotation is broken somehow and maybe need a way to handle animation clip (and also manual rotate the turret later)

image

The turret 3d model is here https://sketchfab.com/3d-models/missiletower-building002-9e0b1bcc84734c69a21e9c865fcfc172

Thanks again.

@kaosat-dev
Copy link
Owner

Hi @katopz !
Thanks for the kind words.
Very timely :)

  • I just noticed that rotation & scale are broken this afternoon (only for collection instances).
    I am almost done with the fix (rotation works, for some weird reason, the scale does not get exported to the gltf files, still investigating). A new version of the Blender plugin & bevy_gltf_blueprints should be out in a few hours max
  • There is some support for animations (a very small convenience wrapper around how the animations work in Bevy) , but I haven't explicitly mentioned it yet, as it is still work in progress. I'll try to post something about that a bit later.

@kaosat-dev
Copy link
Owner

@katopz , the issue with rotation & scaling is now resolved, please make sure to use the latest version of the Blender add-on :)
I'll ping you when I have some more things to share regarding animation

@katopz
Copy link
Author

katopz commented Oct 15, 2023

Thanks!

Turret base look in place now but other object gone wild.

image

and I can see a lot of output continuous yelling.

2023-10-15T02:04:21.155587Z  INFO bevy_gltf_components::process_gltfs: checking for loaded gltfs Unloaded
2023-10-15T02:04:21.171902Z  INFO bevy_gltf_components::process_gltfs: checking for loaded gltfs Unloaded
2023-10-15T02:04:21.172020Z  INFO bevy_gltf_components::process_gltfs: checking for loaded gltfs Unloaded
2023-10-15T02:04:21.188205Z  INFO bevy_gltf_components::process_gltfs: checking for loaded gltfs Unloaded
2023-10-15T02:04:21.188301Z  INFO bevy_gltf_components::process_gltfs: checking for loaded gltfs Unloaded

This yelling also happen before the fix i think (should be other issue).

Anyhow load the 3d model only to the scene also appear the same,
maybe it's because the 3d model itself not playing nicely with Bevy.

I will try again with less complex 3d model to find the root cause. 🤔

@kaosat-dev
Copy link
Owner

It seems there are multiple issues going on at the same time:

Screenshot from 2023-10-15 10-01-58

  • the continuous "yelling" , means something is not normal when loading the gltf files, it seems Bevy is unloading the files before they are done loading completely, I need to check if that happens inside Bevy without the plugins too, because that a big issue

@kaosat-dev
Copy link
Owner

It seems the handles to the gltf assets are being dropped prematurely, still investigating.
I was working on some other improvements that I will push first, but i'll try to fix this asap

@kaosat-dev
Copy link
Owner

Hi @katopz I started investigating the issue in more details, sorry for the delay , could you please tell me

  • if you exported the scene using the standard Blender gltf exporter or the auto_gltf_exporter (the one in this repo?)
  • you used the advanced example as a basis right ?
    Thanks in advance :)

@katopz
Copy link
Author

katopz commented Oct 23, 2023

Hi, No worry for the delay just a hobby here :)

  • yes and yes (v 0.3 at that time).
  • yes.

Only diff now should be y-up (already set to y-up now) when export and bevy 0.11.3 (have to lock at 0.11.3 or crash due to bevyengine/bevy#9389 )

image

I can understand about gltf limitation (vary import/export),
maybe we need the working animation examples and precise config.
The model itself can be and fix and modify in blender to match our requirements/config anyhow.

btw i try 0.5 but can't trigger auto export after modify and save anymore not sure how i can manually export (as i recall it should auto export for me am i right?)

Thanks!

@mlflabs
Copy link

mlflabs commented Oct 23, 2023

Could you provide simple code example how to get animations playing?

@kaosat-dev
Copy link
Owner

@katopz & @mlflabs I am currently fixing a small issue ,improving the API and adding an example for animations, I'll let you know once it is ready. Because of the Bevy issue #29 that is fixed in V0.12, it is a bit complicated , as most of my test models with animations get unloaded wildly haha.

@katopz thanks for the details :)
Yes auto-export is the best way (and the only way to use Blueprints easilly).
I upgraded/improved the UI/UX of the Blender addon, if you have issues with that part, please open an issue for it :)

@kaosat-dev
Copy link
Owner

@katopz & @mlflabs I just released a new version of bevy_gltf_blueprints with animation support & example :)
you can check out the example here : https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/animation, particularly this part on how to trigger/control animations (it is standard Bevy with an extra helper I added to make things a bit simpler .

Additional fyi for you @katopz , it works really well with the latest version of the Blender Addon, so if you have issues/questions for that, please do not hesitate :)

Have fun !

@katopz
Copy link
Author

katopz commented Nov 1, 2023

Thanks! @kaosat-dev This should be fun! I'll get back to try this after I'm done with llm.

Anyway I owed you a beer! Do ping me if you come to Bangkok. :)

@kaosat-dev
Copy link
Owner

Haha thank you , and gladly @katopz :) Never been there before, would love to visit one day ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants