Foam tutorial... step by step for someone new to RF4

Discussion about fluid simulation in Realflow 4
bealobo
Posts: 147
Joined: Mon Sep 25, 2006 8:57 am
Contact:

Foam tutorial... step by step for someone new to RF4

Postby bealobo » Fri Mar 16, 2007 10:08 am

Thanks!
I hope everything's clearer now.

http://www.nextlimit.com/nlscript/ranking_scripts.php?id=51

I have included some instructions based on Shaun's. So I posted not the direct link to the script but rather the link to the site.
I think's better.
www.bealobo.com


User avatar
katisss
Posts: 344
Joined: Fri Sep 08, 2006 9:22 pm
Contact:

Foam tutorial... step by step for someone new to RF4

Postby katisss » Tue Apr 10, 2007 7:04 am

i ve been reading to this thread and still cant make my foam script working.
I also tried with the GUI script but no success.
Would be very cool id somebody can take the time to look at my little tests here.
http://www.lo-motion.de

User avatar
tsn
Posts: 872
Joined: Fri Oct 27, 2006 10:36 am

Foam tutorial... step by step for someone new to RF4

Postby tsn » Tue Apr 10, 2007 7:56 am

@katiss:

There´s no script attached to your scene, so there´s no possibility to execute or test it. The foam script (without GUI) has to be run as an event script (Layout > Event Scripts or F11).

User avatar
katisss
Posts: 344
Joined: Fri Sep 08, 2006 9:22 pm
Contact:

Foam tutorial... step by step for someone new to RF4

Postby katisss » Tue Apr 10, 2007 8:01 am

hm, in the messages it said it did run.
Maybe i did someting wrong.
How would i attach the scripts permanetly?
I loaded them with Scripts > add to the scene but that wont do?
http://www.lo-motion.de

User avatar
tsn
Posts: 872
Joined: Fri Oct 27, 2006 10:36 am

Foam tutorial... step by step for someone new to RF4

Postby tsn » Tue Apr 10, 2007 8:49 am

I´m just opening the appropriate scripting window (batch, events etc.) and copy and paste the script. Next I´m saving the complete scene and then the script should be stuck with the .flw file. You could also attach your .rfs to the zip as a separate file - I´ll load it into the scene manually.

User avatar
katisss
Posts: 344
Joined: Fri Sep 08, 2006 9:22 pm
Contact:

Foam tutorial... step by step for someone new to RF4

Postby katisss » Tue Apr 10, 2007 8:56 am

So i should keep the script in the project directory? Or it doesnt matter?
I have a global script directory now.
http://www.lo-motion.de

User avatar
tsn
Posts: 872
Joined: Fri Oct 27, 2006 10:36 am

Foam tutorial... step by step for someone new to RF4

Postby tsn » Tue Apr 10, 2007 12:15 pm

Well, having the scripts saved in a global direcotry is good for reusing them and this is mainly for batch scripts. If you want to attach them to a certain file, just copy and paste them into the scripting window and save your scene. Then you can be assured, that they will come the the .flw file.

User avatar
katisss
Posts: 344
Joined: Fri Sep 08, 2006 9:22 pm
Contact:

Foam tutorial... step by step for someone new to RF4

Postby katisss » Tue Apr 10, 2007 6:18 pm

I tried and now i get Script syntax error at line number 38
particles = liquid.getParticlesColliding()
in the medium beer foam script when simulating.
http://www.lo-motion.de

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

Foam tutorial... step by step for someone new to RF4

Postby shaun_michael » Tue Apr 10, 2007 7:59 pm

Hi katisss,

I downloaded your scene but there was no script with it. So I downloaded Bealobo's updated version from further up the thread and changed the LVelThreshold to 0.1 (I also made sure the script was activated), and also changed the density of Circle03 ro match Circle01 (2000) - the two liquid emitters.

Secondly, drop the FVelThreshold down to 0.1 also. This is the velocity below which foam particles must fall to become liquid2 particles - ie Circle03 emitter particles.

You should see foam particles appearing upon collision with your object if you leave circle02 selected during the sim (in fact, change their colour in the display panel to a light red and darker red so that you can distinguish them from the other two liquid particle masses).

The LVelThreshold (or Liquid Velocity Threshold) is the velocity at which particles must be above at collision in order to change from liquid to foam - ie to circle02 particles. So if you keep this nice and low, you should get some results as the velocity after collision is invariably above this.

Give these values a go, leave the FHeightThreshold at 1.0 and you should get foam particles and secondary liquid particles and this should give you the feedback to help get a handle on what's going on easier :)

Hope that helps.

Shaun

ps - for those of you who read this before I edited it, I was talking nonsense! Please re-read.

User avatar
katisss
Posts: 344
Joined: Fri Sep 08, 2006 9:22 pm
Contact:

Foam tutorial... step by step for someone new to RF4

Postby katisss » Tue Apr 10, 2007 8:33 pm

thank you so much.
I put the simple test scene for anyone in trouble. I really hope i find time to get into using scripts more now.
http://www.lo-motion.de


Return to “RF4: Fluid simulation”

Who is online

Users browsing this forum: No registered users and 1 guest