Does using a piece of a skeletal mesh still load the entirety of the skeleton, and if so, is this problematic/excessively costly?

I am working on a weapon attachment system which I would like to be based around the concept of skeletal mesh merging to get the weapon models. As I understand it, in order to do a skeletal mesh merge requires that the component parts are already part of the skeleton being merged. If I want, for example, a weapon that can have three different mutually exclusive attachments, I think I would then need to make a bone for each of these in the weapons skeleton to make the merges possible. My concern is that if I have a lot of mutually exclusive attachments, the weapon’s skeleton is going to end up with a lot of unused bones at any given time.

What I am wondering then is will this end up being extremely costly or is having extra bones negligible or potentially irrelevant in this context?

Technically yes, more bones is more for the engine + animation blueprint to compute. Assuming your weapon is a hero asset, it probably wouldn’t be that big of a deal.

You’d probably be better off having the attachments be static meshes, and have them attach to sockets connected to the skeleton- assuming the socket can stay static connected to the bone the entire time. This method wouldn’t work if you had like animations of a character actually sliding on a scope or whatever, because that would require bones.

I could be wrong about this, but I’m pretty sure having a bone with no vertices weighted to it won’t really make any notable difference on performance. But sockets would eliminate the need for vertex weights

I was originally going to do static mesh components with sockets, the problem is that I then end up having an excessive number of components (which I have read is not ideal with reference to draw calls), and each time I swap weapons, (assuming I don’t want to have unequiped weapons loaded at all times) I need to reload a bunch of attachment meshes and attach a bunch of components. It would seem easier to just merge everything that way I only have to set a singular mesh when the item is picked up.

I guess at that point it would just be a pick your poison type of deal. Off the top of my head, I don’t know which one would be more performant, multiple unused bones or the extra draw calls from components.

My gut is telling me the sockets would be better for performance overall- but I could absolutely be wrong. You could always compare with optimization profilers! Sorry I couldn’t be of more help, maybe someone with more info than me will chime in

I worked a bit with the skeletal mesh merge idea yesterday and it is proving to be pretty impractical from a setup perspective. I think using the static mesh components is probably the right way to as I am starting to think the other way just won’t work in the long term for the system I want to do. Maybe someone will have another opinion on the subject in the future but I am also starting to think more draw calls is probably the right way to go in this context.

Thank you for the response though, I appreciate it either way!