hey all, I've decided to release some of my scripts in the coming weeks, and depending upon if people like them I'll release more. They are all free to use, but they may be somewhat complicated to use so I'll do my best to respond to questions here.
the first script I'm releasing is 'fakeUpres'. I wrote this script to fill out grid-based simulation particles (for rendering as clouds for instance). It is a batch/events combination. To use it, run your grid based simulation and make sure you are exporting the particles for your emitters (in export->central). Make a second project to post process your simulation. Create a binary loader and a container emitter. Point your binary loader to your source particles. Go to a frame in the simulation which might be considered your 'hero' frame (the frame where you want the extra particles created). Run the batch script.
source_emitter : the original bin files from your grid based sim
dest_emitter : this is where to store the results of your post process (the container)
perform_upres : if this is false, then only the 'perform kill isolated' option is run
preview result : if true, then the results of the post process for the current frame are stored into your container emitter, so you can see if you like the result
neighbor distance : determines the size of the neighborhood for the 'getNeighbors' call .. this really effects how many particles are added and is sim dependent.. you will get a feel for how big this should be after several tests.
num_neighbor: this is the number of neighbors a particle should have before additional particles are added to it (between it and it's neighbors).. good values are 2 or 1
num tweens: this is the number of additional particles added per 'candidate particle' (candidate particles are determined as particles which have 'num_neighbor' particles in the neighborhood of 'neighbor distance' radius of them). Don't set this too high, a value of 1 or 2 is good .. salt to taste.
perform kill isolated: if this is true, then for each particle which has no neighbors within the distance of 'isolated threshold' of it is not passed onto the container emitter (effectively killing it)
after you run the batch script, run the events script:
load the events script (ctrl->f2, then paste the script) .. save your scene, reset the scene, then activate the events script, disable update in the viewport (alt->D) then press 'play' (NOT SIMULATE !).. let Realflow play through the frame range, disable the events script (this events script runs in the 'onChangeFrame()' event .. so any scrubbing will activate it.. which you don't want. If you've done everything properly.. then the play through should have properly tracked your particles and exported the entire frame range of .bins
I realize this is all a little complicated .. so if you have questions feel free to ask. If you have any suggestions for the script .. or want to contribute please feel free to code up your changes and release any updates etc.
P.S. this script won't work well in all simulation circumstances, and it depends heavily on which frame you choose as your 'hero' frame. It essentially works to stamp multiple particles to each particle, but it looks a lot better in the general case than just using 'multi point' or 'multi-streak' in maya for instance.
good luck !
Share your scripts with other members
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests