Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

AQUAS Water/River Set - Water & Rivers for Mobile, VR, Web, Desktop

Discussion in 'Assets and Asset Store' started by dogmachris, Jan 8, 2016.

  1. josh-horsley

    josh-horsley

    Joined:
    Jun 20, 2013
    Posts:
    34
    Hello,

    I know that there is a volume subtract shader to remove water in boats - if a camera was placed inside of an object with the volume subtract shader on it (like a submarine) would this render correctly?
     
  2. ctronc

    ctronc

    Joined:
    May 18, 2017
    Posts:
    4
    Problem when importing Aquas asset into existing project, doesn't render unless camera is very near plane with water material in it (editor mode). Game view doesn't render anything at all.

    Please see attached video.



    Hi there, I bought the Aquas asset yesterday and I've been following the tutorial videos and managed to achieve some very interesting and cool results importing the asset into new projects using the latest Unity version. However, when I import the Aquas asset into my existing project (which started originally as a 2D project in Unity 2017 and I've been upgrading incrementally through time and now it's an Unity 2018.3.6 3D project) I'm facing some major issues:

    -After importing, the editor complains about Assets/Postprocessing. Deleting this folder removes the error
    -Then, I'm creating a plane and assigning it a material from Assets/Aquas/Materials/Water/Desktop&Web/
    -Plane instantly becomes invisible, and only partially visible if the camera is super near the plane. I can only see the foam this way.
    -Playing with the material settings effectivly alters what is visible, but doesn't fix the partially visible error. The camera must be very near the plane.

    Please help!
     
  3. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    296
    NullReferenceException: Object reference not set to an instance of an object
    AQUAS_LensEffects.Update () (at Assets/AQUAS/Scripts/AQUAS_LensEffects.cs:460)

    I keep getting this error again and again, I used to be able to deactivate/activate the script and then it stopped having these errors and it worked, but now even that doesn't work. I use the latest Aquas and my player is instantiating.
     
  4. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    That's weird. The realtime reflections have to be upside down, in order to be correctly mirrored, I don't see any other way to capture a reflection image correctly. It's beyond me however, how this results in everything being turned upside down. It might be because the recorders do the recording per camera and since the reflection camera has a different projection matrix, it might be applied to all cameras, but to be honest, I'm a bit lost on this issue.
    I might have to reqork the way realtime reflections get rendered.
    Sorry, I have no better answer for you on this.

    Regarding your other question about the pixel lights inside the masked volume:
    The volume masking was only intended to keep water from rendering inside small objects like boats. Support for full rendering features such as lighting is not as trivial as it may seem for such a situation. The reason is, that the depth mask shader is actually only a surface that renders nothing but depth with all colors masked out, so you see the colors behind the surface. The shader would have to be a lot more complex to allow light to take effect from its inside as it were and performance impact would have to be considerable - a lot more complex than most people would require.

    I would approach this situation as follows:
    If you have an object that has lights in it, such as a ship or so, instead of using a depth mask, you could simply give it a collider that acts as a trigger with your camera. As soon as the camera enters the inside of the ship - or whatever object you have - you can use the "OnTriggerEnter()" method to just deactivate the waterplane to prevent the rendering of water inside and vice versa in "OnTriggerExit()". Would that work for you?
     
  5. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    If you're instantiating the camera with the underwater effects, you might want to have a look at the inspector of the UnderwaterCameraEffects object in the hierarchy. There should be an array of objects containing the waterplanes that are in the scene. If it's empty, you get the error message. Make sure to set the array size to the same number as the amount of waterplanes you have in the scene and add the waterplanes to it. This is required, so AQUAS can check which waterplane you're currently interacting with.

    Does that solve your issue?
     
  6. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    If you're inside it, I think it should hows, however when looking at it from the outside, the rendering might be missing some stuff, such as lighting. The volume mask is for small objects such as boats or so, if you have big objects like ships or submarines, I would instead simply use a collider as a trigger and then in the "OnTriggerEnter()" method, you can disable the waterplane when your camera enters the submarine and vice versa in "OnTriggerExit()".
     
    FargleBargle likes this.
  7. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    Please delete the waterplane from your scene and try using the Quick Setup window (to be found under "Window"->"AQUAS"->"Quick Setup"). This should add AQUAS correclty. Does this help?
     
    ctronc likes this.
  8. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    The reflection script can only record from the view of the camera, so as soon as the camera starts moving, the reflection camera MUST record a new reflection image. Baking a single image to a cubemap is what a reflection probe does - however - a reflection probe is in effect little more than a 360° camera that renders to all sides and saves the image in a cube map (either infinitely far away or within its range).
    The problem with that though, is that it's not really possible to correctly map a cubemap on a plane. If you try it in an empty scene, add a plane, a reflection probe and a cube above the plane and let the plane reflect the cube, you'll see that the cube is always somewhat off (either too large or offset or both).
    This doesn't really bother when having a volume such as a car, because there you can hardly tell the correctness of reflections by just looking at it, but on a plane you'll always see, it's incorrect. The only way to do it right, is by distorting the reflection image beyond recognition, which AQUAS does when using it with a reflection probe.
    In the new HDRP I think planar reflection probes are availalbe, but I haven't yet played around with them - might be worth trying though...
     
  9. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    So I think it's time to post a little update on the dev process:

    I've managed to correctly mask out the underwater effects, so that the camera renders underwater effects only on the part of the screen that is underwater, instead of having only one of two situations (underwater - afloat). I've also started developing the image effect for the underwater effects (currently underwater fog only). It doesn't seem like much, but it will allow AQUAS to work without the post processing stack, which I think is a huge advantage to the way it works now.

    It turned out, getting finite and infinite waters to work together correctly, isn't as trivial as I thought it would be, because the infinite water needs a dynamic horizon to render underwater effects on, while finite water needs a fixed surrounding, so the entire Quick setup will be different, but with these points out of the way, I may be able to wrap up some crucial parts and maybe present some screens or a video by the end of this week - will have to see.

    Good news: The "borders" that AQUAS currently adds to the scene and that are all but flexible to work with, will disappear - instead everything will be adjusted to work correctly with finite and infinite water alike.

    Setting up the water is quite a pita atm, so this week I'll be busy automating the setup of the underwater masks and get on with the surface shaders. Once this is done, most yellow points should be out of the way, and I can focus on the mesh generation and the masking.
    • Infinite water using world space UV mapping
    • DX12 and Vulkan support
    • Crabwise depth buffer handling to allow the otherwise alpha-blended shaders to correctly write to the depth buffer
    • Full Comatibility with Unity 2018 and 2019.

    • PBR-version of the desktop shaders as opposed to only Blinn-Phong lighting in the past for better looks (70%)
    • An additional shader for shallow water, that can write to the depth buffer (70%)
    • New backface materials that are transparent but can still write to the depth buffer, so that all depth-buffer-based effects may work underwater. (50%)
    • Split rendering for when the camera is partly underwater and partly afloat (50%)
    • Custom underwater effects that do not require Unity's post processing stack (50%)
    • LWRP and HDRP support (40%)
    • Projected grid LOD system for infinite water with gentle high detail displacement at close range (30%)
    • Single-Pass-Stereo support for realtime reflections (Skybox Reflection + Reflection Probe) (20%)
    • Terrain masking for water rendering and underwater effects (20%)

    • Vertex painter to paint masks and flowmaps within Unity
    • Automatic mask detection/generation
    • Custom mesh generation
     
  10. ctronc

    ctronc

    Joined:
    May 18, 2017
    Posts:
    4
    Thank you so much, now it's working correctly!
     
    dogmachris likes this.
  11. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    224
    Infinite water :D
     
    dogmachris likes this.
  12. m506

    m506

    Joined:
    Dec 21, 2015
    Posts:
    42
    Thank you for your explanation and it makes total sense.

    I tried to add a reflection probe and I cannot see any reflections. Is there anything I need to do in the aquas material configuration/shader to make it reflect properly? I am not looking for anything very precise and I am happy if it is distorted.
    Thanks
     
  13. KrankyBoyGames

    KrankyBoyGames

    Joined:
    Mar 27, 2009
    Posts:
    733
    I have the same issue as mentioned above:

    The combined number of detail object vertices in one single patch is exceeding the limit (65536). Try decreasing detail density or detail resolution per patch.
    UnityEngine.Camera:Render()
    AQUAS_Reflection:OnWillRenderObject() (at Assets/AQUAS/Scripts/AQUAS_Reflection.cs:10

    This is with Unity 2018.3.7f1

    Any ideas?
     
  14. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    It usually means that the polycount number is too high for whatever reason. First try to check this theory by putting objects with LOTS of vertices on a separate layer and exclude that layer from the reflections script's layer mask - does that solve it?
     
  15. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    There should be some. Try the following: Add AQUAS via quick setup, then go to the water's material settings and set the refraction to 0 - do you see a reflection of the sky?
     
  16. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    I use Unity 5.6.6 and Invector's Third Person Camera. Today, I decided to take another look at AQUAS in my project. I used the latest version, downloaded fresh. The quick setup works for creating the water, which seems fine under play. When I click the Underwater Effects button Unity crashes instead of playing. I did this three times.
     
  17. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    May I ask which version of the pp stack you're using?
     
  18. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    None.

    But I could download 2.0 from GitHub.
     
  19. PapaGuiseppie

    PapaGuiseppie

    Joined:
    Mar 12, 2017
    Posts:
    2
    i'm using Unity 5.2.3 and trying to import AQUAS 1.5.4. I assume the two are not compatible, but I'm getting mixed messages as to what my options are. The Asset Store says the minimum version is 5.2.1, and it looks like there might be some version-handling work included in the release notes, but looking at the readme (in 1.5.4), it says that you need 1.3.1 from the Asset Store. I'm happy to use 1.3.1, but I can't find where you'd get it from. Is it possible to access a prior version?
     
  20. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    420
    I came here to ask if the multiple aquas for streaming was still being worked on since trying to do so currently is tough. This is the infinite water feature right?
     
  21. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    Yes, the infinite water for AQUAS is being worked on. It won't use multiple tiles, instead it will use texture coordinates that are mapped to world space. In effect this means, that you can lock the waterplane to move along the horizontal level with your camera, while the waves will always stay in place in world space, which makes it effectively infinite.
    Another feature, that is yet implemented on CPU only - but will be ported to gpu - is the screen space mesh LOD, which will save you thr trouble of having to scale the waterplane according to your camera's far clip plane - this will be done automatically while the LOD will stay high enough even at close distances and without having to tesselate the mesh.
     
    FargleBargle and tredpro like this.
  22. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    When you download AQUAS using Unity 5.2.3 it should automatically download the compatible version (that imports some scripts from the standard assets too.
    What are the error messages you're getting?
     
  23. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    Ah sorry, I forgot, you're using Unity 5.6 - that means, that only ppv1 will work. Unfortunately at this point AQUAS needs this in order to work. When you import AQUAS, it imports a folder called PostProcessing at the top level of the assets folder - do you have it in your assets folder? If not, you can simply import it either from the AS or just reimport AQUAS - it will then suggest to import the missing files.
     
  24. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    420
    Good this is the biggest feature to me for every asset that I have. Been patiently waiting :)
     
  25. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    According to Unity PPS legacy version 2 is for 5.6 through 2017.2. I may not be able to get version 1. Must it be 1 ?

    There is a post processing folder in the package, with two sets, on marked _v2 the other without suffix.
     
    Last edited: Mar 8, 2019
  26. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    No, the github version should work, although I think very few people still use AQUAS that way, so I haven't yet gooten a lot of feedback on this constellation.
     
  27. alexrau

    alexrau

    Joined:
    Mar 1, 2015
    Posts:
    48
    Will this work with the LightWeight Render Pipeline (LWRP)? (Asset store says will work with 2018.3)
     
  28. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    I don't believe the PPS is the issue, because underwater effects work fine in your lake demo scene within my project folder.

    Also your quick setup appears to be applying the expected components to the camera, though I have to hand apply the underwater profile.

    I use Invector's third person camera, is that an issue?

    I use Unistorm weather and day night cycle. Is that an issue.

    Whenever I add underwater effects via the setup button, Unity crashes on play.
     
    Last edited: Mar 9, 2019
  29. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    224
    I noticed today that the terrain draw instanced feature in 2018.3+ seems to stop aquas caustics from showing on the terrain.
     
  30. PapaGuiseppie

    PapaGuiseppie

    Joined:
    Mar 12, 2017
    Posts:
    2
    I'm seeing:

    Assets/AQUAS/Scripts/AQUAS_LensEffects.cs(80,5): error CS0246: The type or namespace name `Bloom' could not be found. Are you missing a using directive or an assembly reference?

    And the same with 'GlobalFog', 'BlurOptimized', 'VignetteAndChromaticAbberation', 'NoiseAndGrain', 'SunShafts'.

    And:

    Failed to load 'Assets/AQUAS/Demo/River.unity' because its serialized file version is higher than what this version of Unity supports.

    I've tried moving the scripts from the Standard Assets to AQUAS > Editor > ImageEffects, but it didn't help. Though that was more in hope than expectation.
     
  31. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    Yes, I am also successively updating the shaders to work with the lwrp and the hdrp. Unfortunately it's not like you can make shaders that work with all rendering pipelines, there has to be shaders for each template (3D, LWRP and HDRP). This is due to the way data is being handled in the different render pipelines. In the HDRP for instance, you cannot just simply grab the color of the scene behind your mesh, even if it doesn't write to the depth buffer, while you can do that in the LWRP and the 3D template. Why it works this way is beyond me, especially because it makes rendering transparent objects a lot more expensive, but we'll all have to cope with that.
     
  32. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    Well honestly, I'm a bit out of ideas on this one. There may of course be some kind of unknown conflict between AQUAS and something else. When using weather systems for instance, they often block out Unity's fog from working, but AQUAS tries to access it when underwater. Enviro has an integration for this, it grabs' AQUAS's information on whether the camera is underwater or not and based on that stops or starts accessing Unity's fog parameters, but it's hard to say if that's the reason in respect to Unistorm.

    I would first try AQUAS in an empty scene with only a terrain and see if that works. If it does, try disabling all possibly relevant assets in the scene that crashes on launch and renable them successively until you find out, which one is causing a conflict.

    Does that help you?
     
  33. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    Caustics are basically juust projectors - do any projectors work on instanced terrain?
     
  34. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    I haven't been using this older version of AQUAS in Unity 5 for quite some time now - I'll have to look into it on my end and see if I get similar issues.
     
  35. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    224
    Yeah, I did some digging and it seems projectors are not working with instanced terrains.
     
  36. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    823

    Any news on how your update is going?! :)
     
  37. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    392
    everything on that 'store' is stolen.
     
  38. John-Silver-Long

    John-Silver-Long

    Joined:
    Feb 14, 2013
    Posts:
    10
    Yea i thought that already thats why i did not touch anything there but just might be good to let him know;)
     
  39. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    392
    you should do that in private, instead of spreading it to everyone and anyone who can come read your post. I already reported your post to the mods, I hope they take it down soon if you won't.
     
    dogmachris likes this.
  40. John-Silver-Long

    John-Silver-Long

    Joined:
    Feb 14, 2013
    Posts:
    10
    Well i removed the reply and did send it in private.
     
    Last edited: Mar 17, 2019
    dogmachris and ceebeee like this.
  41. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    143
    Unity should go after that site and have it closed down. Although it might be in a country that doesn't care about such things as copyrights and such. If I was the type to steal assets, I would still be afraid of downloading anything from that site, you would probably get a nasty virus or something.
     
    dogmachris likes this.
  42. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    823
    People can go there if they want to get spyware installed on their PC. better to be legit and get it through the proper means.
     
    dogmachris and Willbkool_FPCS like this.
  43. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,193
    Time for an update on the dev process.
    The underwater effects are finished and work now. The masking process was a bit more complicated than I thought, but I think it's worth it. Two image effect shaders will now work from within a single script providing
    • Underwater blur
    • Underwater fog
    • Color tint
    • Wet lens effect only on the part of the screen that just moves from below to above.
    with full control and without the need for the pp stack. One should be able to run this before or after any other image effects.

    I got a bit stuck on the backface material yesterday. the issue is as follows:
    The backface material must render on the geometry queue, but for some reason when doing that the scene camera renders correctly, while the camer camera renders the color of the sky black. When setting the render queue to transparent (3000+) everything works fine with the game camera too, but then the shader doesn't write to the depth buffer anymore and the underwater effects will not render there which is a problem. This is something I'll have to sort out.

    I have also manages to get pretty much the exact same look with every lighting model, so there is no difference to be seen between the PRB shader and the Blinn-Phong shader, so I won't have to make them both. Since the Blinn-Phong lighting model is a lot cheaper on performance, I'll drop the PBR shader.

    I have modified the environmental reflections a bit. There will be two types of controlable reflections:
    The realtime reflections via script, as before and also reflections from reflection probes. Both can be turned on or off and stacked upon each other. This will allow the user to decide which reflections to use, both having their pros and cons. The most obvious con of the reflection probe, is that it will probably not correctly map the reflection on the water - this is due to the nature of the reflection probe being a cube, which is difficult to map on a plane. Unlike the current version however, it will be possible to adjust the distortion on the reflection image coming from the reflection probe, to give some more control. When working in VR one can simply turn off the realtime reflection script and use the reflection probe instead. All other options (baked or realtime reflections, texture resolution, etc.) can then be set in the reflection probe's settings.)

    Other than that, I have now decided which features make it into the update and which won't (at least for now), just to I can save time and publish sooner rather than later, so here's the updated list:
    • Infinite water using world space UV mapping
    • DX12 and Vulkan support
    • Crabwise depth buffer handling to allow the otherwise alpha-blended shaders to correctly write to the depth buffer
    • Full Comatibility with Unity 2018 and 2019.
    • Split rendering for when the camera is partly underwater and partly afloat
    • Custom underwater effects that do not require Unity's post processing stack
    • Single-Pass-Stereo support for reflections (Reflection Probe)

    • New backface materials that are transparent but can still write to the depth buffer, so that all depth-buffer-based effects may work underwater. (70%)
    • LWRP and HDRP support (40%)
    • Projected grid LOD system for infinite water with gentle high detail displacement at close range (50%)
    • Terrain masking for water rendering and underwater effects (20%)

    • Vertex painter to paint masks and flowmaps within Unity
    • Automatic mask detection/generation
    • Custom mesh generation
    I have decided to drop the last 3 points in favour of ETA, so I don't spend too much time with it before the update goes live. I'll implement them later.

    I've added shoreline effects as well, but they can be turned off, because since they rely on depth blending the shoreline waves may change based on view angle and distance between the camera and the water surface and in some situations this might lead to wrong results.

    What I also need to do one I'm done with the yellow stuff, is code a new setup window that works with the new setup.

    What I could REEEEALLY use right now, is a nice environment for showcasing - can anyone here help with that? :D


     
  44. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    224
    I'm severely looking forward to this update :)
     
  45. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    99
    Not sure if someone has found a solution to this, but I am unable to see the underwater fog in my build (works on editor)

    Removed cameras and added again, it didn't help.

    I am aware this is likely not AQUAS' fault, but any advice on how to proceed is welcome.
     
  46. Keaneo

    Keaneo

    Joined:
    Mar 7, 2015
    Posts:
    80
    Hi,
    Anyone using Aquas on Oculus Go? Added a terrain and "mobile lake" to a scene and performance drop was huge :-(
    Terrain on it's own was fine.
    I just want to check it's nothing I'm doing wrong!

    Thanks!
     
  47. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    823

    @dogmachris How about now?
     
  48. Egmont

    Egmont

    Joined:
    Nov 26, 2013
    Posts:
    6
    Hello!
    We are having issues with the Aquas Water Plugin in combination with spherical renders and Terrains in Unity 2018.3.8

    To reproduce the problem:
    1. Import the plugin into an empty project. (Unity 2018.3.8 - regular 3D template)
    2. To ensure all Aquas scripts are working, fix compile error of MinDrawer.cs by adding
      "using MinAttribute = UnityEngine.PostProcessing.MinAttribute;" at the header of MinDrawer.cs
      (This should not be related to the plugin, its just a regular Unity Bug)
    3. Open Lake demo scene
    4. Create a reflection probe where the camera of the demo scene is located.
    5. Set Reflection probe to "Realtime"
    The reflection probe will show problems with the terrain depth layering.
    Changing the Render Queue Index inside in the Aquas_Render_Queue_Editor Script to 2800 as suggest in the manual does not help.Trees and other objects render fine. Problem is not isolated to the area that is overlapping the water. After removing the water the scene and the terrain will render correctly.

    ReflectionProbe.JPG
    Same problem when using the Unity Recorder Plugin to output a 360 movie of the scene:

    image_0000.jpg
     
  49. RadioactiveXP

    RadioactiveXP

    Joined:
    Nov 6, 2013
    Posts:
    69
    I'm have trouble seeing the water when using the game editor, it does not appear to be working with my terrain. The challenge I have is that I am using MapMagic, so I am not sure if that is the issue or not, because the terrain objects come and go depending on what I have pinned open while testing the generation.

    When I run, it appears to be fine, but it is impossible to tune my shorelines because I cannot see anything in the editor. Any idea when this would be?
     
  50. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    823