Skip to content

Add new GLTF character model and loader functionality #19509

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

SachinSSh
Copy link

@SachinSSh SachinSSh commented Jun 6, 2025

Objective

  • Added a comprehensive GLTF animation viewer example that provides an interactive 3D inspection tool for developers working with animated GLTF assets. This addresses the need for a professional-grade animation preview tool that goes beyond basic playback controls.
  • Inspired by: 'animation_mesh_control.rs' but significantly enhanced:

Solution

  • Describe the solution used to achieve the objective above.

Testing

  • Tested on Windows with multiple GLTF files containing various animation types
  • Verified all controls work as expected (camera, animation switching, speed controls)
  • UI responsiveness confirmed with real-time updates
  • Animation loading tested with different GLTF structures

This example serves as both a learning resource for advanced animation handling and a practical tool for developers who need to inspect and preview GLTF animations during development.

Screenshot 2025-06-06 114325

Copy link
Contributor

github-actions bot commented Jun 6, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@SachinSSh
Copy link
Author

hey! I'm new to this project, I don't know what these 3 checks are failed, can someone tell why they failed and what they are?

Copy link
Contributor

github-actions bot commented Jun 6, 2025

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@theotherphil
Copy link
Contributor

At least some of the failing checks are for formatting and can be fixed by running cargo fmt.

@SpecificProtagonist
Copy link
Contributor

SpecificProtagonist commented Jun 6, 2025

The CI logs tell you what happened when you click on it ^.^

The toml format can be fixed by running taplo or by manually removing the leftover space.

You also need to run cargo run -p build-templated-pages -- update examples, which makes sure examples/README.md stays in sync.

theotherphil already mentioned that you need to run cargo fmt to fix the formatting of the Rust code. My recommendation is to set up your IDE to automatically run this when saving a file.

Finally, the mismatched_lifetime_syntaxes lint got added in the latest nightly Rust version. You don't need to do anything about it in this PR :)

@SpecificProtagonist SpecificProtagonist added C-Examples An addition or correction to our examples S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged A-glTF Related to the glTF 3D scene/model format labels Jun 6, 2025
@rparrett
Copy link
Contributor

rparrett commented Jun 6, 2025

Could you please fill out the PR description? It would be helpful to know the motivation of this PR and what it is demonstrating that isn't covered by the animated_mesh_control example.

@SachinSSh
Copy link
Author

The CI logs tell you what happened when you click on it ^.^

The toml format can be fixed by running taplo or by manually removing the leftover space.

You also need to run cargo run -p build-templated-pages -- update examples, which makes sure examples/README.md stays in sync.

theotherphil already mentioned that you need to run cargo fmt to fix the formatting of the Rust code. My recommendation is to set up your IDE to automatically run this when saving a file.

Finally, the mismatched_lifetime_syntaxes lint got added in the latest nightly Rust version. You don't need to do anything about it in this PR :)

Could you please fill out the PR description? It would be helpful to know the motivation of this PR and what it is demonstrating that isn't covered by the animated_mesh_control example.

ofc its different from 'animated_mesh_control' and 'custom_skinned_mesh' but its an undeniable fact that 'gltf_viewer_main' is heavily influenced by these.

@SachinSSh
Copy link
Author

The CI logs tell you what happened when you click on it ^.^

The toml format can be fixed by running taplo or by manually removing the leftover space.

You also need to run cargo run -p build-templated-pages -- update examples, which makes sure examples/README.md stays in sync.

theotherphil already mentioned that you need to run cargo fmt to fix the formatting of the Rust code. My recommendation is to set up your IDE to automatically run this when saving a file.

Finally, the mismatched_lifetime_syntaxes lint got added in the latest nightly Rust version. You don't need to do anything about it in this PR :)

thanks buddy for explaining issue precisely, let me be friendly with taplo!

@SachinSSh SachinSSh closed this Jun 7, 2025
@SachinSSh SachinSSh reopened this Jun 7, 2025
@SachinSSh
Copy link
Author

ok , i have fixed the issues what's next now?

@SachinSSh
Copy link
Author

hey can u tell me whats's next?

@SachinSSh
Copy link
Author

Could you please fill out the PR description? It would be helpful to know the motivation of this PR and what it is demonstrating that isn't covered by the animated_mesh_control example.

hey can u tell me what's next?, I checked all tests.

@hukasu
Copy link
Contributor

hukasu commented Jun 14, 2025

What is the license of the Gltf?

@SachinSSh
Copy link
Author

What is the license of the Gltf?

MIT

Copy link
Member

@janhohenheim janhohenheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea! Some observations:

  • Don't we already have a glTF viewer example somewhere?
  • Also, we currently don't have a good solution for storing large files for example! yet, sorry! As such, you will have to remove the glTF you've provided and use something that already exists in tree, like the fox.glb

@SachinSSh
Copy link
Author

Nice idea! Some observations:

  • Don't we already have a glTF viewer example somewhere?
  • Also, we currently don't have a good solution for storing large files for example! yet, sorry! As such, you will have to remove the glTF you've provided and use something that already exists in tree, like the fox.glb

Thanks, I purpose this commit for fully control on animations inside the glb/gltf model. Although simply demonstrating glb is already in animated_mesh_control, I just want to improve for better control over viewport and camera movement.

Fine, I remove that gltf, use already existed fox.glb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-glTF Related to the glTF 3D scene/model format C-Examples An addition or correction to our examples S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants