Collision Based Emitter Swap


Scripting in RealFlow 4 makes many things possible. I see a lot of users looking for a way to change particle behavior based on collision with an object in the scene. This can be done using a event script to move particles from one emitter to another based on collisions. Exclusive links can be setup on the emitters to control the behavior of each fluid. One emitter will be the before collision and one emitter will be after the collision.

When a particle collides with the object its velocity and position are stored, the particle gets removed, and a new particle is born in the other emitter in the same place and velocity as the old particle. See the scene file and script download for an example. Note the speed of zero on the second emitter.

transferParticlesCollisionScript.zip

, , , ,

  1. #1 by steve on February 12, 2010 - 1:43 am

    Hey Luke great script!

    I have noticed that the particles emitted and the particles birthed of collison are not the same resolution. Is this because of the number of faces have to be higher/lower? Just out of curiosity. Im still learning python, and trying to learn for your scripts.

    Thanks very much

(will not be published)