Closed Shinmera closed 10 months ago
On further examination, this may be from trying to allocate a uniform that's too large. Possibly for the pose matrix uniform? This model has quite a lot of joints.
Indeed, there is a 4x4 matrix per joint in the uniform variables.
What's the number of joints in your model?
366. You might want to consider switching to a texture based approach instead to remove the uniform limit.
Yes that could be a solution
Fwiw I've implemented a simple texture1DArray RGBA texture that stores the palette as 3xN colors in my engine and that approach works perfectly fine.
Should we close this one @Meakk ? or label as wont fix ?
In the very least don't just segfault on a model that has too many bones, come on.
It is a VTK issue, not a F3D one. We can keep it open but the fix, if it possible, should be done in VTK.
But I may be wrong, waiting on @Meakk input
I don't see myself start working on it without a dataset to reproduce anyway.
Switching to a texture should be doable, but it has to be done in VTK indeed.
@Shinmera do you have a dataset you can share?
In the very least don't just segfault on a model that has too many bones, come on.
Please share a dataset so that we can reproduce the issue and fix the segfault as least.
I'm sorry, I'm not a rigger myself, and the dataset I used is proprietary so I can't share it publicly.
Ok, I will try to look around the web for a dataset to reproduce.
I'm afraid I'm unable to find a dataset to reproduce the issue so far. Please find a dataset that you can share so that we can reproduce and fix the issue.
I generated some simple tubes with bones using three.js
's SkinnedMesh
and GLTF exporter. I get the first segfault at 253 bones so here's that and the last working one at 252 bones
I fixed it in #1117
I decided to go with SSBO instead of textures. It requires OpenGL 4.3 but I think that's ok nowadays.
If there are less than 250 bones, we continue using uniforms as it seems to be faster.
It's now merged in master. We'll release 2.3 soon, but the fix will be available in nightly tomorrow.
It would be appreciated if you can confirm the fix is working fine on your datasets @Shinmera
Will do! Thanks for the work!
last nightly available here: https://github.com/f3d-app/f3d/releases/tag/nightly
Can confirm it working! Thanks again!
Describe the bug Trying to load a gltf or glb model file crashes on my system with a segfault.
To Reproduce Steps to reproduce the behavior:
f3d --dry-run example.glb
Expected behavior The file shows.
System Information:
F3D Information Paste the content of
f3d --version
: F3D 2.2.1F3D - A fast and minimalist 3D viewer Version: 2.2.1. Build date: 2023-10-05 15:03:05. Build system: Linux 64-bits. Compiler: GNU 13.2.1. External rendering module: ON. Raytracing module: ON. VTK version: 9.2.6.
Additional context Add any other context about the problem here. Trying with verbose crashes with the following:
I unfortunately can't provide the model file, as it is part of a private project.
FWIW other OpenGL programs run fine and I haven't noticed any other issues.