Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Ultimate Water System - The most advanced realtime water simulation

Discussion in 'Assets and Asset Store' started by Moonlit-Games-Studio, Sep 7, 2017.

  1. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    58
    UWS Same old playway wrapped up differently.. way too slow.. bogged down code for seemingly trivial features.
     
  2. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    690
    So, I spent way too long trying to find an 'issue' when there wasn't one. For those of you working with a weather/sky system, be sure to have the built in reflection probes reach to the camera view distance at least. Otherwise you get something like this below (using Enviro).

    In default queue.
    upload_2017-11-6_8-0-4.png

    in deferred.
    upload_2017-11-6_8-0-28.png

    I was going mad looking at everything under the sun, then realized it was only happening in deferred, so it was likely a probe issue. Bam, sure enough, the stock probe in Enviro is set to 1k each way.
     
  3. InstigateMobile

    InstigateMobile

    Joined:
    Jul 13, 2016
    Posts:
    7
    1. We've resolved performance issue internally, so there is no need to deal with it
    2. FPP approach does not fit to our requirements, because we're developing multiplayer game with authoritative server. So different blend profiles will cause non-synchronized water physics between the different clients. In addition we have free camera view so different sea states and colors ins different areas should be visible for some altitude. Can you suggest other methods to get that result?
    3. For build errors we have updated the github thread.

    Thank you
     
  4. meje

    meje

    Joined:
    Oct 6, 2017
    Posts:
    4
    Any plans for mobile support? I'm currently working on iOS project but your shaders does not support the Metal API. Would have liked a shader model / graphics API support overview before purchasing.

    Errors include: "Metal: Compute shader has 1024 threads in a threadgroup which is more than the supported max of 512"

    and another example "Shader Unsupported 'UltimateWater/Refraction/CollectLight' Pass ' ' has no vertex shader" (they are then removed)
     
  5. Lohrion

    Lohrion

    Joined:
    Aug 16, 2013
    Posts:
    98
    Hey there,

    I upgraded from Playway to UWS, eager to try out the subtractive volumes. Sadly, they don't appear to work for me. I've added the Water Volume Substract script to my terrains, removed the terrain collider and added a box collider - moved it to the center, and enlarged it to the size of the terrain.

    I now see multiple strange behaviours:
    subtract_volumes.JPG
    In this instance, it works as expected - but only for one quarter of the terrain. The box collider is big enough in x, y and z direction, though.

    subtract_volumes_pink_ghost_square.JPG
    In this case, it might get clearer why only a quarter of the other terrain was free of water. The pink horror is the volume renderer child created as child of the terrain, with an empty material. Also, please notice the light blue shadow on the middle-lower right of the pink horror. To the left of the pink horror, there are white pixels on the water - these were there pior to adding the volume substraction stuff.

    warnings.JPG

    This is written to the log, though I am not sure if it has anything to do with the behaviour I'm experiencing.

    I'm using the current store version, the fully featured ocean profile along with the gale-strength. In case it matters, the light in my scene (day-night-cycle) is coming from UniStorm and the terrains are using RTP.

    How can I resolve these four issues?

    Edit: Also, when building my game the water is invisible and get an error message "Couldn't read a file:// file" in the log. Any idea what could cause this and how I can solve this?
     
    Last edited: Nov 7, 2017
  6. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    430
    I have a scene with only the base Ultimate Water and an Invector controlled character. Whenever I move the character (especially during rotation) a multi colored static appears on the surface of the entire water. I had no such problem with Play Way. Suggestions?

    Unity 5.6.3f1
     
    Last edited: Nov 8, 2017
  7. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    690
    We are experimenting with an open world game. We are resetting the player position to a local space while shifting terrain under the player and realized that the water is not in the same position relative to the player. Do you have a way to determine the relative position of the water in it's current state to the player so we can shift the water object in the same relative position when shifting the world? I haven't been able to find anything relative in the class so far.
     
  8. roberteker

    roberteker

    Joined:
    Feb 22, 2017
    Posts:
    140
    Am I the only one who doesn't get anything to appear on his water, if I right click to add a water projector?

    The example scene works with the water projector, but creating a new one doesn't work for me.
     
  9. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    239
    This looks like an issue I am having too.

    Could you advise a newbie like me where this reflection probe is located please.

    I feel really dumb for asking but have looked and although it must be in front of my face, I cant see it :(

    M
     
  10. MCPGNZ

    MCPGNZ

    Joined:
    Sep 29, 2016
    Posts:
    27
    Hi all.

    We will submit the next fixes (of course, including those that already have been patched) to Asset Store.
    Answers part 1 of 2:

    @meje
    I want to deal with the OpenGL/mobile problems in the next batch of fixes.

    @wood333
    I presume you have AMD gpu? If so - there was a problem with Planar Reflection that was solved with the hot-fix downloadable from here. If you have the latest patch and still encounter this issue, please create a issue on github, with the details of the problem (ideally with screenshots, hardware specs, etc - specified in the readme)

    @moria15
    Reflection probes are a part of the Unity itself, you can learn about them from i.a:
    - this video,
    - this docs
    This great post by zuzzu explains the details of how to setup the reflection-probes for best results in UWS.
    If you will have any further questions, feel free to PM me. The problem described by CaptainMurphy boiles down to the fact, that the reflection probe/s size must cover the entire area of water you're interested in. This is the only way the water "knows" what to reflect.
     
  11. MCPGNZ

    MCPGNZ

    Joined:
    Sep 29, 2016
    Posts:
    27
    Part 2 of 2:

    @InstigateMobile
    Unfortunately, it's not possible to do it in any sane way. It's possible (i would like to see that too), but it would require some work, and the bugs have the priorirty for now.

    @Lohrion
    Hello! I think that it's problably not a bug, but just strange setup or something. We can discuss it in depth on Github (feel free to create an issue, even if it turns out to be not a bug - if you could post simplest scene that reproduces this, it would be great). (You can also look in the Volumes demo scene, and check if that is working)

    @CaptainMurphy
    I'll PM you about the details, because I'm not sure if i understand the problem correclty.

    @roberteker
    If you want to create diffuse decals on water you should:
    - create Plane gameObject (the plane is used as a projection surface)
    - add to it Water Projector component (it uses material from Mesh Renderer)
    - the material attached to the mesh renderer should be either Particles/Additive or Until/Transparent
    If this solution does not work for you, PM me :)

    One small thing: the next week will probably be pretty intensive for me so please forgive me any delays in responses etc.
     
  12. Morcrist

    Morcrist

    Joined:
    May 7, 2015
    Posts:
    5
    I couldn't find anything in the thread on this, so I apologize if I missed it, but are we STILL not able to see the water in Scene View? There used to be a time when we could....
     
  13. Galahad

    Galahad

    Joined:
    Feb 13, 2012
    Posts:
    54
    There still some issues, but nonetheless ShipBowWavesEmitter still a great addition:
     
    Bartolomeus755 and Funkeys like this.
  14. Morcrist

    Morcrist

    Joined:
    May 7, 2015
    Posts:
    5
    If we've got the capability to have that, which looks awesome btw, why can't we have shoreline waves?
     
  15. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    52
    I think you could try to use WaveEmitters for that effect.
     
  16. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    52
    Hi!

    Is there anyway to set the far clipping plane of the reflection camera? Maybe i have missed it. Otherwise this would be a really nice feature, that i need. For visual and performance purposes.

    Keep up the good work!
    Thanks!
     
  17. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    304
    Does this work in single pass VR in 2017.2?

    Am I able to disregard the real-time reflections and use a reflection probe or cubemap for cheaper reflections instead?
     
  18. stevenwanhk

    stevenwanhk

    Joined:
    Jul 20, 2016
    Posts:
    32
    Does it require any non-default setting to make the foam work? I can see foam in the sample scene but cannot see it in our own scene even I copy the "Camera", "Water" and "Wall" from Shore to my own scene.

    P.S. Both scenes are in the same project.

    Besides, any sample or documentation to show how spray works in UWS? Thanks.
     

    Attached Files:

    • 2.jpg
      2.jpg
      File size:
      74.9 KB
      Views:
      32
    • 1.png
      1.png
      File size:
      660.2 KB
      Views:
      33
    Last edited: Nov 13, 2017
  19. meje

    meje

    Joined:
    Oct 6, 2017
    Posts:
    4
    Is there an ETA on this? I'm currently working on a IOS project and cant wait more than a week or two...
     
  20. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    283
    Just submited a Bug report on GitHub. Not working at all in Single Pass VR Mode.
     
  21. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    396
    You can use "SurfaceOffset" property on Water component for the purpose of shifting water just like the terrain in your description. There is a limit of this though and artifacts will appear after shifting too many times in a single direction. You may need to reset this offset to zero after hitting some large value.
     
    MCPGNZ likes this.
  22. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    396
    Single-pass stereo rendering doesn't work for water in Unity 2017.2 due to an engine bug. I reported it a few weeks ago, it has been reproduced by UT and probably will be fixed soon.
     
    MCPGNZ likes this.
  23. fatality674

    fatality674

    Joined:
    Nov 1, 2012
    Posts:
    12
    Is there a way to make an endless ocean type effect with this? When I try to use Uniform grid it gives me the desired effect but it seems to cause an issue with the camera where the water seems to move slightly when the camera is moving.

    Radial grid looks correct but it's culled too near to the camera. Can I scale it up in any way or do I have to use custom meshes?
     

    Attached Files:

  24. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    61
    The code is generating 1.5kb of garbage every frame. Should be caching the Unity version because it is only called once.

    Code (CSharp):
    1.         public static int Version
    2.         {
    3.             get
    4.             {
    5.                 string unity = Application.unityVersion;
    6.  
    7.                 // replace all patch identifiers "f, p, rc, ...", and subsequent patch version numbers
    8.                 unity = Regex.Replace(unity, "[^0-9.]+[0-9]*", string.Empty);
    9.  
    10.                 // split into major/minor/update
    11.                 var version = unity.Split('.');
    12.  
    13.                 int major = int.Parse(version[0]);
    14.                 int minor = int.Parse(version[1]);
    15.                 int update = int.Parse(version[2]);
    16.  
    17.                 // calculate version integer
    18.                 return major * 100 + minor * 10 + update;
    19.             }
    20.         }
    Suggest replace it with:

    Code (CSharp):
    1.         public static int fetchedVersion = -1;
    2.  
    3.         #region Public Variables
    4.         /// <summary>
    5.         /// returns an int representing current unity version
    6.         /// takes into consideration only major, minor and update numbers
    7.         ///
    8.         /// 5.4.5f1    => 545
    9.         /// 5.6.1p2    => 561
    10.         /// 2017.1.3f1 => 201713
    11.         /// </summary>
    12.         public static int Version
    13.         {
    14.             get
    15.             {
    16.                 if(fetchedVersion < 0)
    17.                 {
    18.                     string unity = Application.unityVersion;
    19.  
    20.                     // replace all patch identifiers "f, p, rc, ...", and subsequent patch version numbers
    21.                     unity = Regex.Replace(unity, "[^0-9.]+[0-9]*", string.Empty);
    22.  
    23.                     // split into major/minor/update
    24.                     var version = unity.Split('.');
    25.  
    26.                     int major = int.Parse(version[0]);
    27.                     int minor = int.Parse(version[1]);
    28.                     int update = int.Parse(version[2]);
    29.  
    30.                     // calculate version integer
    31.                     fetchedVersion = major * 100 + minor * 10 + update;
    32.                 }
    33.  
    34.                 return fetchedVersion;
    35.             }
    36.         }
    It was generating so much garbage because it was using regex to figure out and replace strings (generating a whole bunch of strings). Great job on adding caustics and dynamic waves from Playway. Glad I could upgrade to this.
     
    Funkeys likes this.
  25. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    52
    Hi,
    I had the same issue, it is because the radial grid is capped to 1000 units in the AssetStore version.
    You can download a hotfix from there:
    http://mgardela.udl.pl/uws/index.php
    It should be fixed there and extend to the far clipping of the camera.
     
  26. fatality674

    fatality674

    Joined:
    Nov 1, 2012
    Posts:
    12
    I've been trying to download the hotfixes but it keeps saying my invoice and my order number is invalid. I'm copying them directly from the email. I've also emailed Moonlit twice with the order details and I'm yet to have any sort of reply.

    I figured out the radial grid fix in the end and just set it to my cameras far clip. Thanks for the answer though.

    I have run into a new issue when enabling forward rendering on the camera, it seems to mess with the depth/render order settings for the whole scene. Disabling the Water Camera IME script stops this behavior from happening but obviously, this also stops the water from rendering. I have attached a screenshot.

    Changing to deferred causes a separate issue where the white caps from the ocean seem to be flipped based on my cameras orientation. I believe this may be an issue with AA/other image effects.
     

    Attached Files:

  27. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    690
    Maybe I don't get how that is used. I made a quick test script to offset the water position by a set x/z amount, then apply the negative of those to the x/y of the SurfaceOffset property and the water does not appear the 'same' where the player is concerned. Any chance of showing a demo of this? Maybe a couple of basic use cases in an example scene?
     
    ftejada likes this.
  28. Egz

    Egz

    Joined:
    Oct 17, 2013
    Posts:
    3
    Do you by chance have a write up or an example outlining how you created this? I tried to reproduce the particle system from the video, but when I apply the Water Projector script, I get flooded with errors from the RendererUpdateManger.

    Thanks!
     
  29. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    9
    Does the detail fade distance work for anyone in the water profile? My water is always very detailed in the distance which makes it look really sparkly. Changing the Detail Fade Distance slider has no effect.

    This is using Forward Rendering, Blend Probes and Skybox + Planar Reflections.

    Running on an AMD Radeon R290.

    detailFadeDistance.png

    For reference I also attached a screenshot of what it used to look like with Play Way Water (before upgrading)

    HydroSimLighting.png
     
  30. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    3
    First of all gotta say this asset looks absolutely amazing!
    Have an issue which i can't find a workaround for.
    The game plays under the ocean with caves which have air in them. So keep in mind there is another boundless water ( full feature shader ) way above this whole scene.
    Made a custom mesh plane water with puddle shader in it and this happens when approaching from underneath:

    [​IMG]

    This look only happens when local effects are on ( which I need them to be ).

    When I edit the shader at runtime to disable local effects it looks like this:

    [​IMG]

    After recompilation the shader works as expected when above the water:

    [​IMG]

    Any ideas on how to solve this ?

    This happens in both deferred and forward ( using deferred for caustics right now ).
     
  31. TheFoundation

    TheFoundation

    Joined:
    Jan 29, 2014
    Posts:
    8
    Versions and settings:
    Unity: 2017.3 beta
    UWS: 1.0.1 + downloaded hotfix
    Rendering Path: Differed
    (Color Space: Linear)
    (OS: Windows 10 Pro)

    Reproduction:
    Opened a sample scene (e.g. "Shore") results in shader error:

    Error:
    Shader error in 'UltimateWater/Refraction/Collect Light': Fragment program 'frag': Struct variable 'globalWaterData' is ignored. Only instancing constant buffers can have struct variables
    (on d3d11)

    Compiling Fragment program with DIRECTIONAL
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

    Shader error in 'UltimateWater/Refraction/Collect Light': Fragment program 'frag_add': Struct variable 'globalWaterData' is ignored. Only instancing constant buffers can have struct variables
    (on d3d11)

    Compiling Fragment program with POINT_COOKIE
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

    Question:
    Did anyone try UWS using Unity 2017.3 beta?
     
  32. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    58
    How much performance hit are you getting with UWS Volume Subtract Vs. Playway Volume Subtract? Has the performance been improved? Also, were you able to solve the above issue? Cheers
     
  33. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    58

    These are the exact same errors I'm getting with Playway and Unity 2017.3 beta.. globalWaterData is ignored!! Not sure how to fix
     
  34. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    163
    That's good news, the question now is:
    How to set up a complete working ocean? Waves + Foam + caustics + Underwater particles + lightrays etc. Is there a way to create working presets so we don't have to reverse engineer all the demos?
    is there a complete step by step tutorial? all of the demo scenes are static.
     
    ftejada likes this.
  35. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    690
    After a fair amount of trial and error, it is now offsetting mostly correct (i.e. I was moving things in the opposite direction, expecting the result of an offset in the other direction). At least it is looking more correct than it originally was. One thing that was throwing me off was that the offset starts off as a NaN and it seems to help to force it to 0,0 on start, though I am not quite sure why that makes a difference. I would have assumed it was running at 0,0 as a default but didn't delve into the code much to see how it affects the shader.
     
  36. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    1
    I have a problem with buoyancy on high waves(violent storm preset for example). Ship either rotates like crazy or drowns on such settings . How can I fix that?
     
    Last edited: Nov 20, 2017 at 5:01 PM
  37. MCPGNZ

    MCPGNZ

    Joined:
    Sep 29, 2016
    Posts:
    27
    Hi all,

    About the bugs:
    It would be easier for us to communicate and me to inform you about the progress and solutions (and for the other people, that encounter similar issues) if you could create issues on github and include as much information as possible (the basics are listed in the _Issues_ paragraph). The more information you provide (ideally a simplest scene that reproduces the problem) the faster i can solve it and move on to the next one. I think that is a better solution as each issue is in it's own thread, and can be easily accessed by anyone interested. Don't worry about it not being an actual bug, but just some weird setting or config, it can be useful for others (and me, to better specify the functionalities etc).

    @8bitgoose
    I've fixed this problem and some other unnecessary allocations.

    @fatality674
    I've send you PM with the direct link to the patches and addressed your questions there.

    @Egz
    This is a bug in Unity - you can read about it _here_
    It shows up only sometimes, in certain Unity versions/patches, but you can add it the github list.
    I will look into it after solving more severe problems.

    @skaughtx0r
    Hi,
    Can you check for me if the _Detail Fade Distance_ changes anything if you change it in the _Open Water_ sample scene with high waves? Additionally, you can try to decrease _Normal Intensity_ in the _Normals_ tab of the water profile.
    Did you change your graphics driver (for example to beta version) or is the hardware+software setup exactly the same as it was in the PlayWay system? If the problem persist we can discuss it deeper on the Github Issues.

    @ibbybn
    As i mentioned earlier, i would be grateful if you could add it to the list on github with as much info as possible (including current UWS patch version, Unity version, hardware etc). I'm currently working on a OpenGL related problems but will look into it.

    @TheFoundation , @superjayman
    I'll start solving bugs with beta versions only when all the other bugs will be solved (it's safe to say that using beta versions for production releases is unlikely (i hope...))

    @superjayman
    The performance would be pretty much the same, in the case of the _volume subtract/add_ the underlying implementation stayed the same.

    @sadicus
    The all-features demo scene is a thing that i definitely want to include, unfortunately we must deal with the bugs first.

    @Stickeyd
    The last page of the documentation contains information about this, it's probably the case that your ship has center of gravity to high.
     
  38. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    163
    Good idea, and thank you!
     
    MCPGNZ likes this.
  39. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    163
    1. How to turn off underwater blur/wiggle? Animation speed only goes to 0.02
    2. How to create Marine Snow Particles for a large ocean? (Terrain chunk Size = 256 x 100)
      I'm guessing some script to parenting to the underwater camera.
     
    Last edited: Nov 22, 2017 at 11:32 PM
  40. bentunnadine

    bentunnadine

    Joined:
    Oct 21, 2016
    Posts:
    1
    @MCPGNZ I have a few questions:
    1. Is it possible to create a 'dynamic' profile, in which the variables (such as wind speed, foam amount, shininess etc.) can be changed independently via code? (These will likely all be interpolated so flickering and sudden changes should not be too much of an issue)
    2. Is it possible to have a sheltered harbour area with reduced wind speed/ smaller waves?
    3. Aside from performance, is there any potential drawbacks to using Water.GetUncompensatedHeightAt() to directly get the water height at a specific X,Z coordinate instead of a WaterSample?
    4. Is there a possibility of some implementation of swell in the future
    5. I've noticed that the deault density used by the physics is 998.6, this is not an issue for me but it seems low as pure water is 1000kg/m2 and sea water averages at 1027kg/m2 at sea level, is there a reason for this?