Download

Part of skeletal mesh to Procedural mesh

Hello,

I have a code for generating the whole skeletal mesh into procedural mesh (I also made it, just so I can call it in blueprints) (Create procedural mesh from animated skeletal mesh? - UE4 AnswerHub), however now, I need to implement that only certain part of the mesh is gonna be generated based on the bone name I specify . So I need to get only certain vertices that are connected to bone (And preferably bones child bones) based on bone name. As I’m not really experienced and need only this part in c++, I’m asking here for some directions on how to do it.

It seems trivial but my lack of experience in c++ in ue4 is the main problem here and the documentation being not that helpful. I found this IMeshUtilities::CalcBoneVertInfos however I had no luck of implementing it in the existing code I have.

Any tips on how to get the vertices in the current code or some pointers that could put me in the right direction would be appriciated.
Thanks!

I’ve not got time to have a full look, but I think this might help.

SkeletalMeshLODImporterData.h defines an FVertInfluence struct which appears to contain data on a single bone to vertex with weight instance.

The Skeletal Mesh Reduction plugin code has a method ExtractFSkeletalData which does some per vertex calculations and I think will point you on the right track to calculating a set of vertices per bone.

Hope this helps, and keep us updated!