Page 1 of 2

Making foam in RFC4D using the filter daemon

Posted: Mon Nov 19, 2018 8:38 am
by ChristianZ
Hi

over the weekend I have played around with the filter daemon and Dyverso-SPH in RFC4D for making foam when liquid is poured inside a glass. It works well with two fluids and the transition depending on the filters properties. But you have to decide which event should be used for the transfer. I have tested vorticity and collision this time. The collision I have keyframed the filter daemon so that there is not a constant production of foam, but only in the first part of the sim when the liquid is poured inside the glass.
Viewport with 3 camera positions for each time:
https://youtu.be/tWzz9EzDbDU

Re: Making foam in RFC4D using the filter daemon

Posted: Mon Nov 19, 2018 6:06 pm
by ChriFF
looking good!

Re: Making foam in RFC4D using the filter daemon

Posted: Mon Nov 19, 2018 7:36 pm
by ChristianZ
Thanks ChriFF!

I think I will go with the second option, the collision trigger. The vorticity is fine for splashes or for situations like a river going through some rapids. But the collision is more like what happens in reality with the one-time activation of the foam which calms and solidifies when the drink is no longer poured inside the glass.

Re: Making foam in RFC4D using the filter daemon

Posted: Fri Nov 30, 2018 8:12 am
by ghofer
Wow! That's a great simulation. how did you make the foam rise and float on top of the fluid? in my scenes the foam always remains somewhere in the middle of the water, but yours is really going upwards. and with on collision i also get a huge amount of foam particles. in your scene there's foam at the fluid edges.

could you provide some more information how you achieved this result? thanks!!

Re: Making foam in RFC4D using the filter daemon

Posted: Fri Nov 30, 2018 7:29 pm
by ChristianZ
Thanks ghofer!
The separation of foam and water is done by the density difference of the Dyverso SPH-Mode.
Two fluids are used in Cinema4D (corresponds to the domains in the standalone version of RF10).
Here we have fluid1 density=3000, and for the foam fluid2=800

Then you can limit the filtering by animating features of the filter by key framing some of its features like turning it off after some time or, as I have used here, animating the "randomness" parameter from 100% to 0% within the first 100 frames. This causes the filtering to stop with a random effect over time.

Re: Making foam in RFC4D using the filter daemon

Posted: Sat Dec 01, 2018 8:08 am
by ghofer
Thanks for your answer. i'll follow your ideas.

Re: Making foam in RFC4D using the filter daemon

Posted: Mon Dec 03, 2018 9:03 am
by ghofer
Hi ChristianZ. i did what you've suggested, but i don't get even close to your video. i'm on rf10, not rfc4d.does this really make any difference?

in your simulation there's a huge difference to mine. with on collision all particles become foam. because they all collide with the glass at some point in time. at the beginning every particles is filtered to foam but not so in your video. there you have areas which aren't affected and this gives the nice bubbles and foamy edges. i have animated random percent from 100 to 0 but it doesn't look real at all.

don't know what to try here. at least i got a better separation with densities of 600 and 3000. with 600 and 1000 everything was more like oil in water. no real separation. sph seems to work better than pbd.

Re: Making foam in RFC4D using the filter daemon

Posted: Mon Dec 03, 2018 9:46 am
by ghofer
i got better results with filtering against normals instead of on collision. but the bubbles are way too big. i don't want these huge drops because they look totally unrealistic.the result reminds me on certain mushrooms but not on foam:

https://picload.org/view/dcllcogd/rf_mushroom.jpg.html

i'm looking for sparkles like in this phoenix fd video. this looks really good but i couldn't achieve anything close to that. any idea is appreciated.

https://www.youtube.com/watch?v=4GpSWx-DX_U

Re: Making foam in RFC4D using the filter daemon

Posted: Mon Dec 03, 2018 11:40 am
by ChristianZ
Hi ghofer,

your mushroom comparison is hilarious, yes that is not totally expected for foam or bubbles :D

Plugin or standalone makes a difference in the handling of the simulation as in the plugin certain features like the substeps and similar settings are in automatic mode, which does not exist in the standalone. Otherwise, the standalone has more options regarding file types and scripting.

Ok, I will try the replicate this in the standalone. For bubbles there are additional options without filter daemon. I don't have Phoenix, so cannot comment on that. It will take a couple of days as it is a busy time of the year now....

Re: Making foam in RFC4D using the filter daemon

Posted: Mon Dec 03, 2018 12:26 pm
by ghofer
Thank you again. sure. take your time. looking forward to your experiments.