Ink in Water

hey there,

I need to create something similar to this for a project:

So far I only did fluid simulations with Phoenix, so I´m not sure where to start here.
I have some sort of a liquid moving through another liquid and I have set up a particle flow to simulate the behaviour of that liquid moving through a hole in an object.
All I need now is to somehow use that Pflow as a source to simulate smoke.

I only have time til the end of this week, so I´d appreciate a little push in the right direction…

So…not to sound too lazy, I think I´m on track, but I have a bunch of questions before I start the detailed simulation.

My setup:

I have a Pflow system which I use as an emitter in a PHX_Source. I used a pretty low discharge value (5) and ticked “Temperature” (also quite low with 60, just to add some variety).
I tickes “Smoke” with default value of 1,0 and Velocity with 1,0 and set it to “Inject” and Time base to “Particle age”.

In my Phoenix Sim I excluded the forces used in the Particle Flow setup and set a low gravity value.

My questions:

1. The smoke seems too dense, I guess that is because there is too much emission going on. Should I:
a) lower the smoke value
b) lower the discharge value
c) animate the discharge value. Since the PHX_Source is set to “particle age” I guess I´d have to animate the discharge from frame zero to lets say 100 and then the particles should stop discharging smoke after 100 frames based on their age, right?
d) increase the value for smoke dissipation.

2. I also did a quick test render, trying out the trick described in the manual to make the smoke look more detailed by using a peak transparency diagram. In my test it did look more detailed, but I don´t get any transparency in the alpha channel.
Why?

3. I f I want to get render elements for the smoke I´d have to render it in geometry mode, right?
Do I need to apply a special shader then or do I just use the settings ine the rendering tab for Color/transparency?

Hello! Sorry for the late reply, and first off - did you check the “Ink in water” example scene: Chaos Docs

If you need to get the same effect, it’s better to use the same method as this scene - the phx sources generate drag particles which are then rendered using the Point mode of the PHXFoam shader.
If you are happy with the dynamics of your simulation so far, you could just turn off the smoke and instead emit drag particles which will give you a better ink-in-water look.

Otherwise,
1. The visual density of the smoke can be controlled entirely from the rendering option, as you have already done in pt.2. In general, the source settings will help you change the shape and behavior of the fluid.
2. I cannot reproduce this, could you screenshot me your fire, smoke color and smoke opacity options?
3. Geometry mode is enough for the render elements, the settings should work the same way as regular Atmosphere rendering. If not - this could be a bug, don’t hesitate to call in such case :slight_smile:

Hey there,

good thing phoenix is so intuitive and easy to play around with…

I think I figured out most of this by myself already:

I changed the transparency curve from “Transparency” to “Opacity” and now I get correct alpha and I can control the look. I´ll have to do some more testing, because the fluid is actually thicker than water (yes. its blood.) and the first look I got by playing around was actually closer to the desired look, so now I´ll have to try and reproduce it…

I also get correct render elements in geometry mode, works like a charm so far…

Only thing I´m not sure about: Do I need to check anything so the sim just uses my scene lights?

I´m currently working on some medical animations and there are always some fluid-in-fluid scenes that I always struggled with, would be great if I could use phoenix for these as well..:wink:

no need to check anything, the simulation is using by default the scene lights

Oh, yeah - getting great results the first time around and then trying to go back is a classic, you might wanna try using max’s “incremental save” option to save you from this, but you’ll need to hardcode a path in the Ouput rollout of phoenix to reuse the cache files after the max file gets copied :slight_smile:

Btw, the geometry mode is slower than the regular atmosphere mode, you could go back to ‘atmosphere’ while not using the render elements so you won’t have to wait.

The interaction with vray lights should happen automatically, but in case you are using omnies or other 3dsmax lights, make sure to enable their atmosphere shadows, check this for more help: Chaos Docs

Haha, yeah, I´m usually saving a lot of incremental saves…but mostly not when I´m just “playin´around”…
I already noticed the increase in render time and since using the zbuffer element of the sim to do some DoF in post doesn´t work too well anyways because of the transparency, I just switched back to atmospheric.
Until AE is capaple of deep compositing I might have to revert to rendering with DoF enabled for some shots, which is something I´ve been trying to avoid for quite a while now…

