Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Some questions about the water system, re current and wind

Discussion in 'High Definition Render Pipeline' started by Kraken29, Nov 27, 2023.

  1. Kraken29

    Kraken29

    Joined:
    Nov 27, 2023
    Posts:
    5
    Sorry for a longish post...I have been playing with the water system, and it's pretty cool. I do need to be able to do a few things that it may not support, so I'm hoping someone can suggest a workaround. I'll be using the ocean setting.

    1 - I need to change the wind direction and velocity in small sections of the playing field. If I have an area with say a 2 mile radius, I need to create areas that are perhaps 0.25 mile radius with a different wind velocity and direction, and move these along the larger area. Similarly, I need to make one side have a slightly higher wind speed than the other. Of course the ripples need to adjust accordingly. This is needed to simulate wind shadows from nearby objects.

    2 - From videos it seems the current can not change in different areas. This is something I need to do as well. In this case it's less important to change the direction, but in real life, current runs more slowly in more shallow water and along the edges of a river. Also, sometimes two rivers dump into the same bay and cause "tide lines."

    I'm very new to all this, and would greatly appreciate suggestions. Thanks!
     
  2. Kraken29

    Kraken29

    Joined:
    Nov 27, 2023
    Posts:
    5
    Oh, I almost forgot! If I have a fixed object in a river, it will generate waves behind it as current passes it, and also some bubbles in front of it. How can I do that? Thanks again.
     
  3. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    751
    Hey, what you are trying to do is already pretty complex in terms of water rendering.

    So, what you absolutely can't do right now in the water system is have different current speeds on the same water surface. The speed is constant across all the water surface, that's a limitation we have right now because currently we don't have a simple way to avoid stretching / contraction if we allow the system to do that.

    However, what you can do, is have an abritrary distant / local wind and then mask the different frequency bands using the water mask. It can either be done with a static texture or a custom render texture dynamically (if your winds occluders move for example). Same for currents you can also have a dynamic texture that updates in real time based on what's happening to your scene, so that means current direction can be different and can change across the water surface itself.

    Hope that helps :)
     
  4. Kraken29

    Kraken29

    Joined:
    Nov 27, 2023
    Posts:
    5
    Thats a very big help thank you!
     
    chap-unity likes this.