Converting a Static Rigid Body Simulation into a Dynamic Physics Actor in UE4
Subscribe:  iCal  |  Google Calendar
Kiev UA   8, Dec — 10, Dec
Marina Del Rey US   10, Dec — 13, Dec
Las Vegas US   8, Jan — 12, Jan
Zürich CH   31, Jan — 4, Feb
Leamington Spa GB   31, Jan — 3, Feb
Latest comments
by Duacan
5 hours ago

hello Alexander, I really loved your these draw works. I loved cathedrals too.I started 3ds Max new. And I really really want to meet you, if you wanna to do. By the way, my name is Duacan, from Turkey. also Im working for learning and speaking German. Cause Deutschland is the my first country for living. Whatever, take care yourself, Tschüss. insta: 06optimusprime06

by Asadullah Sanusi
1 days ago

nice blog but here is the thing, what is wrong with overlaping uv's and mirroring them, what are the cons of overlapping them and why is this method better in the case of uv? thanks

Thank you @Fcardoso The volumetric light is available in the latest 2018.3 beta. In the visual environment setting, there is a new option to select Volumetric light fog. The screen I shared is from 2018.2 during that time I was using a script to enable it :)

Converting a Static Rigid Body Simulation into a Dynamic Physics Actor in UE4
8 June, 2018

Collin Harris shared an article on a way you can integrate the animated FBXs that Houdini exports into a more real-time solution.


I have been using Houdini for the past few months. I absolutely love the amount of control and flexibility that SideFX has embedded into Houdini’s core, but I’ve found it difficult to incorporate a lot of the incredible simulations and FX that I created in Houdini into my Unreal pipeline (due to their static nature).

So I set out to find a way to integrate the animated FBXs that Houdini exports into a more real-time solution.

What I came up with was fairly simple. Instead of placing the animated simulations straight into my level, I set up a bit of logic to switch the joints from statically animating, to being influenced by Unreal’s physics engine.

I decided to write out my process from start to finish in the hopes that this will help anyone interested in taking their static simulations and utilizing them in a more dynamic situation.

Step One: Houdini

So here we approach our first stage of the tutorial. In order to generate our destructible object, we need to simulate it first in Houdini. In the left image you can see the simulation playing in Houdini’s preview window. In the right image, you can see the note network that I’m using to define the fracturing of the object. I’ll break down some of the VOP networks that I used to simulate the destruction, but just keep in mind that this will work with any rigid body simulation, not just what I made above.

I’ll be going down and describing the function of each node top to bottom. If you need a larger view of the VOP network, feel free to click this link here.

  1. “box1” (box)
    1. You have to start with some kind of geometry in order to fracture geometry, so I started with a box node. You could replace this with any static mesh or primitive node and it would function as expected.
  2. “transform” (transform)
    1. This transform node is there to resize the 1x1x1 box into something more interesting. So in this case, I made it look more like a wall. You are able to adjust primitive parameters in the primitive node (box1), but I have found that separating out the transform makes it easier to access and alter the transform data when it is it’s own node.
  3. “convert_to_fog” (IsoOffset)
    1. So here is where the magic starts to happen. Here we are converting our primitive mesh into a fog volume in order to sample random points from.
  4. “chunk_centers” (Scatter)
    1. Now we’re using a Scatter node to assign Vector3 points to randomly selected fog particles from our above IsoOffset node.
  5. “voronoifracture1” (vornoifracture)
    1. This node takes all of the points that Scatter selected, and using its set parameters, generates fracture points.
  6. “uvtexture1” (uvtexture)
    1. This node automatically UVs your newly generated chunks of geometry.
  7. “setup_packed_prims” (Assemble)
    1. This node can be ignored as it is an automatically generated node that is created when you export your node.
  8. “rest1” (rest)
    1. This node can be ignored as it is an automatically generated node that is created when you export your node.
  9. “attribvop1” (attribvop)
    1. This node can be ignored as it is an automatically generated node that is created when you export your node.
  10. “dopimport1” (dopimport)
    1. This node can be ignored as it is an automatically generated node that is created when you export your node.
  11. “EXPORT” (null)
    1. Whenever I am done with an object that I want to export, I drop in an empty Null node so that when I go to export the object, I’m not digging through node named with hard to remember titles. This is the node that I will be selecting when I eventually export everything out.

Now that we have our basic object fracture, let’s export this to Maya and Unreal.

Above you can see the Game Development shelf in Houdini. You’re going to want to click the RBD to FBX button you see outlined in red above.

Above we have the node settings for the RBD to FBX node. This is where you set all your important settings like what directory to export your FBX to, and what Node you want to export. So we’re going to select our Export node that we made in the previous section, double check that we’re saving it to the correct location, and triple check that our start and end frame are correct. Then once all of that is done we are going to hit the Render button on the top left.

Provided you don’t get any ominous error messages, congrats! You now have a fully rigged and animated FBX of your destruction.

Step Two: Maya

Now that we have our baked FBX, we can take it into Maya for cleanup. Here you can fix shading errors, UV issues, and any other small issues that you might want to take care of before importing into UE4.

Step Three: Unreal Engine

Once you are ready to import the FBX into Unreal, there are a few gotchas to watch out for. First, make sure when you import your file, you have the import animations box checked. Once you have the file in UE4, we’re going to want to test the animation to make sure it looks correct.

Select your destructible wall mesh, and in its animation properties select the destructible animation that imported with the mesh. Then either play or simulate the scene to make sure that your animation is looking correct. Once everything looks good, drop into the physics body of the FBX and make sure that there is collision built on each piece, and not just on the root joint.

Once everything is working, we’re going to want to create a blueprint class. You are going to want to import your animated FBX into the blueprint class, and repeat what we did before by specifying the animation in the properties of the FBX (in the blueprint class this time).

Now we’re going to go to our event graph and set two variables (as pictured above). First, we are going to set the collisions of our mesh to interact with other objects in our scene. Next, we are going to set a small delay to let our FBX play it’s animation before enabling physics on the joints (otherwise the mesh will just splinter apart with no velocity). And finally, after the delay ends we are going to simulate physics on our FBX.

With all of these elements combined, we should have a static simulated destructible that is able to interact and collide dynamically with other actors/assets in our scene.

Below you can see a video of it in action! Neat!

If you have any additional questions, or want to learn about the Houdini to UE4 pipeline, feel free to hit me up on Twitter: @grossbloy.

Collin Harris, 3D Artist

Leave a Reply

Be the First to Comment!

Related articles