google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.35k stars 1.84k forks source link

After increasing CONFIG_MAX_BONE_COUNT ,the loading of the model crashes #7882

Closed wuyongxiang closed 4 weeks ago

wuyongxiang commented 1 month ago

I need to load a relatively complex GLB model, but its number of bones is greater than 256, about 400+. In the original state, the model cannot be displayed.

So I looked up the issue and modified

from: constexpr size_t PROFIG-MAX-BONE.COUNT = 256;

to: constexpr size_t PROFIG-MAX-BONE.COUNT = 512;

And rebuild Filament. After loading the model again, a crash occurred in Android, Log display:

Link error in "transmission_undershader": L0005 Max uniform block size exceeded “

What do I need to do to display this model? klee_f.zip or bailu.zip

romainguy commented 4 weeks ago

L0005 Max uniform block size exceeded

Your device doesn't support UBOs large enough to store that many bones. The limit of 256 was chosen to work across all Android devices. If you want to support more bones across more devices it would require changing how bones are stored and implemented in Filament, using textures for instance (which would have other issues).