Page 1 of 1

Eliminating Particles in a post process

Posted: Fri Jun 25, 2010 4:56 pm
by FlorianK
Hi, does anybody know about a quick and easy means to eliminate unwanted particles in a post process?

I tried clipping them out of my renderings using RFRK2/ Object clipping, but there seems to be an issue (bug report already sent). Is there anything else (apart from scripting, I am way too lazy to write scripts on Friday evenings) I can do to kill those guys?

Something like a "Post Process kVolume" was nice to have, you couid add a kVolume to the scene and eleminating the unwanted particles out of the cache without having to resimulate the whole scene.

Re: Eliminating Particles in a post process

Posted: Sun Jun 27, 2010 3:14 am
by Jorge Medina
Hi!
Have you tried to load the particles with a BinLoader and apply a KVolume?
I am not sure at all, but I think this could work.
Cheers.

Re: Eliminating Particles in a post process

Posted: Tue Jun 29, 2010 3:39 pm
by FlorianK
Unfortunately, this doen not work.

It was really very handy to have a tool that will be able to eliminate particles in a post process, without having to re- simulate for some 15 hours just because there are some blotchy and strange behaving partciles that cannot be removed in compositing. Unfortunately, object cliping in RFRK2 doesn't seem to be working, yet.

Re: Eliminating Particles in a post process

Posted: Tue Jun 29, 2010 4:34 pm
by Jorge Medina
Which particles do you want to eliminate?

Re: Eliminating Particles in a post process

Posted: Wed Jun 30, 2010 12:46 am
by BrianLooney
A brush for removing particles would be Cooool.

Re: Eliminating Particles in a post process

Posted: Wed Jun 30, 2010 12:50 am
by Jorge Medina
Maybe you could use the Filter daemon.

Re: Eliminating Particles in a post process

Posted: Thu Jul 01, 2010 8:25 am
by philjackson
I had this exact problem a couple of days ago, a bunch of particles I wanted to delete from a cache... I ended up writing script that copies all the particles to a new node - a kill_volume then works on that.
Jorge Medina wrote:Maybe you could use the Filter daemon.
I didnt even think of this but I think its the way to go. Im doing tests now and it nearly works.. The filter daemon basically transfers particles to another node based on some arbitrary condition - so I set the condition to speed greater than -1. I also set "Overide Target(true)" to yes. So the filter daemon copies everything accross every frame and the kill_volume works on the particles that are copied accross. The only problem is the new cache appears to be a frame behind for me.


Heres the event script that works perfectly though, replace "Binary_Loader01" and "Container01" with your nodes-

Code: Select all

#--------------------------------------------------
# Function: onSimulationBegin
#--------------------------------------------------

def onSimulationBegin():
	pass




#--------------------------------------------------
# Function: onSimulationStep 
#--------------------------------------------------

def onSimulationStep():
	pass




#--------------------------------------------------
# Function: onSimulationFrame 
#--------------------------------------------------

def onSimulationFrame():

	em = scene.getEmitter("Binary_Loader01")
	clipEm = scene.getEmitter("Container01")

	particle = em.getFirstParticle()
	clipParticle = clipEm.getFirstParticle()

	#delete old particles in the container
	clipEm.removeAllParticles()

	#update container from cache
	while particle:
		nextparticle = particle.getNextParticle()

		clipEm.addParticle(particle.getPosition(), particle.getVelocity())

		particle = nextparticle



#--------------------------------------------------
# Function: onSimulationEnd 
#--------------------------------------------------

def onSimulationEnd():
	pass




#--------------------------------------------------
# Function: onChangeToFrame 
#--------------------------------------------------

def onChangeToFrame():
	pass