Hi, any chance to have a sample scene of the ink for Maya?

Thanks,

Yannick

Hi,

Here’s a sample scene for Maya.

Just a quick explanation of the setup:
The Source is using 4 cylinders to emit particles (type drag) inside the simulator.
Phoenix makes four different particle groups (one group per object) and that is used in the PHXFoam shaders to color each particle group individually.
That’s how the color variation is done.
The rest is just setting up lights and rendering.

Keep in mind that in the video above the particle count is huge (60M) and requires a lot disk space (about 400GB).

Regards,
Tsetso
ink_in_water_Maya.zip (16.5 KB)

Thank you for the sample scene.

Hi there,

I´m back with a similar project, I didn´t really have time to polish the look last time, so I wanna take another shot at this, especially since its something I have to do quite often for medical animations.
The example I posted last time doesn´t actually represent the look I´m after, this video is a much better example:

The problem is less with the visual appearance now, but rather with the dynamics. I have a tube submerged in water beeing torn open by the pressure of a red liquid (lets say its blood. because it totally is.).
I simulated the tearing with cloth and now I´m trying to figure out how to get the dynamics right.

I tried playing around with a drag force in the sim, but tweaking it is difficult, since it looks either way too strong or way too weak.
I feel like I should be getting it down mostly with playing with the time/scale/gravity values, without worrying about external forces, am I right?

So I have two questions:

1. How do I increase the detail and make the simulation look less like cigarette smoke and more like a nuke? Just increase the scene scale or the gravity until it looks right?
2. The burst of the tube is rather fast, so I need the “liquid” smoke to come out pretty fast and then slow down, like it would in real live under water.
I´m currently trying to just animate the emitter, going from 0 to 300 in 2 frames and then back to 20 over the course of 50 frames or so.
Is this the correct approach? Or can I animate scene scale, time scale or gravity to achieve this look?

And one more issue:

3. The emitter doesn´t point downwards, like in the example video, but rather sideways (emitting from the cap of a cylinder with inject mode). If I exclude the tearing object, the smoke doesn´t seem to emit with any velocity. If I include the tearin object, the smoke gets propelled out of the tube way too fast, it took me a while to figure out, that I could decrease the velocity multiplier in the torn object and that would affect that speed.

So my question would be: How do I control the speed with which the smoke gets emitted? I increased the velocity multiplier in the Emitter object to 2, but that didn´t do much. Do I need to increase it much more, or are there other parameters I have to change (like temperature? Currently its around 300).

4. I´m also not happy with the look yet. there are always those spherical shapes visible (see the attached image), what are those and how do I get rid of them?

I switched to buffered mode and that seems to get rid of those shapes. I used the direct symmetric conservation method mainly, because it said in the manual that this works best for stuff like nuklear mushrooms, something that looks close to what I´m after. But I guess I still don´t get what those parameters actually mean…:frowning:

Its always a good idea to go back to the manual though, right now I think I figured out the speed issue: Since I checked the velocity checkbox in the emitter and the emitter isn´t actually moving, I guess thats the reason the smoke doesn´t seem to have any speed while emitting.

Hey,

So the drag particle approach would not yield the result you are after - it will strictly produce cigarette-style smoke or ink that stretches into strings. To get closer to the reference video, you should use just smoke emission. You should also make sure you are on the latest nightly. There you can find the Conjugate gradient conservation - it will work better for a better rolling of the smoke mass. You should also increase the simple smoke factor in the smoke opacity options, and this should be pretty much it. You should turn off vorticity in order to get a smooth surface and you should up your resolution to at least 30M voxels.

Indeed, the velocity on the source is not meant to make the discharge faster. If you want that, then you should switch the source into Inject or Surface Force mode - depending on whether you want your emitter to be a solid obstacle or a non-solid - surface force works only for solids, while both modes work for non-solid objects.

This should be pretty much it :slight_smile: Give it a shot and make sure you are on a latest nightly.

Cheers!

Well, it´s going in the general direction, but still not quite there:

