Search Unity

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

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

  1. Aress28

    Aress28

    Joined:
    Dec 12, 2015
    Posts:
    100
    instead of 3 errors i now have 200+ errors...
     
  2. wcoastsands

    wcoastsands

    Joined:
    Sep 30, 2011
    Posts:
    44
    1. Can you copy paste the debug log into a code snippet here, or attach as a text file?
    2. You deleted the following symbols from Scripting Define Symbols, right?
    You may have to delete the symbols for each platform in Player settings, since they each have their own.

    Code (CSharp):
    1. AQUAS_PRESENT;UNITY_POST_PROCESSING_STACK_V1;UNITY_POST_PROCESSING_STACK_V2
    Alternatively, just comment out [InitializeOnLoad] or [InitializeOnLoadMethod] to prevent the script from running at all, and just add the Scripting Define Symbols manually to each platform.
    • AQUAS_PRESENT -- This symbol should be added to each platform.
    • UNITY_POST_PROCESSING_STACK_V1 -- Add this symbol if using v1.x of the Post-Processing Stack.
    • UNITY_POST_PROCESSING_STACK_V2 -- Add this symbol if using v2.x of the Post-Processing Stack.
    Each symbol should be separated by a semicolon (;) with no spaces.

    Hope that helps. If not, we might be able to figure something out by looking over the debug log.
     
    dogmachris likes this.
  3. wcoastsands

    wcoastsands

    Joined:
    Sep 30, 2011
    Posts:
    44
    Just a heads up, I made a couple more corrections to the code. Instead of removing the AQUAS symbol when the post processing majorVersion is less than 0, the script now removes both post processing symbols.

    Not sure if that'll help your case. If you do still run into errors, please attach the debug output as a text file.
     
    wlosinski and dogmachris like this.
  4. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Thank you very much for helping out with this. :)
     
    hopeful and wcoastsands like this.
  5. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Aress28 if you do as @wcoastsands said, which is basically doing the script's work manually, it should work. Please let me know, if you need any assistance with - or explanation for - that.

    @wcoastsands your script is an interesting and certainly more precise approach, thank you very much for that sir. I will do some testing with it too. The thing however with setting compiler conditions based on whether certain files are in the project or not, is that it's a bit like playing whack-a-mole with the scripting define symbols.

    I don't know if one can be precise enough to cover every possiblity. Even if the file that identifies the post processing stack was named RedDottedSmurfTighterThanADucksAss.cs, all it would take is another asset that has a file with the same name in it, even if the filetype is different - and I'm sure there is one out there. :D
    It is - as far as I understood - what happened here.

    I thought of trying to check whether the classes corresponding to the file names existed - which would certainly make it more precise than sweeping for a file name -, but that would make using Reflection inevitable - which I like to keep to a minimum - or do you see another way?
     
    wcoastsands likes this.
  6. wcoastsands

    wcoastsands

    Joined:
    Sep 30, 2011
    Posts:
    44
    I think in this case, reflection is appropriate. It only happens in editor and it's a one-off sort of deal not done in an update loop. It does run each time scripts are reloaded, but I still think overhead shouldn't be a concern. And because it's using System.Linq instead of System.Reflection to inspect the assembly, there shouldn't be any issues when the target platform is Windows Store.

    I did notice an issue with my last edit, though. It introduces a race condition if majorVersion < 0. You should try avoid calling SetScriptingDefineSymbolsForGroup() unless symbols have changes that need to be applied. Each time it's called, it recompiles and reloads scripts. Which results in the race condition in my script.

    Tried updating the script in the previous post, but the forum wasn't allowing me. Changes should be as follows:

    Code (CSharp):
    1. $ git diff
    2. diff --git a/Editor/AQUAS_AddDefine.cs b/Editor/AQUAS_AddDefine.cs
    3. index 7d1b4fa..cad48f5 100644
    4. --- a/Editor/AQUAS_AddDefine.cs
    5. +++ b/Editor/AQUAS_AddDefine.cs
    6. @@ -37,9 +37,20 @@ static void Initialize ()
    7.  
    8.              if (majorVersion < 0)
    9.              {
    10. -                symbols = symbols.RemoveSymbol(k_Symbol_PostProcessingV1);
    11. -                symbols = symbols.RemoveSymbol(k_Symbol_PostProcessingV2);
    12. -                PlayerSettings.SetScriptingDefineSymbolsForGroup(group, symbols);
    13. +                if (symbols.Contains(k_Symbol_PostProcessingV1))
    14. +                {
    15. +                    symbols = symbols.RemoveSymbol(k_Symbol_PostProcessingV1);
    16. +                    dirty = true;
    17. +                }
    18. +
    19. +                if (symbols.Contains(k_Symbol_PostProcessingV2))
    20. +                {
    21. +                    symbols = symbols.RemoveSymbol(k_Symbol_PostProcessingV2);
    22. +                    dirty = true;
    23. +                }
    24. +
    25. +                if (dirty) PlayerSettings.SetScriptingDefineSymbolsForGroup(group, symbols);
    26. +
    27.                  return;
    28.              }
    29.  
     
    Last edited: May 16, 2018
  7. wcoastsands

    wcoastsands

    Joined:
    Sep 30, 2011
    Posts:
    44
    Realized that this piece is redundant now, and removed it from the script.
     
  8. generaltofu203

    generaltofu203

    Joined:
    May 9, 2018
    Posts:
    40
    Does this asset give you the ability to have big waves? like not super big waves but choppy seas cause all the previews show flat seas. Hows the integration with dwp?
     
  9. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello! Post processing v2 and 2018.1 friendly? :)
     
  10. tetetete

    tetetete

    Joined:
    Nov 12, 2016
    Posts:
    22
    Installing Lighting Box 2 + HD Render Pipeline Integration gives
    Code (CSharp):
    1. Assets/AQUAS/Scripts/AQUAS_LensEffects.cs(93,22): error CS0102: The type `AQUAS_LensEffects' already contains a definition for `postProcessing'
    2. Assets/AQUAS/Scripts/AQUAS_Parameters.cs(32,35): error CS0102: The type `AQUAS_Parameters.UnderWaterParameters' already contains a definition for `underwaterProfile'
    3. Assets/AQUAS/Scripts/AQUAS_Parameters.cs(33,35): error CS0102: The type `AQUAS_Parameters.UnderWaterParameters' already contains a definition for `defaultProfile'
    then deleting both aqua and lighting box and reinstaling aqua still gives this errors which force me to make empy object as even deleting whole liblary and project setting folder still gives that error.
     
  11. wcoastsands

    wcoastsands

    Joined:
    Sep 30, 2011
    Posts:
    44
    dogmachris likes this.
  12. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Aquas works like a charm in 2018.1 and looks amazing! In hd rendering setup
     
    dogmachris, hopeful and wcoastsands like this.
  13. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Hi,

    How to make the Aquas water much less transparent, not to view through the water in a long distance not being under water?
     
  14. arsys

    arsys

    Joined:
    Aug 18, 2017
    Posts:
    4
    This also happened to me testing 2018 with Postprocessing preview! No Cinemachine nor PPS
     
    cavenai and wcoastsands like this.
  15. luvlylavnder

    luvlylavnder

    Joined:
    Sep 12, 2017
    Posts:
    1
    This worked for me....
    Thank You
     
  16. tnaseem

    tnaseem

    Joined:
    Oct 23, 2009
    Posts:
    149
    Hi there,

    I have an issue that's cropped up in Unity 2018.1.0f2. I have several spotlights (deferred rendering), and the ones over the rivers are being applied as big square areas over the water. See below (big red arrow pointing at one of the square areas being projected):

    2018-05-20_01-43-37.png

    This wasn't happening in 2017.4.x. Just wondering what could be causing this? FYI, the shader being used is the Double-Sided/River.

    Thanks for any help!
     
  17. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    importing latest version of aquas into a project and getting some errors,

    upload_2018-5-19_13-45-1.png

    i am using post processing 2 preview package as installed via unity package manager... are there any fixes or workarounds for this? thanks
     
  18. wcoastsands

    wcoastsands

    Joined:
    Sep 30, 2011
    Posts:
    44
    p87 likes this.
  19. arsys

    arsys

    Joined:
    Aug 18, 2017
    Posts:
    4
    Thanks for the update! Now Aquas works in my 2018 tests. One detail: when I set Linear Deferred as recommended, strange artifacts appear over the borders of the Terrain underwater:

    upload_2018-5-19_18-42-46.png
     
  20. PDTokay

    PDTokay

    Joined:
    Jan 11, 2018
    Posts:
    5
    I'm getting this too and its driving me insane. Not sure how to fix it
     
  21. erenaydin

    erenaydin

    Joined:
    Mar 1, 2011
    Posts:
    384
    The latest update is working on 2018.1 without errors or warnings.
    Also it worked with AURA Volumetric Lightning & Fog.

    Perfect water.
     
    dogmachris likes this.
  22. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Those don't seem to be artifacts, but rather the depth based rendering of the water applied to the borders. You might use a simple script that deactivates the borders while the camera is afloat and activates them, when the camera goes underwater:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class AQUAS_BorderControl : MonoBehaviour {
    6.  
    7.     public GameObject borders;
    8.     AQUAS_LensEffects lensEffects;
    9.  
    10.     // Use this for initialization
    11.     void Start () {
    12.             lensEffects = GameObject.Find("UnderWaterCameraEffects").GetComponent<AQUAS_LensEffects>();
    13.     }
    14.  
    15.     // Update is called once per frame
    16.     void Update () {
    17.         if (lensEffects.underWater)
    18.         {
    19.             borders.SetActive(true);
    20.         }
    21.         else
    22.         {
    23.             borders.SetActive(false);
    24.         }
    25.     }
    26. }
    Simply attach it to your waterplane and drop the "Borders" object from your hirarchy to the Borders variable in the inspector.
     
    arsys likes this.
  23. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    AQUAS is actually flat for performance reasons. I am working on a version with physical waves, but it's not going to be a simple update to AQUAS.
     
    erenaydin and wcoastsands like this.
  24. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Yes, it is. In general AQUAS will try to identify which version of the pp stack is installed and set up the compiler conditions automatically. In some fringe cases it might fail to do so though, in that case, it can be set up manually.
     
  25. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Have you tried playing around with the depth and shore transparency sliders in the material settings?
    Though not directly influencing transparency, the density and fade sliders may also help you achieve the effect you're after.
     
  26. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    My problem is that an end of the terrain is visible through the water surface from a long distance. It doesn't look well. The surface shouldn't be so transparent in all water systems. How to fix that?
     
  27. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Sorry, I don't quite understand the issue. Could you post a screenshot to illustrate what's going on?
     
  28. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    is the terrain surface near the water? usually ”end” of a terrain tile is grounded 50-100 meters bellow sea level wich results in good stuff..
     
  29. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    well I got these errors... when importing another asset containing post processing stack 2 * Okay I dont have the processing stack imported from the package manager... so.. what to do?

    error.png
     
  30. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    The issue is simple - the bottom of the sea is visible because the water surface is TOO transparent. How to make it LESS transparent?
     
  31. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    go into the water material/shader
     
  32. Dark-Muppeteer

    Dark-Muppeteer

    Joined:
    Feb 24, 2013
    Posts:
    26
    Neither of the Camera Effects shaders (Under Water/Wet Lens) seem to be working with Single Pass Stereo in VR (you get the dual cam overlay on screen), so I currently can't use the underwater effects at all, any chance these can be updated or is there a fix I can do here?

    Edit: Actually it looks like all of the Desktop water shaders also have a bunch of visual issues :(
    Edit 2: The in/out of water sound effects don't seem to play in builds either.

    Unity 2018.1
     
    Last edited: May 21, 2018
  33. jweinhartSW

    jweinhartSW

    Joined:
    Sep 30, 2016
    Posts:
    8
    We're seeing this too, and I've yet to track down the cause. @dogmachris any ideas?
     
  34. jweinhartSW

    jweinhartSW

    Joined:
    Sep 30, 2016
    Posts:
    8
    I have found that if you change the Light's rendering mode to "Not Important", the problem fixes itself.
     
  35. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    Is there a reason that I'm seeing the foam rendering being delayed by a few seconds on scene load?
     
  36. PDTokay

    PDTokay

    Joined:
    Jan 11, 2018
    Posts:
    5
    I spoke with him the other day about it. Happened during the switch to Unity 2018, I think he said it was too do with light attenuation. Hes aware of it but no current fixes at this stage.
     
  37. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Looking at optimization and I fixed the reflection issue by just having terrain layer reflected but there also seems to be another area where aquas eats the cpu.

    AQUAS_Buoyancy.FixedUpdate() 24 ms

    Removing the buoyancy script solves the problem but is there another way to get around this?
     
    wcoastsands likes this.
  38. GillesLTB

    GillesLTB

    Joined:
    Nov 14, 2017
    Posts:
    3
    Couple of quick questions, how do I set up Aquas to be "endless", as in a giant ocean? Right now I can sail off the edge like I'm in a flat-world fantasy.

    Second, is it possible to have multiple instances of Aquas running at different water-heights? (e.g. a crater lake 100m on top of a mountain, in the middle of an ocean, for example) Anyone have any experience with this, suggestions, best practices?

    Thanks
     
  39. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I created a mountain lake kind of like a mountain/bump with roads going around the mountain/hill/bump.

    The problem with this is that when you walk around the roads on the mountain go go underwater.

    Its because the actual underwater effects go out beyond the actual water surface size.

    So I contacted Christian about this and he said that the only way around it was to build the mountain up to take this into effect.

    As you can see in the attached image the actual underwater effects stretch quite a way out so you need to buuild the terrain up around that area.

    NOTE: though that the underwater effect is experienced right down the hill of the road (on left side), not just the straight road piece.

    I think this video shows you how to add multiple water planes though.

     

    Attached Files:

  40. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Do you have both post processing stacks in the project now?

    Easiest would now probably be, to set the compiler conditions manually. You can delete the AQUAS_AddDefine.cs script from the Editor folder. Then go to the player settings and there in the scripting define symbols make sure you have either "UNITY_POST_PROCESSING_STACK_V1" or "UNITY_POST_PROCESSING_STACK_V2" as an entry in there - depending on which version of the pp stack you want to use.
     
  41. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    It's as @mattis89 pointed out - in the material settings there are two values to control the transparency of the water. On controls the depth transparency (how deep can you see into the water), another one controls the shore transparency (how soft is the edge where the water intersects with other objects).

    The fade and density values help you control the color absorption, which is not transparency but adds a lot to the effect of either clear or dirty water.

    If you have trouble finding some good values, you can post a screen of your material inspector, I can then try to help you out.
     
  42. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    The sound effects issue is new to me - I have just made a build using Unity 2018 and had no issues with the audio - did it work just fine in the editor?

    Single pass stereo support is something I still have to get finished. Currently though I am reworking all of the more basic features of the shader, since they use some outdated functions that don't do particularly well with Unity 2018. Since this is urgent, I have to get this finished first.
     
  43. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    This is due to the way light attenuation works in Unity 2018. I had to change code in the shaders to fix compiler issues - the result is that box that renders around lights - this goes for all lights that are not directional lights.

    The only way to get rid of that box - for the time being - is to set the maximum pixel light count in the quality settings to zero.

    I am currently reworking the shaders which will fix this issue and add a bunch of features on the way. With a bit of luck, I might have it done next week or so.

    Please let me apologize for the inconvenience and assure you, that I am working as fast as I can to get this sorted.
     
    sharkapps, wcoastsands and hopeful like this.
  44. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    It should all render at once - tested just now. Have you tested it in a fresh project?
     
  45. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    The buoyancy uses the mesh as a basis for the calculation of updrift forces. It is not particularly optimized, since it is only a starting point or something to start working with, rather than a full-blown solution for water physics. The rule of thumb is simple: The more triangles there are that updrift forces have to be calculated for, the higher the performance impact.

    I would probably use a low poly mesh and try to use as few meshes with buoyancy applied to them as possible. If you have a dense mesh with lots of vertices there are two options that might work well:

    1. Either fake buoyancy by writing a script that has the object move as if it was affected by updrift forces even though it's not - for such an approach simplified math is probably more than sufficient.

    2. A more elegant solution would probably be to take a low poly mesh that resembles your original model, render it invisible and attach the original model to it as a child object. The buoyancy forces might now be applied to the invisible low-poly mesh while the original model should follow along perfectly.
     
    Hawk0077 and wcoastsands like this.
  46. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    I am currently reworking the shaders. The new ones will use world space UVs, so once that is done, it should be easy to make AQUAS infinite. Until that is done, the only way to make AQUAS infinite is to use water tiles and rearrange them depending on where the camera is, to always have the camera above or under the center tile.

    Apart from that, as @Hawk0077 said, the quick setup tutorial shows how to set up multiple instances of water at different water levels.
     
    camta005, wcoastsands and hopeful like this.
  47. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Hello, once again amazing asset. Great control and detail.

    I'm working on an infinite procedural world. I'm using ocean tiles and having a devil of a time getting reflection right.

    I generally understand reflection probes, but what I really want is a clean planar reflection to tie my boat into the water visually (and reflect the shoreline.) This seems to work great in your default scene with a small lake, but I'm scratching my head trying to make it work with an infinite ocean.

    Ocean is implemented using seamless square ocean tiles (per your tutorial video, thank you.)

    I don't quite get what the aquas reflection script does. It looks like it reflects a camera across the ocean plane and does a planar reflection, which I would expect to "just work" as I cross ocean tiles. But no - I see vague reflections of the shoreline and none of the boat, as though only my reflection probes are being used.

    Can you provide a few pointers for further investigation? I think playway (IIRC) did this with a secondary camera that followed the first but underwater - which it looks like is what your reflection script does - but no joy.

    Help?

    (also using enviro and mapmagic)

    p..s life gets easier when you implement worldspace UVs so I can just have one ocean object - currently I have to dynamically create and destroy ocean tiles...)
     
  48. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks Christian, I will look into the second option first as it suites me better. Many thanks
     
  49. JaelsonCavalcante

    JaelsonCavalcante

    Joined:
    Nov 11, 2014
    Posts:
    7
    Can someone please help me to solve this problem, Unity 2018.1.0f2 and 2017.4.3f1

    Screenshot_33.png

    Screenshot_34.png
     
  50. Hexalted

    Hexalted

    Joined:
    Nov 16, 2017
    Posts:
    23
    Hi, do you plan to make Aquas compatible with the HDRP/LWRP rendering pipeline in Unity 2018 ?
     
    P_Jong and JuanMaldonado like this.