Skip to content

[models] glTF model loading #2075

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

Closed
electronstudio opened this issue Oct 22, 2021 · 3 comments
Closed

[models] glTF model loading #2075

electronstudio opened this issue Oct 22, 2021 · 3 comments

Comments

@electronstudio
Copy link
Contributor

I added a model for testing here: #2074

In 3.7 this loaded:

image

In master I get

INFO: FILEIO: [resources/models/gltf/Wizard.glb] File loaded successfully
INFO: MODEL: [resources/models/gltf/Wizard.glb] Model basic data (glb) loaded successfully
INFO:     > Meshes count: 6
INFO:     > Materials count: 2
WARNING: MODEL: glTF image data MIME type not recognized
WARNING: MODEL: glTF image data MIME type not recognized
INFO: VAO: [ID 12] Mesh uploaded successfully to VRAM (GPU)
INFO: VAO: [ID 13] Mesh uploaded successfully to VRAM (GPU)
INFO: VAO: [ID 14] Mesh uploaded successfully to VRAM (GPU)
INFO: VAO: [ID 15] Mesh uploaded successfully to VRAM (GPU)
INFO: VAO: [ID 16] Mesh uploaded successfully to VRAM (GPU)
INFO: VAO: [ID 17] Mesh uploaded successfully to VRAM (GPU)
INFO: TIMER: Target time per frame: 16.667 milliseconds

and program then hangs

@raysan5
Copy link
Owner

raysan5 commented Oct 22, 2021

@electronstudio Does the file follow all restrictions specified in LoadGLTF(): https://github.com/raysan5/raylib/blob/master/src/rmodels.c#L4578?

@electronstudio
Copy link
Contributor Author

electronstudio commented Oct 22, 2021

Sorry I can't remember the options it was exported with now and I don't have the non-binary version to investigate. I played around with the options until I got models that worked in Godot 3.2 and in Raylib 3.7 and added the models to the project but I don't think I still have the source files so I'd have to redo it.

raysan5 added a commit that referenced this issue Oct 23, 2021
@raysan5
Copy link
Owner

raysan5 commented Oct 23, 2021

@electronstudio Reviewed some issues with LoadGLTF(), now the model should load correctly.

Just note that the Staff mesh use joints to transform its position and they are not supported for now.

Wizard_model_issue

@raysan5 raysan5 closed this as completed Oct 23, 2021
@raysan5 raysan5 changed the title glTF model loading [models] glTF model loading Oct 23, 2021
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

2 participants