Negative Value Densities with MXSFloat -> Density

Hey there,

i am using the Scriptoperator Version to do particleAge -> Density. This is giving me negative values in the rendering (actually seems to be -Infinity)
Any ideas what i might be doing wrong ? I tried catching negative Values to no avail

Regards,
Thorsten

Hi Thorsten,

Do you have a valid LifeSpan (defined by adding a Delete operator) in your particles?
Otherwise, the LifeSpan is by default infinity and Age divided by Infinity might result in strange values.
You could try adding the line

IF i == 1 DO print pCont.particleFloat

right after calculating and storing the value to see what PFlow is writing to the channel of the first particle.
Whatever is calculated in the script will go into the Density, so this is most probably a PFlow Scripting problem and not a Krakatoa bug…

Hey Bobo,

thanks for th quick reply. I tried to add the line as suggested. All values printed seem to be valid. judging by the screenshot it’s only specific particles that cause the problem.
Due to motion blur they show more clearly. I attached a screenie of a simplified flow causing the problem. I tried to ensure that even particles missing collissions get a valid life range by adding “out of range”
delete operators based on frames. Could it be that a “delete all” op after a collision event doesnt imply a valid age/life ?

Regards,
Thorsten

Thanks for the screenshot.

I would say that the particles in the first event are covered, but the spawned ones are not.
The Collision Spawn sends out particles that have no valid LifeSpan because PFlow cannot predict when (and if) they will collide in the future. So you might want to add another Delete operator in the event with the spawned particles. It does not have to be 5 frames life, it could be a lot longer. You could then manipulate the final result in the script operator to get the fade off you want.

That being said, the CURRENT flow you show does NOT apply any data to the spawned particles!!!
The Script and Krakatoa Operators affect only the first batch of parent particles, resulting in the spawned ones having NO valid Density data at all! You have to duplicate the same two operators in the other events, or make them global.

Thanks again Bobo, will try that. My intention was to have the spawned ones resetted and not fading. I’ll test that.

Regards,
Thorsten

Hmmm, I tried a similar setup to yours and could NOT get the bad values.
Any chance you could just attach a test file for us to debug?

I’ve done a stripped down version of the scene that shows the error for me and mailed it to your yahoo mail as i dont have any other. I hope that is okay,
or should i mail it to the frantic support addy ?

Regards,
Thorsten