Jasper Macks talked about his approach to fluid simulation and use of VEX functions in Houdini as well as shared the .hip file and resources for learning the software.
Hi, I'm Jasper Macks, an FX Artist from Sydney, Australia. I’m interested in all things related to FX and CG. I studied CG at the Academy of Interactive Entertainment (AIE) in Sydney. After I graduated in 2018, I worked as an Assistant FX Teacher at AIE. And in 2019, I was lucky enough to work at Animal Logic on my first feature film, Peter Rabbit 2 as a Character FX Artist.
Since high school, I have been playing around with CG, mainly in Blender, Maya, and UE4. In my 2nd year of studying, I specialised in Houdini and was instantly hooked by its powerful procedural workflow. After working with it professionally it’s definitely my tool of choice.
I’ve also started a Houdini FX Blog which has the .hip for this River FX so if you’re better with hands-on learning check it out.
River FX: Idea
My goal was to get a result as close to photoreal as possible, I knew that finding high quality and visually interesting references would be key. I ended up finding this amazing reference filmed by Kikuchi Nohito:
I started out as basic as possible, just trying to get everything working tech-wise before I began making artistic iterations.
I created a very basic blockout of the scene so I could position the camera correctly, then set up a basic fluid simulation. From there, I swapped out my blockout geometry to Megascans rock assets. An important part of my simulation was getting the river ‘flow’ to look realistic and to match the reference, so rock placement wasn’t final and I continuously changed it to achieve a better ‘flow’ for the simulation.
I started with low-resolution simulations just to see how they would react to my rocks, and how they would flow. After I got the general look locked down, I moved to increasing the resolution to give a lot more detail. A massive part of the fluid simulation is getting the collision objects through its interaction with your fluid to make your work more visually interesting. For me, this was placing rocks in areas that I knew would create a lot of splashes and help me down the line in getting a cool shot.
The technical setup for the fluids simulation is pretty standard, but for the foam and spray, I used a more custom and flexible workflow that I found worked well for this shot. Matching the foam and spray from the reference was key to selling this so I simulated ‘key areas’ separately. This helped improve control over the ‘key areas’ simulation and post-simulation properties, and I also saved time by not having to re-simulate the entire foam and spray if I was just having an issue with one area.
Here’s a technical breakdown of how I set up my foam and spray for rendering. My workflow is tying the density of my whitewater to how long it’s been alive. This is actually very easy to set up using some basic VEX functions.
Firstly, the whitewater simulation exports a few useful attributes.
@age - how long the individual particle has been alive for.
@life - how long the individual particle will live for.
If you divide these 2 attributes together @age/@life, you create a value that scales 0-1. So when it’s just been born it's 0 and when it dies it’s 1. Now if I apply this value to color (@Cd) this is my result.
Note that in my scene I’ve already divided these attributes into @al before I cache it to save space by removing 1 attribute since these particles sims can get pretty massive.
Using a chramp() function where you can remap a 0-1 value using a ramp. I remap my density to a more realistic degree. I also have this ramp affect my @pscale attribute which is used to determine the individual scale of a particle for rendering and also for the scale when you turn points into volumes which I use it for here.
I dampen the value at the start to avoid particles that have just been born from “popping” unrealistically up at high density and also fading out towards the end. For the final step, I turn these particles into a volume using the “volume rasterize attributes” node with my density attribute. This is a great example of how just knowing a bit of simple VEX can really help you art direct your work.
I used Redshift for rendering which greatly helped speed up iteration times. Getting lighting working for this project was key for really selling it especially for the reflections and refractions that the water mesh would receive. I used an HDRI to set overall color and an area light to help direct the scene.
Here’s a breakdown of that down. HDRI > Area Light > Combined.
My renders took around 10 hours for fluids and whitewater. I used Nuke compositing heavily to integrate the whitewater and help reshape my lighting post-render toning down the overall brightness of the water and contrasting the rocks more to add some depth. Also, I added some personal artistic flair such as some camera shake to make the shot more interesting. Here’s a breakdown of just my fluids pre and post-comp.
Here are also some work in progress renders from this project.
There were a few big challenges with this project that I had to work through. Lighting was a big one. I needed to adjust the lights so that my water reflected just that right amount of blue from the sky HDRI without overwhelming it while still setting an overall mood for the shot. Whitewater was also a massive challenge. There was a lot of back and forth from simulation to rendering to composting trying to help the whitewater ‘sit’ properly on top of the water without looking unnatural.
Here some key tips:
- Finding a good realistic reference is key.
- Starting small and scaling up is very important, especially for fluid simulations.
- Setting up a wetmap so that areas close to your fluids become dark and more reflective is a great trick on selling rivers.
- Might be obvious but getting motion blur for your water mesh is an absolute must.
- Lots of storage space. My final fluid was around 300GB.
- A good amount of RAM is important.
If You Want to Learn Houdini
Houdini may look intimidating with all the crazy stuff you see online. But I wouldn’t say it’s inherently difficult to learn or that someone who isn’t “naturally technical” couldn’t pick up Houdini. If you’re personally thinking of picking up Houdini, here are some great learning resources that helped me grow as a Houdini & FX Artist.