Advanced Multithreded Mesh Build

Share your scripts with other members
bazuka
Posts: 69
Joined: Mon Jun 18, 2007 1:55 pm

Advanced Multithreded Mesh Build

Postby bazuka » Sun Aug 02, 2009 11:59 pm

Hi People, me again :)

This is a new script inspired by with Luke Olson multiThreadedMeshProcess script, but if you ask me script is too complicated to work with ;) so i made something easier.

http://www.nextlimit.com/nlscript/news_scripts.php?id=137

History:

- Support for windows x86 & x64 OS
- Range option
- 2, 4, 8, 16 Cpu cores

How to:

1. Run Rf4 and load the scene where you already have cached/calculated particles
2. Add Mesh node, and tweak it as you like
3. Save scene
4. Load the script from Batch Script window
5. Run the script

by my calculations with this script speed increases meshing about 4x

Note:
Before you run the script make sure you register the realflownode
by typing in realflow dir cmd line realflownode.exe -license. Then chose the license file and you are ready to go ;)

Let me know if u like it...


lukeiamyourfather
Posts: 2880
Joined: Mon Oct 15, 2007 4:09 pm
Contact:

Advanced Multithreded Mesh Build

Postby lukeiamyourfather » Mon Aug 03, 2009 12:44 am

This script is definitely easier to work with! Though its less flexible and in many scenes won't improve performance that much since each instance of RealFlow does a set frame range instead of a queue system. So one "thread" or instance could finish its set of frames very quickly and another might take 10 times as long so you end up waiting on whatever set takes the longest. A queue balances the work more evenly and performs better in scenes where the mesh complexity isn't consistent throughout the frame range (which is pretty common).

The script you've got is user friendly but there's a reason why I made the meshing script the way I did, performance and flexibility. Unfortunately I had to write it outside of RealFlow since Python as implemented in RealFlow doesn't have the threading module making a queue impossible. Thanks for sharing the script and looking forward to what you create next. Cheers!

bazuka
Posts: 69
Joined: Mon Jun 18, 2007 1:55 pm

Advanced Multithreded Mesh Build

Postby bazuka » Mon Aug 03, 2009 8:35 am

Hi Luke ;)

i was thinking about that 1 thread and i wasnt sure what to set, so i left it as is :)

Like u said and we all know, meshing is not multithreded thats why i didnt know what to do, maybe some advice?

do u think that if i remove flag for 1 thread could be faster in some cases?

cheers

btw

i just made a small test, i remember that for meshing the scene i had took me about 10h for 200fps, and now with this script took me about 1h15min ;)

Cpu: Q6600
Mem: 4gb (but x86 OS)

lynettekong
Posts: 27
Joined: Tue Feb 27, 2007 2:44 am

Advanced Multithreded Mesh Build

Postby lynettekong » Mon Aug 24, 2009 4:30 am

Hi Bazuka,

I'm new in RF scripting. Please advise

I was trying the "Advanced Multithreded Mesh Build" script, and this error pops up:
"[Errno 267] The directory name is invalid" at line number 53

And I follow your instruction to run realflownode.exe -license before the script. But when I select my RF license *.dat, an error pops up saying "invalide license". My question is, is license for realflownode same as our RF license?

Thanks
http://www.mfx.st

lukeiamyourfather
Posts: 2880
Joined: Mon Oct 15, 2007 4:09 pm
Contact:

Advanced Multithreded Mesh Build

Postby lukeiamyourfather » Mon Aug 24, 2009 4:42 am

lynettekong wrote: Hi Bazuka,

I'm new in RF scripting. Please advise

I was trying the "Advanced Multithreded Mesh Build" script, and this error pops up:
"[Errno 267] The directory name is invalid" at line number 53

And I follow your instruction to run realflownode.exe -license before the script. But when I select my RF license *.dat, an error pops up saying "invalide license". My question is, is license for realflownode same as our RF license?

Thanks

License for RealFlow is different from command line license. If you want to run command line you can always use realflow -nogui instead of realflownode. Cheers!

deumilcat
Posts: 10
Joined: Tue Oct 14, 2014 7:42 am

Re: Advanced Multithreded Mesh Build

Postby deumilcat » Tue Oct 28, 2014 7:31 am

you may as well send several cmd line meshing processes at the same time.
Each cmdline processing a part of the timeline

Just change the timeline range in the GUI before each cmdline launch
(each cmd will run on what was setup at the moment of the launch , since the cmd doesnt read the GUI parameters anymore once it is running)

this way, despite the meshing not being multithreaded, the multiple simultaneous cmdline meshing processes will put most of your cpus to full use)

indeed there s no need for the meshing to be done in any "chronological order" because each mesh .bin file is written independently , by processing of particle file that are also independant (one by frame)

All in all your mesh .bin suite will be written with perfect coherence

.. Thus you ll end up with your entire timeline being meshed in the lesser time possible with your hardware

fkfx
Posts: 309
Joined: Wed Apr 11, 2012 11:11 am
Location: Cologne, Germany
Contact:

Re: Advanced Multithreded Mesh Build

Postby fkfx » Tue Oct 28, 2014 7:36 pm

Have you ssen the thread's date? The later meshers in Realflow are multithreaded, apart from the legacy one.


Return to “User Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest