Search Unity

Question Need help making water

Discussion in 'General Graphics' started by brenman60, Sep 16, 2021.

  1. brenman60

    brenman60

    Joined:
    Aug 16, 2021
    Posts:
    11
    So I'm fairly new with unity, and would like to know how to make realistic-like water for the 2021 version. I've done many google searches to try and find how to do it correctly, but the results I find are either outdated, or I can't tell what they're doing (such as randomly cutting to when they've completed something without explaining how they did it.). All I ask here is that someone is able to explain how to do it, or send a tutorial video that isn't outdated and explains what they're doing more in-depth.
     
  2. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845
    Is this a still lake where you just want reflection and refraction? A rushing river? A beach scene with crashing waves? The middle of the ocean? A puddle? Rain on a window? An aquarium whose glass can shatter when its shot? An iridescent oil spill? A sewer? A murky swamp? A reef?

    Is your game 2D, 2.5D, or 3D? Do you have things in the water that will need to float or things falling into the water that will splash? Will the camera be going underwater? Will the player be raising and lowering water levels using flood gates? Will characters be wading through it and you want waves? Do you want caustic lighting from the water spilling onto the walls and floor? Is this a mobile game, a switch game, or made for high-end PCs and consoles? How large/important is the water in the scene?

    As you can tell there's a lot to think about and many different techniques depending on your needs. Please post a screenshot of another game that has water similar to what you want.
     
  3. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    What really matters in the water graphics:
    1. The color of the water
    2. The normal map

    Here is a simple water to getting started:






     
  4. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,634
    Water is not just an effect, it's a combination of multiple effects, and there are lots of different ways to implement realistic water because water looks different in different situations.

    Back when I made my own water shader for Unity 4, I couldn't find a good tutorial either, so what I did was- found a really basic tutorial for a simple vertex-displacement wave shader. Then I looked up additional information for each effect that I wanted to add, like reflection and white caps and such.

    Tutorials only ever cover simple and basic things. If you want to do anything complex, you need to break it down in to smaller topics and learn them seperately.