I managed to update the code and get it working and also exposed it to blueprint.
See the code here in my github:
But there is still a problem, there is no physics asset for the now created mesh, and only having one for the skeleton can’t seem right since the assets of the parts might variate in size.
How would I go about creating a physics asset for the now created Skeleton by merging the physic assets from the parts together?
Also when applying one pre-made physics asset working for all parts cloth simulation stops working.
It would be really great if we could get this working together.
I hope to get some answers.
Did you get this working? Any solutions? Do you happen to know if it is possible to apply secondary motion to joints in the animGraph for each merged part separately? I mean, Is there just a single animGraph with this method, or does it allow true modularity where you could have unique extra bones for each merged part, so you can swap clothes/armor and each has their own animGraph and part specific physics instead of having to know in advance what joints will exist in a single animGraph.
Unfortunately not, I didn’t get any response from epic regarding this and didn’t manage to figure it out myself.
Also the plugin is also only some code epic provided, it only adds the meshes together to an instance you can assign to your skeletal mesh actor, so you only have one animation BP. You can manipulate the bones in the anim bp as you are used to and therefore the meshes associated to the bone.
Also the parts you have all have to have the same skeleton you can still add sockets to the skeleto to assign armor or such.
Thanks for the response Luis. So it sounds like it would not be a viable solution for having numerous types of unique attachables that each have their own set of extra joints and requirements for secondary motion or poseDrivers per part that would each require their own animBP, nor allow for cloth. It could work for secondary motion if your secondary motion and extra joints remained consistent per part, but that would be limiting what kind of attachables you could have and still probably wouldn’t work for cloth. It sounds like the Master Pose Component method doesn’t allow individual animBP for attaching items either and though it doesn’t repeat animation per part, it adds extra draw calls. The Copy Pose from Mesh option may work (allow animBP node networks per part), and cloth but I believe this method adds both extra animation per part and extra draw calls, so not efficient if you have a lot of characters and attachables. The last option I found is in Beta, the controlDriver plugin, which sounds buggy and unsupported but allows for individual animBP per part. It was used on FortNite for attachables and is supposedly very efficient. (The tutorial on it is out of date and uses nodes that no longer exist). I also read about a Modular Pawn class but I think it may be old and replaced by the “Mesh Merge” example you tried.
In case anyone struggles with this in the future:
The merged skeleton doesn’t contain Physic Asset anymore hence why simulations stop working. You need to combine all physic assets from your merged skeletals into one physic asset and assign it to your merged skeleton
I just ran into this issue. How would you go about combining physics assets into one? Actually just adding the hair physics to the sk mesh doesn’t seem to do anything in my case.
edit: also are you adding the physics asset to the skeleton or to the created SK Mesh with GetMesh()->SetPhysicsAsset(); ?
This is best resource for PHAT merging i’ve found and it is not much either Gotta dig through the code.
I’ve given up on merged physics for now, while i had pretty good results, it still had a few issues i wasn’t happy with - i’ll get back to it next year