Deborah R. Fowler
Houdini Mocap Marker Fun into Unreal
Posted March 3 2020
Taking your mocap marker data into Unreal
In Houdini you have written your python script to process the files. If you simply want to light your animation in Unreal, this is very straightforward. Save your file as an alembic (.abc) and then import it into Unreal.
If however you want to trigger the destruction in Unreal you will need to write a level blue print. Steps below:
In Houdini: Output your fbx using RBD to FBX from SideFXLabs tools. If you would like to try following along the fbx file used is here.
NOTE: In your final results I do not want to see the t-pose sections - be selective with your frame output to your fbx.
Be sure to check you are using the correct Frame range and directing it to the correct output - let's suppose we name it MocapTest
In Unreal (for the purpose of this demo I was using 4.21.1) :
- Import
- make sure Animation / Import Animations is checked on - ignore the missing mesh warnings
- Now you have a MocapTest, MocapTest_PhysicsAsset and MocapTest_Anim as well as MocapTest_Skeleton
- Drag the MocapTest_Anim to your scene- the animation should be there - if it is not, go back to step one.
- If you click simulate physics on, it will not behave as expected. We need to fix that.
- Delete the default MocapTest_Physics Asset, we are going to
create a new one
- Right check on Mocap_Test and select Create / Physics Asset / Create and Assign
- A dialogue comes up - what you do now is select instead of capsule multi convex hull
- and then create asset. It will create a collision
for each sphere. Then another box comes up
- click Save and close the window
Next to make a blueprint to trigger the simulation on.
- Under blueprints open the level blueprint (remember to save your level)
- select by clicking on the MocapTest_anim object - in the blueprint you can now create a reference to this object (Actor)
- select set simulate physics
- wire the blueprint together in the following diagram with the
Get Player Controller, Enable Input and Space Bar Event nodes
Once this blueprint is in place, compile and run. You will be able to tap spacebar to see the motion capture data fall into pieces. Done!