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. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Yes, the river feature is definitely something the will continue to grow.
     
    hopeful likes this.
  2. Dreamer

    Dreamer

    Joined:
    Mar 8, 2011
    Posts:
    67
    I'm using v1.4.2.
     
  3. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    I'll send you a PM shortly, I'll check into it.
     
  4. ricogs400

    ricogs400

    Joined:
    Aug 4, 2017
    Posts:
    13
    Not to beat a dead horse, but so I can plan my maps better, do you have a plan to fix the single pass stereo issue for VR or maybe figure out a workaround? I would love to have AQUAS in my maps because many of my ideas are with water in mind. I don't want to have to take out single pass stereo because of its performance gains.
    Thanks
    p.s. 2.0 preview looks really good.
     
  5. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    No, you're not beating a dead horse here, I do have a plan to fix SPSR reflections for VR. In fact since AQUAS's shaders are slowly but surely growing a bit old, I'll have to rewrite them completely, which I will probably do in one pass with the development of AQUAS 2.
     
    Rowlan likes this.
  6. ricogs400

    ricogs400

    Joined:
    Aug 4, 2017
    Posts:
    13
    Excellent, thanks for the reply and I'll keep an eye on how things develop.
     
  7. Hi @dogmachris, I'm happy to see that Aquas will grow and get a 2.0 version. I have two feature requests for that, which I may build upon in the future if it appears: first of all, it would be beneficial if the river would work with carved meshes. I'm working on a tile-based TBS and I intended to use AQUAS as the water-solution for it, but since I can't setup a river without a terrain, it does not work, since I will have to write custom shaders for my river, I need to keep all the waters in the same-ish style, so I will have to repace Aquas with custom shaders as well.
    Also it would be beneficial if you keep the current style and colors as presets as well, maybe you can add beach waves like the water in the CIV. It's just a small addition and some animation, like this:
    (around 19 minutes, on the left, near the beach).
    Aquas is lightweight enough to use as a water solution in a game like this, so it would be awesome to have it in 2.0 as well.
     
    blitzvb likes this.
  8. tspree15

    tspree15

    Joined:
    Oct 25, 2011
    Posts:
    35
    I'm having trouble creating an ocean scene with waves, can you please explain the best way to do this? Thanks
     
  9. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Hi there,

    After upgrading to Unity 2017.2.0f3 (also present in the patch versions of this version of unity), I'm getting an error:

    "Shader error in 'AQUAS/Mobile/Opaque': Too many math instructions for SM2.0 (85 needed, max is 64). Try #pragma target 3.0 at line 145 (on d3d9)"

    I notice another couple of users having a similar report, is there a workaround / fix I can apply for this? (Doing as the error message suggested didn't go so well)
     
  10. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    AQUAS is actually flat, and doesn't have physical waves, only surface effects.
    physical waves are currently under development.
     
  11. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Weird - I'll look into it and get back asap.
     
    andrew210 likes this.
  12. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    You don't need a terrain to have a river with AQUAS. In the demo video where the river runs through the town, there's no terrain in the scene. A terrain is only needed for the quick river setup, just because it's easier to set up this way than manually. You can of course still set everything up manually without having a terrain, but I realize, it can be tedious. A workaround may be to just temporarily add a terrain, then use the river setup to add water with all its features and then remove the terrain again - that should work.

    I've answered your question on AQUAS 2.0 on the WIP thread too btw. ;)
     
  13. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    In Unity 5.6.3f1 I added AQUAS to a scene containing a small island (terrain), and an Invector third person controller character. I used the quick setup and all seemed to go well, except I noticed that when I clicked to add the underwater effect that a line appeared in the distance on the water. The line persists during Play. Other than the line, the water and underwater effects appear to function as expected.

    How do I get rid of that line?

    Line in AQUAS.JPG

    EDIT: I suspect that the line is the edge of the terrain, which became visible with the addition of the underwater effects.
     
  14. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    I suspect it might be caused by the borders that are used to render fog on in open waters. If you have a closed lake, you can remove them. Does that solve the issue?
     
    wood333 likes this.
  15. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    As you suspected, the line is caused by the borders, but when I disable them, underwater, I can see light in the distance through the gap between the surface and terrain. If I keep the boarders I can adjust them so no light gap is visible underwater, but then the line is visible. I have not found a way to adjust the borders so the line goes away. I may attempt to make the terrain into more of a bowl, but the first time I attempted this, there were still some underwater gaps that seemed to require the borders.

    This may only be an issue for small terrains, which is how I tested AQUAS, but I would prefer not to have to make extra large terrains to accommodate AQUAS.

    Other than this issue AQUAS is working fine. I have weather maker in the scene, and it has four sliders included specifically for adjusting AQUAS reflections (especially from their sun). The sliders appear (in the inspector under extensions) when Weather Maker senses the presence of AQUAS. You may consider looking into this (there's a vid on this in their unity forum), and adding Weather Maker to your list of integrations on you asset store page.
     
  16. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    I have a question about performance on Android. I have download the apk demo from the asset store, and your updated AQUAS_Demo2.apk and they both run terrible on my Note 2, about 7-9 FPS. They also look awful. Is this is what is expected? I am looking for a mobile friendly ocean effect, do you have something like that?
     
  17. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    So I was testing out Aquas in unity 2017.2 using single pass rendering and the forward renderer in VR.

    I'm in the demo Lake scene. I deleted the reflection script on the water and also turned it off in the shader as this doesn't work in VR or run good. So the reflection works off the reflection probe instead. It's cheap and runs the best this way. The transparency when the water hits the terrain edges looks good. The only problem I am seeing is when the water hits the terrain edges the terrain underneath the water looks strangely way lower then what you see in desktop mode and you dont see it in unity looking at it in run mode only in the headset. It's like the ground underneath the water has this depth that is way lower then what is actually there. Have you been able to or anyone see what I am seeing in single pass VR?
     
  18. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    AQUAS still broken in Single Pass VR :(
     
  19. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    You could adjust the borders to work well when underwater. Then you can write a little script to enable the borders only when you're underwater and have the otherwise disabled. See this video for instructions on using your own code with AQUAS:


    Does this help?
     
    wood333 likes this.
  20. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    You can swith between various water setups to test the performance. Is the performance as low for all provided setups?
     
  21. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    Will Aquas 2 be a new paid version or we get the update? Other than that, are we wait any updates on the current version? still getting some errors on aquas when you delete something from your assets etc. I know you said they are harmless but... well they are annoying :)
     
    Rowlan likes this.
  22. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    It will be a new paid version, however everyone who previously owned AQUAS will get a grace time during which they can also get the new AQUAS for free. Both packages will get updates of their own. AQUAS as it is right now, will not be removed.
     
    Vondox, Shodan0101, SSL7 and 3 others like this.
  23. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    I'm using Aquas with Enviro and Lighting Box 2. First I had no idea why my lighting settings weren't applied. Until I noticed that the aquas underwater camera effects swap postprocessing profiles. It would be great if that could be mentioned in the wizard where you add the underwater effect.

    The problem I have now: My dragon looks okay on top. But under water it's just white. I know it's hard to say from a screenshot, but any guess what could be wrong? Also the land under the water is white. Looks like this:

    water.jpg
     
  24. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    Never mind, I figured it out. I knew about the Aquas integration, but thought it would all be automatic. I had to drag the Aquas waterplane to the Water Object property of the Enviro Aquas Integration script. The combination of both assets is very awesome imo.

    aquas-integration.jpg
     
    dogmachris likes this.
  25. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Just a note about this issue, I switched the graphics api to be OpenGL and it then built fine but wouldn't build using Direct X as the default graphics api (building with Unity 2017.2.0p2)
     
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    @dogmachris - Aquas can throw an error during compile time (when unity decides to reload assemblies) in aquas_removedefine.cs. You can fix this error by checking if "symbols" is null on line 17:

    if ((!string.IsNullOrEmpty(symbols)) && symbols.Contains("AQUAS_PRESENT"))
     
    camta005 and dogmachris like this.
  27. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Had an error with Aquas when using with World Creator. Fix is described below.

    When I regenerate my World Creator terrain (while editing,) it deletes an object and Aquas objects because of the below code. Reading the code, it seems to have an error: "symbols" is assigned in the first "if" statement and then used in the second whether it has been assigned or not.

    The intent seems to be "remove Aquas defines if it is being deleted" but the way it is written is "try to remove Aquas defines when anything is deleted."

    I fixed it by moving the second "if" inside the first. Could not find a path where that would not be the correct approach: removing aquas defines when a non-aquas object is deleted seems like a bad idea.


    using UnityEditor;

    namespace AQUAS
    {
    public class AQUAS_RemoveDefine : UnityEditor.AssetModificationProcessor {

    static string symbols;

    public static AssetDeleteResult OnWillDeleteAsset(string assetPath, RemoveAssetOptions rao)
    {

    if (assetPath.Contains ("AQUAS"))
    {
    symbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);


    }

    if (symbols.Contains("AQUAS_PRESENT"))
    {
    symbols = symbols.Replace("AQUAS_PRESENT;", "");
    symbols = symbols.Replace("AQUAS_PRESENT", "");
    PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, symbols);
    }

    return AssetDeleteResult.DidNotDelete;
    }
    }
    }
     
    dogmachris likes this.
  28. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    When using Aquas 1.4.2 with Enviro and terrains, the silhouette of foreground objects (between camera and Aquas shader surface) shimmers/jitters.

    The artifact disappears when the terrain is hidden. And it's more pronounced when the Aquas surface refraction parameters are increased. Turning off (or on) the 'Enviro Aquas Integration' script has no effect.

    Has anyone seen this, and is there a solution?

    To configure Enviro with Aquas I'm just doing the following:

    - Select ‘component -> Enviro -> integration -> Aquas integration’
    - Drag water plane to the integration script channel

    Separately, what constitutes the Aquas-Enviro integration?

    There isn't anything in the documentation or forum that I can see that spells that out -- it's seem Aquas support is limited to Enviro fog, but as above, I don't see any difference with or without the script in fog, or anything else. What should I be seeing change with and without the script active?
     
  29. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    dogmachris and BackwoodsGaming like this.
  30. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    DirectX9 or 11? AQUAS does work with DX11, due to some data types, that are not available in DX9.
     
  31. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Last edited: Nov 20, 2017
    BackwoodsGaming likes this.
  32. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    Thanks @Rowlan and @dogmachris,

    I updated the shader as instructed, but it didn't resolve the edge artifact I'm seeing, shown below.

    When the terrain node is off (below, left) all is well -- the character renders with a clean silhouette against the water shader.

    When the terrain node is active (below, right), Aquas seems to be treating the character perimeter as shoreline, with dynamic refraction-like rippling around the character that is clearly related to the shore transition (also shown):



    Has anyone seen this before?

    A few notes:
    - Unity 5.6.4.f1
    - Aquas 1.4.2 with 'AQUAS/Desktop and Web/Double-Sided/Triple-Textured Bumpy ENVIRO' shader
    - Enviro 2.0.0
    - The hero character above, the terrain and the water are all on their own Unity layers -- the Aquas geometry is on the 'water' layer
    - Aquas render queue index = -1 (manually setting values had no impact)
     
  33. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Now I understand what the issue is. I'm afraid there's not much you can do about it except either reducing the refraction a bit or the depth transparency. The reason for this is, that AQUAS grabs the current screen color to refract whatever is below the water. Since it's alpha-blended though, it can't know whether the color it grabs is currently below or above the water, because AQUAS can't use the z-buffer.
    In Unity's rendering pipeline the z-buffer is fortunately priorized before all render queues, so your bird - which I assume has an opaque material on it - doesn't get refracted up in front, but it is rendered in a distorted manner behind. The silouhette of the wing distorted on the ground below the water, that's what you see.

    I guess a solution to this would be to tie the refraction to a certain distance from the camera and turn it off, if an objet is too far away, but that would only help in that fringe case - in situations with objects close to the water, I don't see how this can be adressed, but I'll add a refraction distance property to at least help out with distant objects.
     
  34. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    Thanks @dogmachris for the fast and very comprehensible reply!

    I'm happy to say that your proposed refraction distance term would resolve the artifact for me -- I don't need to render the bird very close to the water surface.

    I'm surprised that Aquas has reached maturity without addressing this, it can't be uncommon to have a object render atop the water surface and the effect is pretty striking -- it really draws the eye and not in a good way. ;-)

    Thanks for offering to add the fix, and thanks again for your fast reply. I'll be happy -- eager, really -- to test if you want to send me a WIP build, my email at insightdigital.org is 'kevin'.
     
  35. Candac59

    Candac59

    Joined:
    Sep 18, 2015
    Posts:
    106
    Hi all :) any solution for integration with Unistorm ?
     
  36. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello I have a question why there is no one sided shader for rivers? I dont need underwater effects and double sided shader there is waste of calculation I think. is There chance for one sided river shader?
     
  37. danteswap

    danteswap

    Joined:
    Oct 27, 2013
    Posts:
    164
    Hello Guys i am New Here Just Bought This Amazing asset , My Project is Mobile Based Mainly Android , So I Checked out The Demo Apk And It was Good There , But On My Actual project The Performance get Down When Using This Asset , My Current Scene Currently Tops At 300 Draw Calls And 200k Tris , But Ass Soos As I Use Aquas The Draw Calls Go Over 600 and triangle count over 450 , as you can see this is too much and as a result its to costly , There is no option to say setup for mobile or so , now plz tell me what can i do to optimize this , as i don't know what to do i replaced the shader from desktop to mobile but still no luck getting it under control.
     
  38. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    I use unity 2017.1.0f3 Personal, i have a clear project when i import Aquas i got this error ?
    Can anyone help me ?

    ullReferenceException: Object reference not set to an instance of an object
    AQUAS.AQUAS_RemoveDefine.OnWillDeleteAsset (System.String assetPath, RemoveAssetOptions rao) (at Assets/Editor/AQUAS_RemoveDefine.cs:17)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.AssetModificationProcessorInternal.OnWillDeleteAsset (System.String assetPath, RemoveAssetOptions options) (at C:/buildslave/unity/build/Editor/Mono/AssetModificationProcessor.cs:226)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  39. Xefier

    Xefier

    Joined:
    Dec 22, 2012
    Posts:
    80
    I'm using Post Processing Stack v2 which is not compatible with Aquas (Compile errors). Could you release a version that is compatible with Post Processing Stack v2?

    Assets/AQUAS/Scripts/AQUAS_LensEffects.cs(5,19): error CS0234: The type or namespace name `PostProcessing' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?

    Assets/AQUAS/Scripts/AQUAS_Parameters.cs(4,19): error CS0234: The type or namespace name `PostProcessing' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?

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

    Assets/AQUAS/Scripts/AQUAS_Parameters.cs(18,16): error CS0246: The type or namespace name `PostProcessingProfile' could not be found. Are you missing an assembly reference?

    Assets/AQUAS/Scripts/AQUAS_Parameters.cs(19,16): error CS0246: The type or namespace name `PostProcessingProfile' could not be found. Are you missing an assembly reference?
     
  40. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Infinite water?
     
  41. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    I don't know if there's one or not. I haven't been in contact with the developer of Unistorm. I know Enviro has one and weather maker apparently has one too (I didn't know until recently). AQUAS however provides an interface for integration in form of a define, so basically anyone can access it.

    I've heard of issues with AQUAS and Unistorm in the early stages, but it has been quiet on Unistorm with AQUAS for quite a while now, so I guess it might work just fine. Feel free to try, it's risk free. ;)
     
  42. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    It's made up this way, because most people who need a more sophisticated river will likely want to be able to dive into it. It's easy to cull the backface however. In the shader the Cull is set to Off. Replace "Off" by "Back" and it should do as you wish. I can do it for you later today and send it to your via email, if you want, just send me your invoice number.
     
  43. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    This is most likely caused by realtime reflections. Reflected objects effectively have to be rendered twice, that's probably why your draw calls and your tris increase that much. Try putting everything you don't need to be reflected on a separate layer and exclude that layer from being reflected in the reflection script.

    If you have tons of trees on your terrain, you can duplicate the terrain, delete all tree objects and then use that terrain for reflection. This way your terrain stays the same, while the reflection shows only the terrain without trees which should save you a lot of draw calls. Another thing to try is to slightly incrase the pixel error of your terrain to a level that is still acceptable.

    Are you using caustics? Keep in mind that they too cause a draw call for each object they're cast on.

    As a side note: You can greatly increase performance by slightly reducing the maximum resolution of the normal texture to a value that is still acceptable.

    Does this help you?
     
    nirvanajie and syscrusher like this.
  44. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    That's tedious - but harmless - I'll try to have an update ready this weekend that will - among other things - get rid of this issue. Meanwhile - if you're not using enviro - you can delete the AQUAS_RemoveDefine.cs script form the Scripts folder - it'll do no harm.
     
  45. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    I'm only using the latest PP stack that Unity offers on the asset store, haven't played around with the github version - will do though and get everything sorted - hopefully all by this weekend.
     
    d1favero likes this.
  46. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    AQUAS doesn't currently use world space UVs, but you can achieve the effect of an infinite water by using tiles as shown in this video:



    For an infinite ocean however this approach will also require a script that rearranges the tiles to have the center tile always positions below the camera.
     
  47. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    would it eat alot of fps ?

    Im using Gaia too, and ufps.. just wondering about the camera tracking? would it find it ? I just grabbed this asset when its on sale now so I didnt read anything really.. just that performance overall is good.
     
  48. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    I will use enviro in my project
     
  49. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    My water has gone invisible, its quite an old version, has anyone else seen this ?
     
  50. Dragonlord_DRM

    Dragonlord_DRM

    Joined:
    Jan 26, 2017
    Posts:
    7
    Hi dogmachris,

    I just purchased your AQUAS asset and everything is as awesome as advertised!

    You have certainly simulated water that delivers great beauty and flexibility with a low impact on frames per second. :cool:

    Now I have perhaps a simple query...

    Setting AQUAS up in a scene with the player and camera already present is straight forward and can be done easily by following your detailed instructions however I seem to be having some trouble getting everything to work with the same character and camera when I spawn them into the scene. (i.e. The character is a Prefab and the Main Camera is attached to it as a Child Object - For a Third Person Point of View)

    In particular, the Underwater Camera Effects seem to break when spawning the character into the scene even if the UnderwaterCameraEffects prefab is still attached to the camera.

    Have I just missed something?

    Please advise at your earliest convenience.

    Many thanks,

    DL