Search Unity

Ultra-Realistic Rain

Discussion in 'General Graphics' started by Studio_Akiba, Apr 29, 2015.

  1. Studio_Akiba

    Studio_Akiba

    Joined:
    Mar 3, 2014
    Posts:
    1,426
    I have been looking into realistic rain generation recently for a few of my smaller projects and I have come to the conclusion that this is no easy task, even in other game engines.
    I am looking for an effect (groups of effects) that are listed below, these are most noticeable in "Water Drop 2" by Sébastien Lagarde, this is the rain/weather effect system found in Remember Me.



    List of required features:
    • Realistic rain particle
    • camera rain splash effect
    • floor splash
    • shiny "wet" floor (preferably based on Normals or Heightmaps for accurate shine)

    My main question is:

    Is there anything remotely like this available, is it achievable easily without purchasing anything and would anyone be interested in working with me on something like this if there is nothing?
     
  2. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    Hello!
    http://www.gdcvault.com/play/1019260/The-Art-and-Rendering-of
    They explain how they did the wet surfaces.
    However in our game Forced 2: The Rush we use dynamic wetness. Sure our game is focused on NOT being realistic, but we still use a normal BRDF (more or less unity's standard shader).
    And I can tell you the code to make the surfaces wet before doing any lighting, (in our case I do it before I send it to g-buffer), is quite easy!
    It's built up of:
    Calc wetness based on material, the more metallic the less wet, the more glossy already the less wet. (The gloss = not wet is not always nice, and/or needs a threshold!)
    Then wetness simply increases gloss, and darkens the albedo.
    That's it!
    Now ofc this could be made to depend on normals angle ect, but the base is that simple! Some engine(s?) actually use porosity maps, or allow the use of them, but for us it seemed overkill, so I simply used multicompiles to exclude some objects from getting wet.

    Now the floor splases are most likely simple pre-made particle systems, nothing complex there from what i can tell.
    Possible even as simple as 1-2 sprites per system, 1 billboard and 1 flat on the ground. (I doubt they'd even need spritesheets, just scaling, as they are very fast).
    Ofc some randomization might be needed there.

    Then to the camera rain spash effect, I'm assuming your referring to the part where the player looks up, and gets these "shapes" slightly faded in on the camera? That to me looks like an overlay blended in after all rendering was done. It's possible to have some thresholds there to not start some areas unless you look up for a while, but in general should also be very simple!

    The "realistic" rain is actually far from the best rain I have seen! I think it was https://www.youtube.com/watch?t=51&v=D4TZdt5DuuI . But I can't find the presentation.
    But generally you have 2 problems to get really good rain.
    1: You need a LOT of particles!
    2: They look ALOT better if lit! (Especially at night by nearby point light sources.)

    I sadly don't have any really good suggestion for this, except start by using a single particle system, with stretched out billboards, and making it move along with the player, to reduce the amount of particles that constantly need to be calculated.
     
    theANMATOR2b likes this.
  3. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    Just an idea, I'm not sure if its relevant or not in your situation, but I thought I'd share non the less...

    You could have the particles spawn a mark(decal, or plane or whatever you want to call it) at the location where they hit the ground. This new plane should have a material that is transparent, but reflective or a high gloss, and has an animated bump map (similar to that of a drop hitting water surface). At heavy rain the surface is actually covered almost completely with a thin layer of water, so the visual effect is not that different than rain drops over a pond.

    Anyway, that's how I've solved it before in composite... never in realtime though.
    edit: or actually, how i solved it was using this pass to displace the reflection pass on the ground.

    Can also be nice to have an animated bump map on all surfaces of water dripping down... but that needs a lot of attention to separate UV coordinates.