Wow thanks for the great advice Leonard!
just after I sent my mail, I figured out how to switch to a new phase if the particles are inside a null, and then filter that by a random integer. This gives me a nice foam creation point. I then change the mass of the new phase to 0.1 and add a upwards force to particles in that phase. This all works nicely, but I think your solutions will give me better control. I do have empoly, but I think I'll render the beer with that, and the foam as spheres
G
On 2012/12/17 08:37 AM, Leonard Koch wrote:
I found that trying to actually simulate the foam is not feasible outside of small tests. Way too clumsy for production. A good solution is to just decide that certain parts of your normal fluid sim are foam based a few criteria.

Criteria number one was just shooting a bunch of vectors up in a cone from every nth particle (depending on the number of particles in the sim) and checking every few 0.01 SI units whether or not they are close to any other particles.
If I only found a few particles there I turned them into foam.
Then I added a look up for the particles around those nth detector particles using get closest points to fill the rest in. Criteria number two and this is what will really give you a nice controllable foam-crown, is to just check if the particles are in a certain mesh's volume which you can move around, and if so to also turn them into foam.

You can do all of this post caching which makes it quite responsive and allows you to really tweak it right. Afterwards just cache those two different parts of the cloud into separate meshes using polygonizer and you're pretty much set. I also applied a small ice tree to the foam mesh so that it would properly cling onto the liquid mesh.

If you can't afford a recent version of polygonizer, which I think is a must have for any production using liquidsims, you can also use a trick and get it done with the built in polygonizer. To do that, just create 2 additional pointclouds one for the foam and one for the liquid and then clone the cached lagoa sim while deleting all particles that don't belong to either the foam or the liquid. Then you just need to mesh those pointclouds using two separate polygonizers. More recent versions of emPolygonizer definitely give better results with the liquid filaments and other features though.

Hope this helps.


On Mon, Dec 17, 2012 at 6:11 AM, Gerbrand Nel <[email protected] <mailto:[email protected]>> wrote:

    Hey guys
    I need to make a beer pour shot and I'm trying to get the foam
    head to form. My Idea so far is to emit two phases at once, but so
    far I cant seem to figure out how to get the one phase material to
    rise to the top. I've tried to set the mass at emission to be less
    on the one phase, but no luck.
    Has anyone done this type of thing before and would like to give
    me some festive season advice :P
    Thanks guys
    G


No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2012.0.2221 / Virus Database: 2637/5464 - Release Date: 12/16/12


Reply via email to