Search Unity

[WIP] Rain System - Designed for moving objects

Discussion in 'Works In Progress - Archive' started by eskovas, Feb 12, 2014.

  1. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello everyone,

    I started to make this rain system because i believe it's something that almost every single 3d game needs.

    This systems main core is to simulate rain in an area around an object and if the object moves, then the rain will follow the object corretly.

    Think of this tool like this:
    It's raining everywhere in the world but only the rain inside a radius around the player will be rendered.

    The easiest way to show this is to see the following video:


    You can see the rain stays in the correct place even if the object is moving fast.
    there are some bugs in the video. Not everything is working properly yet, but it's a very nice start.

    Here are some images:
    $Rain1.jpg
    $Rain3.jpg

    If you have any questions please ask, and tell me if this is something you are interested in.

    If you also have some suggestions, then share with me and i'll see if i can implement them.


    Thanks

    Edit 1 :

    I just made some optimizations and fixed the "floating" rain problem, the scene now renders at around 600FPS and the performance impact is 1.33ms.
    I believe i can improve the performance alot and add many more features.
     
    Last edited: Feb 12, 2014
    Alverik likes this.
  2. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello there,

    Making a new post to explain better what this system does:
    The player is moving at the same velocity in every situation.

    Normal Particle System in Global Space

    While using a normal particle system in global space, we have the problem that while we move, new particles are being instantiated in a new position and if we move fast, then we will never see those particles (common problem with using particles as rain/snow)
    Here's an example:
    $RainSystem_2.jpg

    Normal Particle System in Local Space

    While using a normal particle system in local space, we no longer have the problem of not seeing the particles, but the same particles will continue to move in the same place relative to the object ( not realistic ) and if the object moves from the open area to a closed area, then the particles will still move with it until they hit the floor.
    Example:
    $RainSystem_3.jpg

    New Rain System designed for fast moving objects

    Contrary to both solutions above, this rain system will simulate rain correctly, even at high speeds (cars, planes, etc).
    The rain will appear correctly even if the player moves, staying in the same place in global space while not having problems when the player enters a structure.
    Example:
    $RainSystem_1.jpg

    I hope i explained this better.
    Tell me what you think :)
     
    Alverik likes this.
  3. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello again!

    I made many improvements and made a more practical example video with a car.

    Think of this system like this:
    It's raining everywhere in the world but only the rain inside a radius around the player will be rendered.



    Still lots to do,
    Do you have any suggestions?
     
    Last edited: Feb 12, 2014
    Alverik likes this.
  4. 3

    3

    Joined:
    Sep 16, 2012
    Posts:
    387
    Looks fantastic, any idea about the price range? I could see myself using this if it is within my budget, You guys should put more (like the distractibility system you made, or anything else) stuff on the the asset store.

    By the way, I'm a really huge fan of your upcoming No Heroes FPS, I look forward to the new gameplay videos every week.Actually inspired me to make my own Mo-capped Third Person Shooter. I realized it isn't impossible, even for just one guy, to make a AAA quality game. I really wan't an Alpha version of it, whenever the greenlit version gets released.
     
  5. e_Glyde

    e_Glyde

    Joined:
    Apr 20, 2013
    Posts:
    42
    It looks amazing, but there are some things to address.
    1:The lack of rain drop effects
    2:It looks repeated
    3:When moving at high speeds it looks like it is in one spot.
    There are more things like refraction of the rain drops and maybe effects on the camera, but not that important. Otherwise this looks amazing.
     
  6. juliobds

    juliobds

    Joined:
    Dec 27, 2011
    Posts:
    25
    I'm definitely interested in this. Let us know how you intend to distribute the package please.
     
  7. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    @3
    Thanks,
    I haven't decided a price yet, but will be relatively cheap ( something like 10$ - 15$ ).

    @EpicLilg
    1: Rain drops will be also added, this is just the beginning,
    2: I will also address that,
    3: I'm having a problem that particles are not moving continually, because of that if you move too fast, then the particles will seem weird. I'll also fix that.
    I'm going to add many things to try to make it as high quality as i possibly can.

    @juliobds
    Thanks. I will release this in the asset store.
     
  8. MSC-FPS

    MSC-FPS

    Joined:
    Dec 1, 2012
    Posts:
    3
    This is really cool, good job man :) I was wondering, why are you making the rain on the back of the charcter as well as we won't see it ? Good job anyway ! Looking forward to seeing this completely done :)
     
  9. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    It looks good!
     
  10. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Here's a big update for this tool:

    Added:
    - Raindrop particles,
    - Tunnel effect depending on speed,
    - Change number of particles at run-time,
    - Turbulence curve and amount value,
    - More random trajectory for falling particles,
    - Improved performance,
    - Average 2 - 2.5 ms

    Here's a screenshot in motion:

    $rain_update.jpg

    What do you think?
    Interested? Remember, this works at literally ANY speed !

    EDIT:

    Here's a screenshot using Unity's plane scene:

    $plane.jpg

    Note that i haven't made the particles point their faces towards the camera, so there are about 1/3 - 1/2 of the particles that are not being seen.

    EDIT 2:
    Managed to improve to an average of 1.70ms - 1.90ms. Still can improve the performance alot.
     
    Last edited: Feb 14, 2014
  11. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    New video preview of the Rain System in action:



    Tell me what you think :)
     
  12. MSC-FPS

    MSC-FPS

    Joined:
    Dec 1, 2012
    Posts:
    3
    That's some good job you've done here, congrats :) I think the water splashing the floor would need some work though, it's a tad slow :) Keep it up, looking forward to seeing it finished !
     
  13. e_Glyde

    e_Glyde

    Joined:
    Apr 20, 2013
    Posts:
    42
    This is great. The rain facing the camera is good as you can see all the rain. Also can you alter the radius of the rain being rendered?
     
  14. RagingJacob

    RagingJacob

    Joined:
    Jun 19, 2013
    Posts:
    72
    Oh wow, that's a pretty nifty rain system you got there, seems perfect for handheld devices.
    Looking forward to the release ! :D
     
  15. Katalyst

    Katalyst

    Joined:
    Nov 19, 2012
    Posts:
    16
    This is really slick. I can see a lot of uses for something like this for adding that missing component of realism to local rain systems. I myself am working on a top-down shooter this would be brilliant for as the player moves among different covered areas quite frequently. Question though: Does the rains behavior work just as well when Time.timeScale has been modified to a low number to simulate slo-motion?
     
  16. RagingJacob

    RagingJacob

    Joined:
    Jun 19, 2013
    Posts:
    72
    So still planning on selling this piece of work ? :D
    Seems perfect for mobile too actually O_O
     
  17. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Did you get anywhere on this? I'm intrigued.
     
  18. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,609
    Fantastic!
     
  19. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    I put this project on hold sometime ago, along with the update of the Physics to Animation Tool, until i get my game to a functional and stable state. I will return to this when possible.
    Thanks for being interested and sorry about the delay.
     
    RagingJacob likes this.
  20. Albarnie

    Albarnie

    Joined:
    Oct 24, 2015
    Posts:
    18
    Awesome! i had an idea, set the speed of the rain to the speed of the player, so you could do slow motion effects, set the movement speed and fall speed to 0.1 and also the rain speed to 0.1, therefore giving a slow motion effect.

    Keep up the good work!
     
  21. rpayne28

    rpayne28

    Joined:
    Feb 15, 2014
    Posts:
    1
    This is exactly what I’m looking for right now, albeit with a snow effect instead of rain. Any chance of an asset store release, or pre-release wip version?
     
  22. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Unfortunately i stopped working on this.
    I still think this could be a pretty awesome asset, but i don't guarantee that i will be returning back to it :(