realistic beer foam

Hello,
i was following the beer tutorial and i couldn’t find a way to control the foam density.
in the tutorial we see a lot of big bubbles floating on the surface. in real life the foam is very dense with no floating bubbles.
how can i achieve that?
i’ve attached a JPG with the final result of the beer tutorial and a footage of reel beer with foam.
thank you very much in advance


our foam shader produces spherical bubbles and is not able to deform them, like the real big bubbles. i think there is no simple way to achieve the reference image, no matter what software you are using.

thank you for your replay.
i wasn’t talking about the deformation of the bubbles but on the density of the foam head.
i would have upload a picture to better show what i mean but i don’t have permission to upload photos to this forum. can you make this option available for me?

write to the support to get full forum rights, but for now you can use some external free image hosting, there are many of them
the density is controllable by the bubble size parameter and the birth rate. the beer sample (this image is from the old sample scene) uses not too big particle count, because it may become too slow for rendering and simulation. if you want denser foam, you have to increase the birth rate, to decrease the bubble size, and to increase the b2b interaction value. but be careful, the calculation weight increases very rapidly. for example if you decrease the bubble size twice, you will need eight times more bubbles in count to cover the same volume. this means eight timer slower calculations. but it’s not all, perhaps you need to double the b2b interaction strength, that may lead to sixteen times slower calculation.
you can try the nightly builds, where we have some improvements in this direction, mostly targeted ti the b2b interaction speed. with the nightlies you can achieve the same effect with about 5 times lower b2b interaction, that allows bigger density in the same
simulation time.

thank you. i will try that.

here is a link to the image that i was trying to upload;
http://postimg.org/image/e7vooc4jl/

another thing that i thought to try was to export the foam particles as PRT then reload them and mesh them with Frost.
but every time that i try to load the prt max crash

particles preview should be turned on. Dunno why… but it won’t crash. I guess, your prt files 76bytes ?

nope they grow exponentially.
where is the particle preview switch?

yes, the prt issue is about to be fixed.
btw, if you need no big bubbles on the top, you have to make the variation parameter 0, this will make the foam uniform with no big bubbles.

so i managed to export the foam particles as PRT. i’ve unchecked the size option and then i could load the prt using Krakatoa PRT loader without it crashing.
then i meshed those particles with Frost.
the problem is that the PRT include all of the foam particles and i need only those particles that above the water.
is there a way to export only the particles that are about the water?

there is no way to export only the underwater particles, but you can use the boolean operators of max, using the liquid mesh to cutt of the underwater part

only if i simulate the liquid and then using the resimulate to simulate the foam right? otherwise it ill detect the Phoenix object as liquid and foam particles?

phoenix keeps the particles in separate particle groups, and the exporter allows you to select which group to be exported, so i think no special simulation tactic is needed.

but the exporter allow me to export only the foam group

perhaps i understand you wrongly. why you needs to export the liquid particles? in the preview panel there is “show as mesh” option, enable it (otherwise the boolean can’t grab the mesh) , when you have the mesh of the foam, select the simulator as operand B of the boolean.

i tried that, and it works in the viewport.
in the cull options of krakatoa i added the simulator after enabling show mesh and it indeed deleting the particles that intersect with the liquid.
but during render time the liquid mesh disappear and so krakatoa not recognizance the simulator as culling object anymore.

the mesh disappears during rendering? is it disabled for rendering or it’s a kind of undesired behavior?

seems so.
i just tested this:
isolated only the simulator and rendered one frame of the liquid (in show mesh mode), when the render finished the mesh disappeared from viewport until i moved one frame forward.

and if you render animation?

tested now. it’s the same result