jj

Houdini To Niagara Particles

The Point

Physics simulation has always been an important aspect of the gaming and film industry. It provides realistic and dynamic behavior of objects, making the environment more immersive. However running complex physics simulations in real-time is currently not practical or desired. In this post, I will take a look at creating a rigid body physics simulation in Houdini and Exporting that to Unreal Engine using the Houdini Niagara Data Interface.

The simulation involved rocks being constrained together until they were morphed into spheres. This was achieved by using the Houdini's built-in rigid body dynamics toolset and by baking out the morph from rock to sphere using a World Position Offset (WPO) texture. When the rock to sphere morph was turn on, the rocks were subjected to collision forces, causing them to be flung out. The morph was then turned off so that the rocks would go back to their original state, and a spring force was used to pull them back to their original position.

Here was the setup with Houdini

Here you can see the rocks morphing to spheres using the exact sample typology, so a WPO offset can be baked out using a texture and then later replicated in unreal

Once the simulation was complete, Houdini's Niagara interface exporter was used to capture specific attributes, such as the position, rotation and morph value of each rock. These attributes were then imported into Unreal Engine, where the simulation was further refined and fine-tuned.

In Unreal Engine, the imported attributes from Houdini were used to control the particles, giving the simulation a dynamic and realistic feel. Here you can see how the Houdini attributes are being accessed inside of Niagara.

By accessing these values I can use them inside of the niagara simulation to drive things like color.

I can also pipe the retrieved attributes through to the shader to drive the VAT lerp between rock and sphere. I did this by using the dynamic parameter property

In conclusion, Houdini and Unreal Engine make a powerful combination for creating complex and realistic physics simulations. By using the Niagara system in Unreal Engine, we were able to bring the simulation to life and make it even more immersive. The use of Houdini's rigid body dynamics toolset, custom attributes to drive a WPO lerp, and Niagara interface exporter made the process of bringing the simulation into Unreal Engine a seamless experience.

A side by side video of the simulation in houdini (left) and unreal engine (right)

next
Experiment
Video
Reel