Foam!?

Hi,

Really simple question for you guys - how to achieve decent foam? (primarily on drinks, beer, champagne, coffee, etc, but also for ocean sim, or larger scale objects)
Right now I need it for a still image, but I’d be glad if someone could give me a hint about simulating foam with the fluid sim.

Thanks in advance,
galingong

The molecular addon seems like your best bet, but you’d have to find a way to deal with the meshing. If making a still, I’d model a solid and make it appear as foam with a shader like this one:



Obviously this needs more work.

Trying one of the volumetric builds might be worthwhile too but it would still have to be comped with a surface render.

Thank you for your help, I think for now this shader will do it, I’m on a deadline so after some tweaking I’ll use this. I’d rather not use volumetrics until it’s in trunk, afaik it’s really slow now. Do you think it’s possible to run a fluid sim with the right settings and shader for foam, and run it with another fluid sim (which is the actual liquid)?

Honestly I don’t know much about Blender’s fluid sims, but it sounds like it would be tricky.

There’s no good way to have two separate fluid sims interacting. Each fluid sim is a single fluid, though it can have multiple sources (e.g. you can have more than one body of water, or more than one body of yogurt, but you can’t mix water and yogurt). Depending on how much foam you really need you might be able to do something with fluid particles on top of the fluid. Ocean foam is generally accomplished with textures; the ocean sim has a few different ways of generating either the textures themselves or data that can be used to mask in better looking foam textures. What exactly is the project? There might be a nicer shortcut if you’re on a deadline.

I’m working on a fairly simple still image for a New Years Eve party, I wanted to create a scene with some glasses and bottles with champagne all over the place. Since it’s a still image, I think I can pull it off with a simple simulation and some modelling, but I’m curious if there’s a solution if I had to create an animation about the whole thing.

For a still I wouldn’t do fluids for anything, unless it’s champagne at the moment of being poured. For everything else a simple plane to mark the top of the beverage and some texturing will be enough, especially if you have a lot of glasses and bottles around. Even if you have some glasses clinking together with champagne splashing inside, some of that could probably be done by sculpting the shape of the splash. You can waste a lot of time on a fluid simulation, so find other cheats unless it’s absolutely necessary.

hope this link will work