How to create a poseable mesh?
I was trying to figure out how to create a poseable mesh. After searching AnswerHub, the forums and the net in general, it seems that either people are trying to figure it out, or they already know how to create a poseable mesh, but are working on more advanced issues. I did not find anyone that said exactly how to create a poseable mesh! So in case anyone else is trying to figure it out, here is what I came up with:
1) Import a mesh with a skeleton into the editor (or create a new Third Person project as an example so you have a skeletal mesh asset).
2) Create a new blueprint class (right click in the content browser file list area):
and select "Actor" as the parent class:
And finally rename the blueprint to whatever you like. I've used BP_BoneControl in this example.
3) Open up the blueprint and go to the Viewport tab.
4) In the components sub-window, there is a button to "Add Component". Click that and search/find "Poseable Mesh" (located in the Rendering components section).
5) In the Component subpanel, make sure that the Poseable Mesh component is selected. Then on the Details subpanel, there is a mesh section. From the drop-down, all skeletal meshes are listed. If you are using the Third Person project, the mesh will be called SK_Mannequin.
6) Now go to the Event Graph tab. In the "My Blueprint" section, you should see that a PoseableMesh variable has been added. From here, you can drag the variable into your blueprint to "get" the variable and connect it to functions such as "Set Bone Rotation by Name" to programmatically drive the position and orientation of the bones in your mesh.
In the image below (Click the Step 5 attachment to see all the details), I created an example with an additional float variable "Elapsed Time" to get the last recorded total time, add that to the new delta time from the Event Tick event, and save the variable again. In addition I multiply this value by 100 so the motion is faster, then connect the result to the pitch of a Make Rot function (setting Yaw and Roll both to 90) and connect that output to the input of a Set Bone Rotation by Name function (I used the Bone Name "thigh_l"). Compile and save.
Note: You can find the list of bone names by opening the skeletal asset (in this example SK_Mannequin under Content/ThirdPersonBp/Character/Mesh) and changing to the Skeleton view. The entire skeleton will be listed under the Skeleton Tree subpanel.
The last step is to then drag the BP_BoneControl blueprint into your scene where you will now have a new actor with the skeletal mesh you selected and whatever custom animations. You can see in the lower section of the image above, the orange guy is raising his leg as the thigh rotation increases with time.
A final note, I have confirmed that this process works in 4.8 though 4.10.
See my initial post for how to create a poseable mesh.
answered Dec 07 '15 at 04:22 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here