beerFoam and multiThreads mesh rendering scripts

Share your scripts with other members
Robb Flynn
Posts: 41
Joined: Thu Dec 21, 2006 1:03 pm

beerFoam and multiThreads mesh rendering scripts

Postby Robb Flynn » Mon Apr 30, 2007 7:16 pm

Hey Guys,

I just post 2 scripts I made on the official realflow scripting site

the first is the beerfoam that I think you alreday know

and a new one called multiThreads mesh batch

by default RF render the mesh with only one thread.
So with this script you can render your mesh with all the capacity of your cpus.
you be able to render with 2, 4, 8 or 16 threads in the same time.

enjoy

Cheers


Robb Flynn


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

beerFoam and multiThreads mesh rendering scripts

Postby shaun_michael » Mon Apr 30, 2007 8:07 pm

Nice work Robb, and thanks for letting us know. Gonna try me some multi-threaded meshing then...

Cheers,
Shaun

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

beerFoam and multiThreads mesh rendering scripts

Postby Robb Flynn » Mon Apr 30, 2007 9:16 pm

Let me know if everything works for you and if the description/installation is clear enough.

thx

Robb Flynn

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

beerFoam and multiThreads mesh rendering scripts

Postby shaun_michael » Tue May 01, 2007 8:57 am

Hi Robb,

I do have a few of questions:-

Should I be putting the batch files into any specific folder? Currently I've put them into the same folder as the script itself. Here's how I've changed the script itself:-

Code: Select all

batch2threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll2.bat"  #change this path but keep the filename
batch4threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll4.bat"   #change this path but keep the filename
batch8threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll8.bat"   #change this path but keep the filename
batch16threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll16.bat"   #change this path but keep the filename
batchOpenScript = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/render_mesh0" #change this path but keep /render_mesh0

Here's how I've changed one batch file, but I'm not 100% clear whether it needs to point anywhere specific:-

Code: Select all

realflownode -script "C:Program FilesNext LimitRealFlow4scriptsBATCHMultithreadsMeshBatchrender_mesh02.rfs"

And here's how I've changed one of the ones you've pointed out needs quotes:-

Code: Select all

start C:"Program Files""Next Limit"RealFlow4scriptsBATCHMultithreadsMeshBatchbuildMesh01.bat
start C:"Program Files""Next Limit"RealFlow4scriptsBATCHMultithreadsMeshBatchbuildMesh02.bat

When editing the batch files should they be pointing to anywhere specific?

When I run the script, the first two scripts are created in the folder I've pointed to, then I receive an error message in the dos window stating that the license could not be found. I'm running the script in two threads win32 xp pro sp2, 2 threads.

Last one, and this should prove amusing for anyone that knows about programing. Some of the paths have forwards slash (/) and some have back slash (). Why is there a difference? Is one simply python format and the other the format for a different language? :)

Thanks for your help.

Shaun

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

beerFoam and multiThreads mesh rendering scripts

Postby Robb Flynn » Tue May 01, 2007 10:59 am

Should I be putting the batch files into any specific folder? Currently I've put them into the same folder as the script itself. Here's how I've changed the script itself:-

batch2threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll2.bat" #change this path but keep the filename
batch4threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll4.bat" #change this path but keep the filename
batch8threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll8.bat" #change this path but keep the filename
batch16threadsPath = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMeshBatch/buildMeshAll16.bat" #change this path but keep the filename
batchOpenScript = "C:/Program Files/Next Limit/RealFlow4/scripts/BATCH/MultithreadsMes

you can put batch files in the folder you want, for instance I put bacth files and script in the same folder.
you are not oblige to put them in the next limit insallation folder.
you can put everything in x:/you_RFscripts if you want.



Here's how I've changed one batch file, but I'm not 100% clear whether it needs to point anywhere specific:-

realflownode -script "C:Program FilesNext LimitRealFlow4scriptsBATCHMultithreadsMeshBatchrender_mesh02.rfs"

you have to write the same path that the fifth variable of the script. (batchOpenScript = "path")
when script is running, at a moment there is a command to open for instance render_mesh02.rfs but if the file doesn't exist it will be created automatticly.
and the script is looking at the fifth variable (batchOpenScript) to see if it exist or not.
when the script has finish to run you can see that some file are created.
So an easy way, is to run the script once to know where are the render_mesh02.rfs
because the file is automatticly created.



And here's how I've changed one of the ones you've pointed out needs quotes:-

start C:"Program Files""Next Limit"RealFlow4scriptsBATCHMultithreadsMeshBatchbuildMesh01.bat
start C:"Program Files""Next Limit"RealFlow4scriptsBATCHMultithreadsMeshBatchb
To not melt my brain with the path I put everything in the same folder

perfect



When I run the script, the first two scripts are created in the folder I've pointed to, then I receive an error message in the dos window stating that the license could not be found. I'm running the script in two threads win32 xp pro sp2, 2 threads.

maybe try to write the bacth like this " realflownode -license -script "path" "
but I don't know if you have a realflownode license on you computer
If you don't have one maybe it's the problem.


Last one, and this should prove amusing for anyone that knows about programing. Some of the paths have forwards slash (/) and some have back slash (). Why is there a difference? Is one simply python format and the other the format for a different language?

I don't really know what's the hell with / and
I'm not an expert in scripting I'm just starting to learn

but I see this in RF help :

Load the scene (.flw).
Arguments
(1) Scene's path including file extension ".flw". Path delimiter "/" should be used instead of "".
Return
True if the scene was loaded successfully, False in the other case.


and for the batch files who are dos command we have to use this one



I hope it can help you.
sorry for my english but I speak french

Cheers

Robb Flynn

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

beerFoam and multiThreads mesh rendering scripts

Postby shaun_michael » Tue May 01, 2007 1:56 pm

Hi Robb,

Thanks for your expansive explaination. I'll give your suggestions a try.

I'm not an expert in scripting I'm just starting to learn

If you're producing scripts like this and you're just starting to learn, I can only imagine what you'll be doing when you're an expert.

Thanks agian,
Shaun

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

beerFoam and multiThreads mesh rendering scripts

Postby Robb Flynn » Tue May 01, 2007 5:51 pm

If you can find what's wrong with the script, can you tell me what was the problem ?

Thx


Robb Flynn

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

beerFoam and multiThreads mesh rendering scripts

Postby shaun_michael » Tue May 01, 2007 6:51 pm

Will do Robb. Although I suspect its something I'm not doing correctly, or haven't setup correctly this end. Haven't had a chance to recheck it yet, but I will do ASAP.

Shaun

Skrinl
Posts: 20
Joined: Fri Jan 12, 2007 3:15 am

beerFoam and multiThreads mesh rendering scripts

Postby Skrinl » Wed May 02, 2007 10:34 am

How would you adjust the beer foam script to create a stout beer like guinness or murphy's?

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

beerFoam and multiThreads mesh rendering scripts

Postby Robb Flynn » Wed May 02, 2007 10:40 am

Skrinl wrote: How would you adjust the beer foam script to create a stout beer like guinness or murphy's?

I'm not sure to understand your question but if you want to change the fluid properties,
you have to play with emitters settings like viscosity, int/ext pressure, ...


Robb Flynn


Return to “User Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest