Mesh sockets/bones optimization question, do they impact performance?

Hello,
I was wondering whether sockets can have an impact on performance.
I have a lot of blocks that are made to be attached together at very precise locations, but in exemple, some blocks can have more than 50 or even 100 sockets.
Does placing a lot of those hi-socket-count block can have an impoact on performance ? Does Unreal stores every sockets location at runtime or does it call it only when asked ?

Also, in the same idea, can i replace static mesh by skeletal to help speed up the socket creation (by replacing them by bones) ? with the same performance question of course

Thanks

This is the top hit on Google for “UE4 mesh socket performance”. I think it should have an answer so I’m bumping it. I am also wondering this myself. For instance, if I had a socket for every joint in a character, does that impact performance? I would expect that it should but I think someone who really knows the engine should say for sure.

If you run the session frontend and profile, you’ll be able to see how expensive the socketed meshes are under ‘UpdateTransformCommand’ in the render thread. I’m not sure if this is the full picture.

Anyone got any info on this?

In lieu of an official answer, I have gone through the source. I can’t make any guarantees but here is what I believe to be true.

It looks like sockets are updated when they are used, not on each tick. So they shouldn’t impact performance unless/until you use them. If you call (for example) GetSocketTransform() for many sockets on each tick then you will potentially get a performance hit. But if they are just there waiting to be used then they are not updated on each tick and shouldn’t create a performance hit.

It is worth noting, however, that sockets deal with matrix transformations which are very fast. It may take a considerable number of sockets to notice any performance hit even if you update many of them on each tick.

This all changes when you start animating. Animations allow for sockets to be set to always update (USkeletalMeshSocket::bForceAlwaysAnimated). If that is set then every socket will get updated on every animation tick.

That’s the best I can figure. I invite anyone to prove me wrong.