Experts

Liquid Image

Two methods on applying images to particles in a fluid simulation.

liquid

M7.1

First a note about this past week. As many people know by now, the town of Ridgecrest California has been hit by two major earthquakes back to back. A magnitude 6.4 on July 4th and a 7.1 on the night of the 5th. Since then quite literally 1,000’s of aftershocks have happened since. Many homes and businesses sustained damage and it will be a long road to recovery for the residents of Ridgecrest.

My wife and I live in Glendale California about 105 miles southwest of Ridgecrest. Even with that great distance we clearly felt the foreshock and the main shock as well as many of those after shocks since July 4th. Living on the third floor amplifies the movement a lot too. We are both ok and did not sustain any damage ourselves other than some rattled nerves.

Being the visual effects geek that I am, I had to stabilize footage I had recorded during the quake just to better view the movement of what was shifting in our home. Of course I used my own stabilizer script for After Effects.

I had recorded today’s tutorial two days ago on Saturday the 6th. A few aftershocks were just large enough to be felt that morning, but thankfully no large quakes occurred during recording, so there shouldn’t be any noise on the audio track (as far as I could tell), but if you do hear any deep sounds that will likely be from the aftershocks.

Back On Topic: Liquid Sim

So today’s tutorial focuses on building a simple liquid simulation, and then mapping the color values from an image onto the particles. Not projecting the image colors, which you will also see in the tutorial, but actually assigning each particle a color value from the image at birth.

X-Particles contains a few different methods for applying color to particles, and each way functions very differently. It can be confusing as to which way works best for your situation. There will be two types of animations we’ll make today, and I will show you a couple of these color application variants.

These GIFs show a melting style liquid image that I had done where I was using a noise shader to activate the movement of the particles. The left one shows a harsher break line where each activation area takes place. It has an interesting look, but I was aiming for a smoother melting kinda feel. The right GIF is showing the smoother activation solution and how the surrounding particle interaction blends together better.

liquidliquid

Swirling

The second section of the tutorial will focus on a liquid volume of particles. To swirl them about we will use force modifiers. When applying an image color value to this type of build, it can be bit tricky. I will go over in detail how to approach this hurdle. The swirling effect can be cool looking if you choose a camera angle that’s offset and low like the GIF below.

With particle volumes, you really don’t have a simple surface to apply a texture to like with geometry. The texture application works very differently. For X-Particles it will require using the xpColor shader option and working in shader space. Thankfully we will have a visual to work with as we manipulate the image when applying the color to the particles.

liquid

 

Tutorial


Support ProVideo Coalition
Shop with Filmtools Logo

Share Our Article

David Torno is a Visual Effects professional based in Los Angeles, California. His work over the years has included commercials, feature films, music videos, and multimedia projects. During his free time, David enjoys expanding his…

2
Leave a Reply

avatar
1 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
David Torno Jon Bierman Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jon Bierman
Guest
Jon Bierman

Hey David, I came up against a problem when using xpColor to apply the bitmap to the fluid sim’d particles. For you, the bitmap seems to apply correctly down along the Y axis, which is what you want when dealing with a fluid sim and gravity. My bitmap is projecting on to the particles along Z, so I get a pixel sorting result as it projects the image across the particles instead of it mapping the photo in a top-down fashion. How do I remedy this? I didn’t see you do anything to circumvent this.

David Torno
Guest
David Torno

Hi Jon, I actually didn’t run into this issue. The pool setup was just the xpColor object as shown in the tutorial verbatim. No behind the scenes stuff was done. I can only guess that you could try rotating the shader using the shader tool (just below the object tool) in the default UI top left of screen. Not sure if this tool even works with XP at all though. The only adjustment options I am aware of are the UV scale and offsets that I showed in the tutorial to stretch the image and realign it on X and… Read more »