Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Create a standard particle emitter of your choice ("Square", "Circle", "Triangle", "Sphere", "Cylinder", etc.) as the particle source.
  • Add a "Container" node to store the tracer particles.
  • Important: Use exactly the same "Resolution" for both emitters.
  • Set the emitter's "Type" to "Dumb".
  • Decrease "MAX substeps" to 20 under → Simulation options > General.
  • For better results add a "Noise Field" daemon and set its "Strength" to values around 3.
  • Display the "Container" node's particles as spheres: Container01 > Node Params > Display type > Sphere, and change "Size" to 0.015.

 

Code Block
languagepy
# Stop adding new particles after particleLimit
# Get the standard particle emitter and a container - both must have the same "Resolution"
particleLimit  = 100000
sourceEmitter  = scene.get_PB_Emitter("Sphere01") # Change the name to the actual emitter's name, e.g. "Circle01" or "Bitmap01".
tracerEmitter  = scene.get_PB_Emitter("Container01")
nullVelocity   = Vector.new(0,0,0)

...



# Get the emitters' particles
sourceParticles = sourceEmitter.getParticles()
tracerParticles = tracerEmitter.getParticles()

# Check if the limit has been reached. If not, continue... 
if (len(tracerParticles) <= particleLimit):
 
	# Go through the source particles and a new particle at the current position, freeze the new particle
	for particle in sourceParticles:
		newParticle = tracerEmitter.addParticle(particle.getPosition(), particle.getVelocity())
		newParticle.freeze()

...



# Stop adding new particles by deleting the sources, simulation goes on though 
else:
	sourceEmitter.removeAllParticles()