Creating realistic Beer foam

Show us your Realflow WIPs
creationz
Posts: 2
Joined: Thu Nov 30, 2006 8:04 pm

Creating realistic Beer foam

Postby creationz » Thu Nov 30, 2006 8:13 pm

Hello to all. Did any one had any luck with realistic "BEER FOAM" setting using the "beer foam" script? I can use the script well but the foam sets on the bottom and the liquid on top. Just some settings that will produce good results will be helpful. Any help will be great. You guys are great for creating such a needed forum for people like us. Thank you.


shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

Creating realistic Beer foam

Postby shaun_michael » Thu Nov 30, 2006 8:19 pm

Is the density setting of your fluid greater than the density setting for your foam? The foam needs to be less dense so that it floats.

Shaun

creationz
Posts: 2
Joined: Thu Nov 30, 2006 8:04 pm

Creating realistic Beer foam

Postby creationz » Thu Nov 30, 2006 8:42 pm

Yes, the density is set correctly, but i still not getting the "look" i want. I played with settings but still no luck.

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

Creating realistic Beer foam

Postby shaun_michael » Fri Dec 01, 2006 8:38 am

What sort of look are you after, and exactly how does it differ from what you're getting. This may be down to other settings in your fulids rather than just the density of foam vs fluid. Do you have your emitter settings and a quick description of what you're after?

Shaun

Robb Flynn
Posts: 41
Joined: Thu Dec 21, 2006 1:03 pm

Creating realistic Beer foam

Postby Robb Flynn » Thu Dec 21, 2006 1:31 pm

Hi,

if you want to create realistic beer foam with Rf script, you have to improve the basic script.
Because the basic script just create foam when particle collide an object.
The problem is, there are always some particles colliding with the object faces and so, there always be foam around the beer.

The basic script works like this:

if a beer particle collide an object face, the particle change in foam.

what you need is more like this :

If a beer particle collide an object face, the particle change in foam and if the particle foam is less than a velocity like 1.0 and below a height like 2.0 change it in Beer.
(the value of velocity and height of course depend of your scene size)

you can add a random script on the beer emitter too, if the particles emit with the emitter beer have a velocity higher than 10.0 for example change it in foam.

it's the basic idea to create realistic beer foam behavior.

I already made test and it works well.

Cheers

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

Creating realistic Beer foam

Postby shaun_michael » Thu Dec 21, 2006 5:41 pm

Hey Robb, thanks for that.

I already made test and it works well

Any chance you'd care to share your script? ... go on... it's Christmas after all...

Shaun

User avatar
brandony
Posts: 231
Joined: Sat Oct 21, 2006 7:38 am

Creating realistic Beer foam

Postby brandony » Fri Dec 22, 2006 6:30 am

robb is right.. this is the basic outline of my spray script i wrote for my hallway flooding. i even wrote one which goes back and forth into different emitters.. so the foam changes to liquid and vice versa.
Brandon Young
www.byvfx.com
FX Artist | TD

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

Creating realistic Beer foam

Postby shaun_michael » Fri Dec 22, 2006 7:47 am

Indeed it should. Perhaps, in conjunction with thomas, we can evolve the basic foam script that was one of his turials to include this important feature.

Shaun

bealobo
Posts: 147
Joined: Mon Sep 25, 2006 8:57 am
Contact:

Creating realistic Beer foam

Postby bealobo » Sat Jan 13, 2007 12:23 pm

I'll try to help with this one on Monday.
I have another version that converts the foam back to beer randomly in time, but it does not look good.

By the way, I think the basic beer foam script can look good to make air bubbles inside a puring fluid.
Has anyone try to render this?
It is like meshing all the emitters together and additionally render foam as air particles (cristal).
www.bealobo.com

bealobo
Posts: 147
Joined: Mon Sep 25, 2006 8:57 am
Contact:

Creating realistic Beer foam

Postby bealobo » Mon Jan 15, 2007 3:37 pm

Hi!

I have made a version of the script with Robb Flynn's idea (I wrote that int he heading of the script too, let me know if you prefer a link or similar):

Medium Beer Foam

I haven't tested it very much, but I think the effect looks good.

Also, I think it can be optimized because right now it's importing a functino from a library at every substep, and that's probably not 100% ok for performance.

lease note that it works on axis setup where Y is the vertical axis.
It's easy to change thought:

Just replace this line

FHeight = foami.getPosition().getY()

to match the axis you need


FHeight = foami.getPosition().getX()


FHeight = foami.getPosition().getZ()

Cheers,
www.bealobo.com


Return to “Work in progress”

Who is online

Users browsing this forum: No registered users and 1 guest