Theorycraft/Challenge - Rain/Water on leaves.

I had this idea today, I’ve never seen anyone animate realtime rain pouring off leaves. All along with the leaves/trees motion. The kinda scene you could get real close to and it would just be baffling to see it happen in a game/realtime environment.

Personally I have no clue what so ever as I just started a few days ago with the engine (altho I’ve modded a few games here and there during my never ending path to growing up).

But yeah I’m guessing we can’t do collisions to geometry. Any ideas?

It would best be done within the leaf Material, and it’s totally doable. We had something like that back in our project in UDK but I haven’t gotten around to making it again.

This would be an awesome thing to have… (but currently beyond my technical ken)

Aah, Sitrec is probably on the money here. The easiest way would be to make it so when it rains, you have a separate set of maps for making the leaves wet/collect water and then a separate particle system.

Sounds difficult to sync it all up, but ohh so cool it would be!

  1. Store custom vertex weight animation in a shader.
  2. Create custom rain volume with low drop count.
  3. Track particle location and store collisions.
  4. Create custom dynamic decal with stored animation for running rain drops over a surface.
  5. On the event of a raindrop collision, kill the particle, use velocity to track direction, create local (world mask), and spawn dynamic decal.
  6. Make sure the custom volume blends into your high definition rain volumes which surround the tree but have no collision properties.

End Result - Rain falls and hits leaf, leaf sinks due to weight of rain (causes the leaf to sway in a down direction). At the same time of the collision, a small splash occurs and the rest of the water runs down the leaf’s body like a raindrop on a window, or other “slick” surface.

Of course, this is a bit harder to implement than just “saying how to do it”. But it is possible. Although, you would need to make sure it only happened when right next to it (for performance reasons).

-Jeremy-