1. Whats the difference between “constant color” and “RGB” in the atmosphere render settings? I noticed you used RGB in the nuke example scene, so I ticked that checkbox on my current sim.
2. I generally use the opacity curves rather than just simple smoke, I just get better detail this way.
3. This is probably just a lighting issue or may be because the background of the smoke sim is also red-ish, like the smoke, but to me it looks like I´m missing shadows in my renderings, the smoke in the nuke example looks denser and just in general more massive than what I get.
4. I still don´t know how to deal with the speed. I want the speed to be high, when it bursts out of the tear, but then it needs to slow down immediately.
I´m not sure why i can´t get this to work, I´ve tried:

A) Keyframing the time scale from 1 to 0.1 over 25 frames.
B) Lowering the tear objects phoenix velocity property to 0.1
C) Lowering the maximum emission. Right now it goes from 0 to 1500 over 1 frame and back to 20 over 25 frames.

Adding the drag force doesn´t seem to do what I want.

Any ideas on how to improve the dynamics?

Ok, after some more testing I´m afraid I´ll have to cheat around the tearing object. I just rendered a small preview and the smoke just goes crazy, looks like very strong turbulence or wind, but there is non included in the sim.
I had a phoenix turbulence object in the scene, but I got rid of it.
So my guess ist that the cloth sim has too much influence on the smoke sim, that the verts move to fast from frame to frame or something like that and the sim goes crazy. I´ll try and make a snapshot of the finished tear and use that as a collision object for the smoke. Might not be 100% accurate this way, but the weird behaviour is most definitely linked to the cloth object.
I could still try and lower the objects velocity in the phoenix properties or increase the step size (its currently at 3), but I guess this is just how I´ll have to deal with it.

Hey,

Sorry to redirect you, but you should check the help site for some of those :slight_smile: Chaos Docs

You should note that the smoke will render denser or thinner depending on the scene scale - it’s quite similar to the fog color of the VRayMtl - we have to add a setting with which you can turn this on and off, because it could happen so that at low scale you can’t make the smoke thick, and at high scale you can’t make it more opaque…

In order to make the smoke pump out quick and the stop quickly, it really sounds like a good idea to use high discharge for a single frame and then animate the time scale. Do you have a video of how it looks?

Cheers!

No problem, manuals are my friend…:wink:

The explanations just don´t go deep enough sometimes, I guess its something you just have to learn from experimenting sometimes.
But mostly I don´t get the scale/time/gravity options.
I do a lot of medical animations with microscopic environments, so real world scale just isn´t an option. I read the according info in the manual, but I´m still confused:

I looked at the nuke example and there you have a scale of 1 Unit=3 meters. The emitter object therefore has a real world radius of around 40meters.

So now I´m working in a scene with a unit scale of 1 unit=1 meter and my emitter object is something like 0.1m in radius.
What happens now, if I change the scene scale? lets say I scale it up to 400 -does the sim now consider my emitter object to be as big as the one in the nuke scene? I think the confusion comes from the way its described in the manual as “You can use this multiplier if you need to adjust your simulation’s behavior separately from the scale of the other objects in the scene.”

And whats the difference in scaling up the gravity multiplier?

And one more question:
How does the new plain force work? Does it work like a wind force in the way, that it just “blows” in the direction of the logos arrow? And is the damping option similar to the wind forces decay?

The problem with simulations is always, that you got more time to ask questions than to actually answer them…

Ah, I sent you to the docs just to check on the rendering questions - the sim part is kinda outdated for the smoke/fire part and is heavily outdated for the liquids - we will publish the new help site together with the release of Phoenix 3.0 soon.

The Scene Scale will make Phoenix think the container is bigger in world units than it actually is, so 400 should equalize the emitter with the nuke scene. The simulation will act accordingly for all scale-dependent parameters - reducing the effect of gravity, but not only.

The plain force adds velocity in the direction of the icon, yes - you can also enable applying the force behind the icon. It has damping in order to balance and counteract the effect of repeatedly adding velocity by the force, so the force and the drag will reach equilibrium at a certain speed. The Max Distance would be the equivalent of the Wind’s decay.

Cheers!

I missed what you posted about the cloth object - it’s very likely that it would cause issues if it’s not a closed geometry - Phoenix generally doesn’t support anything that has no volume, except for the 3ds max Plane just because it’s a standard primitive. If you can shell it somehow, this would do the trick.