Closed Jake-Rich closed 2 years ago
Maybe the bone needs to be used by part of the mesh. When I added bones to the rust pistol it didn't remove the bones, but I forced the mesh to be a child of the bone (which you probably want to do to make the bone useful anyway)
can you explain the use case here. Should you be using attachments?
This is working as intended. If your model has no skinning data, you don't want it to include a skeleton. Using RenderMeshFile you can select a bone to skin to which means you'll have valid skinning data and your skeleton will be included.
You probably should just be using attachments, I can't think of any use for having a skeleton with no skinning data.
The problem afaik is you can't use attachment points without a skeleton & bones, which is how you end up with no skinning data but a skeleton.
I'll test it but I'm pretty sure attachments work on a non skinned model. If not then it's a seperate issue.
To expound on this, the Bone Culling Type inside the BoneMarkupList properties applies -only- when an animation is present, such as an EmptyAnim or a BindPoseAnim. This isn't necessarily an issue, but this behavior can easily lead to confusion.
I can have another look at this but when I first looked it didn't make sense to keep bones around with no skinning data
I had a use case: for the view model of some guns, there's a 'lead gun' bone, that isn't attached to anything in the base mesh. It's designed for a gun to be parented to it. I got around this by adding an attachment to that bone.
From my testing, skeleton shows up if you have a mesh or an animation, I'm not sure why you'd have a model with no meshes or animations
I can add this but again, I'm not sure what use is a model that just has a skeleton and nothing else
I was under the impression that It'd cull bones even if there is a render mesh? So a mesh with a rig would get its Skelton culled unless there's an actual animation present
Seems to work fine here
Oh, it only doesn't work when the model has no skinning data
Oh, it only doesn't work when the model has no skinning data
It happens to meshes with skinning data that have any bones without weights assigned to them as well. It's not a common use case, but meshes that use unweighted bones as hierarchical parents for weighted bones (e.g. forearm high and low twist bones being children of one forearm bone) is a technique that some artists use in their rigs. It seems unlikely to occur in development on character models that would have some form of animation attached to them, but it's more likely to affect a model whose skeleton is being driven entirely by scripts (whatever the use case may be)
I've allowed it to keep bones even when there's no skinning data, let me know if that allows you to do what you need to do
No issues in my particular use case now, don't know about others.
Describe the bug
I was having problems getting attachment points to work, and after much debugging realized modeldoc was not compiling the skeleton until I included any animation.
To Reproduce
Expected behavior
Bones shouldn't be culled by default.
Additional context
https://developer.valvesoftware.com/wiki/Half-Life:_Alyx_Workshop_Tools/Modeling/Model_Troubleshooting
There is a wiki page on the valve wiki that states bones will be agressively culled without modifying bone culling settings, but modifying "BoneCullType" doesn't seem to work. Even then I think it is more intuitive to have to opt into culling but as long as we don't need to insert empty animations I'm good.
Screenshots
Bones without animation result in no skeleton
Add in the animation and now the skeleton compiles