X-Particles Simulating Lava

June 03rd 2019 08:00:39am

Updated 5/3/2020: Project file software versions have been updated. See “Software versions” section down below.

Simulating lava or any liquid that has a variable viscosity can be difficult. Depending on the tool you are using, it can be downright impossible. Today I’m going to show you how I made this X-Particles lava.

So why X-Particles?
Given that doing a liquid simulation like this is normally quite intensive for a single computer to chug on…why not do it in Houdini? Well I probably will still go back and try it in Houdini (again) at some point to push things much further, but X-Particles has this fun simple sandbox aspect about it that is really appealing. It’s approachable enough to dive in quickly, and still allows you to achieve quality results. Also I have had this long running personal challenge of figuring out how to do lava with X-Particles just because.

History
I’ve been toying and battling with creating lava sims for awhile. I did an actual do a Houdini lava sim around 2014. It was while following BW Design’s Houdini Lava Like a Boss series. It was really informative. This was my result back then.

Due to many life distractions pulling me away from learning Houdini on a daily basis I’ve of course forgotten all of that knowledge. I am hoping to change that very soon though. I have made coded attempts with X-Particles using Python, as well as XP modifier builds, but I couldn’t get some aspects functional. All in all I have gone through roughly eight iterations of making lava over this time span.

Complexity
So the lava build I will go over today in the video tutorial is definitely not light weight when it comes to processing time. Just to give you some warning. My final specs came in at 50GB of cache data saved to disk. The sim took six hours and fifty-six minutes. Just under seven hours for the sim, and the render took roughly one hour and ten minutes on GPU using Redshift3D. The final particle count reached just over three million.

This build is very finicky, as with all simulations, the smallest of adjustments can have large consequences in the final result. Many variables are at play, and they all influence each other, so while I explain step by step why something is being used, or how I solved a hurdle, your final result may not match perfectly.

The core building blocks should help you though in better understanding various principles behind creating such an effect.

You can download the project file via the button on the right if you’d like to jump ahead, or just want to deconstruct the file with your own eyes.

Software versions
The project file was made using the following software versions.

  • Cinema4D R20.026 R20.050
  • X-Particles Build 690 Early Access 742
  • Redshift3D 2.6.31 2.6.50

Since software is constantly changing, please be aware that at any time this project file could cease to function properly if your versions are different than the ones listed above. I will try to maintain the project file as best as I can. If you do encounter an issue please comment on the article below to let me know.

Here are some screen caps from the project file. Some Xpresso is used for one aspect of timing the explosions, but is not required. I have commented all of the nodes to show what they are doing. The video tutorial of course explains in greater detail why we are using them and how to connect them.

Checkout more:
After Effects ExtendScript Training: Ep. 18 Part 2
After Effects ExtendScript Training: Ep. 2
Houdini Mardini Modern
Expression Shorts Numerical Readout
Free Function Friday Ep.24 – changeRenderPaths