I am trying to run a rain simulation where the rain drops (particles) dynamically paint the floor based on this tutorial https://www.youtube.com/watch?v=35bbyAJodEQ (for reference).

Setting all that up works but not well with a low framerate and fast rain. The issue is that I have 1 million particles going down through the floor in a small area but only very few end up painting the floor (roughly 3 drops per frame). I am running the simulation at 24fps.

My theory is that the particles are moving too fast. For example, when I step through each frame, and a particle was above the road and then below the road in the next frame, no paint is added. I think paint is only being added when the particle is intersecting the floor on a frame itself. The particles are small so that doesn't happen often.

I have tried enabling collision on the road and also enabling killing of the particles when it they hit the road and it does not help. I would think that if the physics system knows to delete a particle because it can see it is about to hit, then it should register a dynamic paint as well. As I'm writing this I'm thinking it may actually be a bug?

Otherwise my question is if there is a way to enable ray-casting per particle or something like continuous collision detection for dynamic painting to make sure that the floor catches ALL the particles that have gone through it. Or a different solution?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.