As I ran my simulation last night I wanted all the statistics nicely formated for me. What I found was discouraging. The "preview" directory had a bunch of images in it which looks like a RF4 version of a playblast. From these images I could get things like particle count and simulation time.
What I am curious is if there exists a script out there that will spit out all the statistics on a per frame basis to a log file. Currently my log.txt file just has lame messages like "creating and saving meshs". Which are basically useless.
Can anyone find such a script? or make one?
I initially thought I would just write a sed or awk script to parse the information from log files that I needed.
Perhaps RF4 could write that stuff to the log files.
re: Sure
Hi Dan,
You can pick up a script I wrote here.
As of now it only exports some data off the emitters. You can go crazy on the log, but I kept it simple. Oh and it creates a dir names ssLog in your realflow project directory.
Hope this helps
Cheers
Excellent but...
Thanks Sheldon,
However, I'm looking for a excell type format and time stats as well.
So I'll take your script and take out most of the "\n" and extraneous text and just have things like
Particles, Resolution, Max Particles, SimTime
10000, 10, 300000, 11:10:43
12000, 10, 300000, 10:05:63
and so on an so forth.
Then I can just import this into Excel and sort by any column I want to find min's and max's immediately. Knowing those stats will help analyze and customize /tweak simulations.
And surley there is faster way to get the number of particles than to do a strlen count.
and now that I think about it.
I'd like these types of stats for Maya renders as well. And since it uses python now perhaps your script will get us started.
Anyone up for that challenge?
great!
It is good to hear you got it working. Apparently this script doesn't work on OsX, Victor tried it out and it didn't for him on OsX. I think it is the os class and it is a different way of calling directory creation cmds.
I use maya 7.0 because of MTOR. Mel however you can write stuff to file. What kind of stats are you looking on the maya side anyways?
edit:
btw yes, intead of doing the str(len()) stuff use this line instead:
emData += "Emitted particles " + str(emitter.getParameter("Emitted particles") ) + "\n"I was testing to see how you can print numbers and forgot to revert to that line.
Thanks
Thanks for the script Sheldon. It worked for me. I noticed that it didn't work on Victor's OsX. I was wondering if you have tried the os.path.join() function. This function interprets its arguments as a series of dictionary or filenames, which are joined in a single string understandable by the underlying operating system. for example: instead of
os.mkdir( rootPath + "/" + dirName + "/" )
you could do something like:
os.mkdir(os.path.join('rootPath', 'dirName'))
Disk Space
I didn't say I got it working, I'm just happy you wrote it and posted it.
What I'd also like is a script that spits out how much disk space is being used.
Essentially I want to have a statistic spreadsheet at the end of this class that says approximately how much disk space each particle will cost me and how much time it will cost me. I know that the number of forces and rigid bodies make a difference but I'm just curious about the particles right now.
For instance with my sim running at home right now I've got about 400k particles and each mesh and particle file are about 5 megs each and take about 35 minutes per frame.
I'm curious as to what other students are getting, so I can point blame at my slow machine, some other technical issue (slow disk drive, not enough ram, etc.).
I'd also like this type of stat out of maya. Disk space, Render Time, Particle #, Mem usage.
I guess I'm interested to know because I'm dying to get faster sims and renders.
looks good sheldon...
looks good sheldon...