8000 Add Remote URL Support to glTF loader by panxinmiao · Pull Request #895 · pygfx/pygfx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Remote URL Support to glTF loader #895

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

Merged
merged 15 commits into from
Jan 14, 2025
Merged

Conversation

panxinmiao
Copy link
Contributor
@panxinmiao panxinmiao commented Dec 6, 2024

The glTF loader now supports loading models from remote URLs. It supports single-file models in formats such as GLB and glTF-Embedded, as well as directory-based glTF models.

A new glTF viewer example has been added, showcasing models from the KhronosGroup glTF-Sample-Assets repository (currently selected only those tagged with "core"), demonstrated pygfx's “out of the box” support for glTF models.

1218.mp4

Additionally, several bugs in the glTF loader and other areas have been fixed during this process.

@panxinmiao panxinmiao marked this pull request as ready for review December 18, 2024 07:51
@panxinmiao panxinmiao requested a review from Korijn as a code owner December 18, 2024 07:51
@panxinmiao
Copy link
Contributor Author

Ready for review now :)

@Korijn
Copy link
Collaborator
Korijn commented Dec 29, 2024

I am relying on Almar to review especially the changes to the renderer.

@almarklein
Copy link
Member

I get an error when I try to change the model:

Draw error
Traceback (most recent call last):
  File "/Users/almar/dev/py/wgpu-py/wgpu/gui/_gui_utils.py", line 76, in log_exception
    yield
  File "/Users/almar/dev/py/wgpu-py/wgpu/gui/base.py", line 167, in _draw_frame_and_present
    self.draw_frame()
  File "/Users/almar/dev/py/pygfx/examples/feature_demo/gltf_viewer.py", line 269, in animate
    gui_renderer.render()
  File "/Users/almar/dev/py/wgpu-py/wgpu/utils/imgui/imgui_renderer.py", line 142, in render
    draw_data = self._update_gui_function()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/almar/dev/py/pygfx/examples/feature_demo/gltf_viewer.py", line 175, in draw_imgui
    imgui.end_disabled()
RuntimeError: IM_ASSERT( (0) && "Calling EndDisabled() too many times!" )   ---   imgui.cpp:8691

@panxinmiao
Copy link
Contributor Author

I get an error when I try to change the model:

Could you try again and see if the error still occurs?

@almarklein
Copy link
Member

Could you try again and see if the error still occurs?

Sorry, I forgot to say earlier that it indeed works fine now! 🚀

Copy link
Collaborator
@Korijn Korijn left a comment

Choose a reason for hiding this comment

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

This is looking great!

@almarklein almarklein merged commit 4dc1540 into pygfx:main Jan 14, 2025
14 checks passed
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

Successfully merging this pull request may close these issues.

3 participants
0