Closed Grodbert closed 2 months ago
holy carp
I've restored it to how it used to compile skeletons. Note that the bone count that's printed has always been the number of bones in the model, not the number of bones in the mesh.
I see, could've sworn they updated on the fly! That could be a cool feature, but that's for another issue.
I've confirmed it works by comparing 500 models with a weak LOD (remove fingers and penis bones) and then without.
An increase of 33%! Not too shabby for removing only 4 bones out of 32.
Fantastic
Describe the bug
This is a pretty big performance issue, In models, one of the biggest FPS killer is bones, we found you could use the RemoveBoneAndChildren flag on a mesh and use that for LODs to increasingly discard bones according to the LOD, which boosted FPS massively, especially when Max implemented it on the citizen. This no longer works, bones aren't getting culled correctly with LODs. I've troubleshooted a couple factors:
To Reproduce
Alternatively, download the vmdl file below for a quick setup (place in assets folder).
Expected behavior
The bones should be getting discarded on the fly using the current rendered mesh's flags.
It using only the first mesh for the bones is probably intentional, as all the files contain the armature (culling bones in one file still leaves them in the others), however, this issue isn't as it's recent behavior.
Media/Files
models.zip
Example of first mesh not having any culling, LOD1 has RemoveBoneAndChildren, and LOD2 has DiscardSkeleton:
https://github.com/Facepunch/sbox-issues/assets/86626409/99f16652-6e8e-4419-834a-e804bb670074
Additional context
No response