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

Emscripten - Assimp loading of GLTF Models crashes / throws exception #7738

Closed
NickHardeman opened this issue Nov 1, 2023 · 8 comments
Closed

Comments

@NickHardeman
Copy link
Contributor

See this example: (Press '2' or '3' on keyboard to try and load gltf model).
https://nickhardeman.com/temp/OFExamples/ofxAssimpExample/

Maybe related to this issue in Assimp?
https://stackoverflow.com/questions/74982318/assimp-error-when-loading-model-in-the-browser-wasm

@NickHardeman
Copy link
Contributor Author

I think the check may be fixed via this pull request to Assimp which was merged in 5.3.0
assimp/assimp#5154
Seems to be quite a lot of other fixes as well.
https://github.com/assimp/assimp/releases/tag/v5.3.0

For compiling Assimp for Emscripten for testing quickly on OSX, what might be the easiest approach? Apothecary?
pinging @Jonathhhan :)

@ofTheo
Copy link
Member

ofTheo commented Nov 10, 2023

I think its a simple as downloading 5.3.0 and using the same commands as in apothecary:

https://github.com/openframeworks/apothecary/blob/master/apothecary/formulas/assimp.sh#L201C1-L213C1

not sure if you need the copy files section but here it is :)

        cp -Rv build_emscripten/include/* $1/include
        cp -Rv build_emscripten/lib/libassimp.a $1/lib/$TYPE/libassimp.a

@NickHardeman
Copy link
Contributor Author

I built for osx and emscripten and it seems to fix the gltf model loading crashes
https://nickhardeman.com/temp/OFExamples/ofxAssimpExample_5.3.1/

@Jonathhhan
Copy link
Contributor

@NickHardeman only the fifth model is not working after the update (it was not working before).

@NickHardeman
Copy link
Contributor Author

I disabled the last model for emscripten; the payphone; since it loads incorrectly before and still does after the update to 5.3.1
image

@Jonathhhan
Copy link
Contributor

I disabled the last model for emscripten.

@NickHardeman makes sense, had the same issue.

@NickHardeman
Copy link
Contributor Author

This pull request to apothecary would use assimp 5.3.1, but it's failing msys2 clang64.
openframeworks/apothecary#296

@NickHardeman
Copy link
Contributor Author

Closing because the apothecary pull request was merged.

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

No branches or pull requests

3 participants