

On the bottom of the glas the foam particle just stick? It isnt to bad (but still not there), but i am running into some wired issues and cant figure them out ) If (foami.getVelocity().module() < FVelThreshold) and (FHeight < FHeightThreshold): Change the getY to getX, or getZ as appropiate. # Note: if your vertical axis isn't the Y-axis. # loop through foam particles, if under a velocity value and height converts them back to liquid

If particle.getVelocity().module() > LVelThreshold: Particles = liquid.getParticlesColliding()

# loop through liquid particles, if colliding and over a certain velocity converts them into foam Minimum velocity particle should have to stay as foam particle (Decreasing value = more foam particles staying)įHeightThreshold = 8.0 # Max height of foam particles (Raising value = more foam particles staying) #foam -> liquid : two conditions to be metįVelThreshold = 0.1 # Min velocity of foam particles. LVelThreshold = 4.0 # controls the amount of foam particles forming (raising value = decreasing amount) Liquid2 = scene.get_PB_Emitter("null3") #same parameters as liquid Liquid = scene.get_PB_Emitter("liquid") #set the name of your chosen liquid emitter (liquid type)įoam = scene.get_PB_Emitter("foam") #set the name of your chosen foam emitter (liquid type)
