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
    There's a child object on the UnderWaterCameraEffects object, it's called WaterLens. Scale it a tiny bit up on the x-axis and you should be fine. :)
     
  2. Belagar

    Belagar

    Joined:
    Dec 20, 2014
    Posts:
    10
    That did the trick thanks :)
     
  3. helgarddebarros

    helgarddebarros

    Joined:
    May 10, 2014
    Posts:
    169
    The Airlens and Waterlens are deactivated by default and most probably activated by the script. So I am not sure how to deactivate it.
     
  4. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Deactivate the AQUAS_LensEffects Script on the "UnderWaterCameraEffects" object, then you can disable the lens objects at will.
     
  5. pixxelbob

    pixxelbob

    Joined:
    Aug 26, 2014
    Posts:
    111
    Hey thanks for the follow-up @dogmachris appreciate it. Really looking forward to getting it working. I'll m surprised at the lack of zbuffer. I too hadn't considered that at all. Even more so with new devices eg. Nexus 5X which is only a few months old. Good job! Hit me with an APK if you'd like me to test.
     
  6. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Went to get a better angled shot of the water. I really like the way the water takes into account all light source colours, resulting in almost like a proper reflection of the flames in the torches :D

    screen_1920x1080_2016-04-27_17-59-01.jpg
     
  7. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    This scene is awesome! I really like it. It's just sad that Unity's shadows are so jagged in the foreground. I can suggest Shadow Softener which does a very good job at softening shadows.
     
  8. helgarddebarros

    helgarddebarros

    Joined:
    May 10, 2014
    Posts:
    169
    "Deactivate the AQUAS_LensEffects Script on the "UnderWaterCameraEffects" object, then you can disable the lens objects at will."

    Isn't that the same effect as disabling the UnderWaterCameraEffects? It works, the sky looks right.
     
  9. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    I have a tilemap-based game, and need water for the ocean/lake tiles. Aquas looked like a good fit, so I bought the LITE version to see if it would work.

    As a massive, world-spanning plane it works fine. But used on 1x1 unit tiles, it doesn't work at all. There seems to be no way of scaling the effects, so you get a tiny 1m x 1m slice of the mega ocean.

    Am I missing something, or does this just not work for tiled / map-based games, e.g. RTS?
     
  10. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    We're looking for people to beta test the integration between AQUAS and Landscape Builder. You need to already own AQUAS or AQUAS Lite. Basically, you can drop oceans, lakes, ponds etc. onto your Unity terrains and LB will take care of the setup for you. You can resize the water bodies and adjust height from within the inspector. It supports multiple lakes in a scene and multiple terrains.
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    What are the "border" prefabs for? The ones that are generated when you add Aquas to your scene with the editor dialog. They're big rectangular blocks that cause a visible artifact at the edge of the map (foam). For now, I'm just turning them off to get rid of extra foam.
     
  12. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Jaimi The borders are only required under certain circumstances. The background of this is, that fog - if not volumetric - requires geometry to receive it. Say you have an open water environment like an island scene without the borders, then when you go underwater, you'd see the skybox on the horizon, because it can't receive fog.

    That's where the borders come into play. Of course if you have a lake environment, you can confidently delete the borders, because when you're underwater in a lake, you're surrounded by the terrain, which can of course receive fog. Another thing to keep in mind is, that geometry receiving fog, must not be behind your far clipping plane, or else you'll run into the same problem.

    You can use a simple script to only activate those borders when you're underwater and deactivate them when you're afloat:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class MyCustomActions : MonoBehaviour {
    5.  
    6.     AQUAS_LensEffects myEffects;
    7.     GameObject borders;
    8.  
    9.     // Use this for initialization
    10.     void Start () {
    11.         myEffects = GameObject.Find("UnderWaterCameraEffects").GetComponent<AQUAS_LensEffects>();
    12.         borders = GameObject.Find("Borders");
    13.         borders.SetActive(false);
    14.     }
    15.  
    16.     // Update is called once per frame
    17.     void Update () {
    18.         if (myEffects.underWater)
    19.         {
    20.             borders.SetActive(true);
    21.         }
    22.         else
    23.         {
    24.             borders.SetActive(false);
    25.         }
    26.     }
    27. }
    Attach this to any gameobject in the scene and it will do exactly that.
     
    Last edited: May 3, 2016
  13. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Adding Aquas to my very old project. Amazing! New life for the old game.
    MyImage.jpg MyImage2.jpg
     
  14. sebastiansgames

    sebastiansgames

    Joined:
    Mar 25, 2014
    Posts:
    114
    Hi there! We bought aquas and it's really awesome... looks great! We have a large scene with a lot of water elements, and in profiler we're taking a decent hit on Culling>SceneCulling>CullSendEvents>AQUAS_Reflection.OnWillRenderObject()

    Is that being called every frame on every water object? Is there a way to optimize that further? We're using the mobile versions of the shaders but are still losing upwards of 9 ms which is a lot. Thanks for any thoughts!
     
  15. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @sebastiansgames OnWillRenderObject is called for each camera by each object that has a script calling this method. It's useful for reflections because it renders the reflection, before it renders the object that is reflecting. The reflection script runs a lot faster than say using relatime reflection probes, yet reflections are always somewhat costly.

    Generally the more reflecting objects you have, the bigger the performance impact (especially on mobiles), so to optimize that, you should keep the amount as low as possible. It might be useful for instance to use only one plane to cover multiple areas, if those areas all have the same water level. Also try reducing the resolution of the reflection texture. If that is still not enough, you might want to consider leaving reflections out in certain areas, if they're not neccessarily required (e.g. "dirty" water). To effectively turn off reflections on individual water objects, it's not enough to turn off reflections in the material settings, you also have to disable the reflection script.
     
  16. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    runningbird and montyfi like this.
  17. sebastiansgames

    sebastiansgames

    Joined:
    Mar 25, 2014
    Posts:
    114
    Okay that's helpful. Dang it's such a shame because the reflections really make the water come alive. But we have an ambitious scene and it's killing our framerate. I guess we'll have to live with it off. I guess I'll make a friendly feature request to optimize that culling if it's at all possible. With reflection probes, for instance, we just render them once at startup... we don't need realtime reflections at all. I wish a similar setting existed for Aquas. Like maybe the 'use reflections' parameter could have an additional 'use realtime reflections' option. Because do we really need reflection culling every frame if we don't need realtime reflections? Thanks again for your help and for your great plugin.
     
  18. Joe-Faith

    Joe-Faith

    Joined:
    May 4, 2016
    Posts:
    7
    Hi, I'm a first time Unity user, I just got Aquas and it's been great playing with it in my project. looks nice:) I saw mention of 'god rays' in the description. These would be very nice to add but where do I activate/adjust them?
    Thinking of adding another asset to deal with this but would be nice not to have to if they are there somewhere!
    Thanks for a great addition to my project.
     
  19. HungNguyen90

    HungNguyen90

    Joined:
    Apr 3, 2014
    Posts:
    4
    Hi ! I bought aquas and it's really awesome.But it only runs for desktop.
    when i build and run on my android,it doesn't work.
    It only work on deferred rendering path.
    Does it work on Forward rendering path?
    please help.
    p/s : sorry for my english.
     
  20. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Monte AQUAS works in forward rendering mode, but depth texture rendering is disabled by default when working on GL. Simply add the AQUAS_Camera script to your camera, then it should do.
     
  21. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Look in the inspector of the camera object. There should a component called SunShafts. Their visibility though does not only depent on the values chosen there, but also on the light source (system) that you use. When using custom sky systems, it might not work at all.
     
  22. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    Nevermind then, I'll ask Unity for a refund, and roll my own.
     
  23. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @a436t4ataf I'm so sorry, I simply missed your post. You can make tiles of water with AQUAS, and use as many tiles as you want. However AQUAS doesn't currently have a tile controller to reposition tiles at runtime. Please have a look at this tutorial to see how to make tiles:


    Sorry for the inconvenience. :(
     
  24. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021

    Could you not make a prefab of a water tile and then instantiate from the resources folder at runtime?
     
  25. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Prefabs for water are a bit shady, because there's no way to know exactly ho someone will want his/her water set up. The user would most likely end up editing the material to fit the exact needs - as most people do. Adding that material to a standard Unity plane takes only some seconds, so the creation of a prefab wouldn't be the time consuming part here. I think what would be useful here would be a script that can first instantiate a tile that users can create at will and then reposition them at runtime to always keep the water surrounding the player.
     
  26. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    Hi @a436t4ataf,

    I have a similar setup and plan on using this asset for my game. I did a quick test using the pro version making a tile approximately the same size as a 1x1x1m standard cube and cutting down the shaders waves tiling and speed properties by about 70% resulted in a nice small tile. I think that virtually still water is possible. By making a mesh the correct tile shape etc I am sure it will work for a tile based game.

    Definitely works for the pro verstion.

    Worth having a test.
     
  27. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    That's what I mean. Just let the user setup a prefab for each type of water required and use the instantiate at the correct vector3/node position :)
     
  28. brave_mike

    brave_mike

    Joined:
    May 8, 2013
    Posts:
    26
    Dear dogmachris,

    I have a short question - works aquas together with standard unity reflection probes - is the the water refelected correctly in the reflection probes?

    Kind regards

    Mike
     
    Last edited: May 11, 2016
  29. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Hi Mike,

    AQUAS's look can be affected by reflection probes and can also be reflected by them, BUT: since AQUAS is alpha blended the reflection probe might get the the render order wrong when reflecting the water, so if you want to reflect open water it shouldn't be a problem, but if you have other objects in the same image, the water might be rendered over everything else.
     
  30. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    runningbird and dogmachris like this.
  31. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Hi I'm getting some strange issues when using the standard Water Prefab with my particle effects, it's defiantly AQUAS causing the issues. When disabled the problem goes. Here is an image of the strange effects I'm seeing. Essentially the particles get turned into weird pyramid planes of particles that resemble sprite sheets. Very strange indeed, effecting most shaders I've tried too. Any ideas?

    https://www.dropbox.com/s/gtrrk2pts9ir32q/Screenshot 2016-05-14 15.56.09.png?dl=0
     
  32. Wizard-Games

    Wizard-Games

    Joined:
    Jun 4, 2013
    Posts:
    34
    Hi I recently purchased aquas and it looks great, however every so often i do seem to get some spikes in the profiler that seem to be related to aquas. I was wondering if perhaps this was a known bug or if I was setting something up incorrectly? I am just using default everything. Here is the drill down of one of the spikes.
    aqua question.PNG
     
  33. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Beloudest I'm not exactly sure, what's causing the problem. Are all particle effects affected by this or just certain ones? Also when you say "effecting most shaders I've tried too", which shaders are not affected?

    Are you using the underwater effects too?
     
  34. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Wizard Games that spike seems to be caused by the AQUAS_reflection script (on the waterplane). It's light-weight for realtime reflection, yet still the performance depends on what has to be reflected. Often times things that are being reflected have to be rendered twice, which makes the performance of the reflection functionality somewhat erratic. If you used the quick setup option, it should be set up correctly.

    If you want to get rid of those performance spikes, try reducing the resolution on the AQUAS_Reflection script. If that doesn't work, you might have to disable reflections completely.
     
  35. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    It may be (relatively) dark and gloomy in here, but at least the water's clean (or at least looks it) :D lol

    imgpsh_fullsize.jpg
     
  36. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Not that I know of, it may be best to send an example, possibly it could be the shader under my terrain with plane a stretched across my island. Can I send you an email. Maybe PM if your interested to see what's occurring. Thank you, product is good other then this oddity.
     
  37. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    @dogmachris, how to solve problem with tree creator trees billboards. Right now water is rendering on front of them, I want to get it other way around. Adding "Queue" = "Transparent-200" to water shader didn't helped. This trick does help with default water4, so I'm not sure why it isn't worked with Aquas water shader.
     
    Last edited: May 17, 2016
  38. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    @dogmachris, I've updated my project to 5.4.0 beta 17 and everything was fine until I upgraded to the latest Aquas package. I'm facing an error on the AQUAS_LensEffects.cs script:
    Code (CSharp):
    1. 'GlobalFog' is inaccessible due to its protection level    DRKNSS.CSharp    F:\Unity 5\DRKNSS\Assets\AQUAS\Scripts\AQUAS_LensEffects.cs    70
    2.  
    Anything I can do to fix it?

    Edit: it looks like the GlobalFog in Beta 17 isn't marked as public any longer.
     
    Last edited: May 17, 2016
  39. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @cygnusprojects Global fog is generally not marked as public, but the version you get within AQUAS has a public flag for the class. This can lead to confusion alright, when upgrading unity and including standard assets, then you have to take care of that again, which is a pain in the a... of course. I'll see if I can use System.Reflections for 1.3 to add the flag via script, when required - kinda dirty, but I wouldn't know any other way, except for doing it manually.
     
    Last edited: May 17, 2016
  40. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Gua Hm... setting the render queue down should help actually, I don't know, why it doesn't in your case. Try this:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. [ExecuteInEditMode]
    5. public class RenderQueueWaterEditor : MonoBehaviour {
    6.     public int renderQueueIndex = 2800;
    7.     void Update() {
    8.         gameObject.GetComponent<Renderer>().sharedMaterial.renderQueue = renderQueueIndex;
    9.     }
    10. }
    Add that script to the waterplane and play around with the renderQueueIndex in the inspector until you find a value that works. I thought about lowering the render queue for the water by default with the next update, because there's been some people who had this in the past, but I'm afraid that this might cause conflicts with other shaders.
     
    Gua likes this.
  41. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Beloudest No problem - I left you a PM.
     
  42. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    @Beloudest no problem - I left you a PM.
     
  43. MGS-Shawn

    MGS-Shawn

    Joined:
    Jan 3, 2013
    Posts:
    3
    Just purchased Aquas and after import there is nothing in the windows drop down to add the wizard as per the manual. Using latest version of Pro
     
  44. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Have a look at your project window. There should be a folder called "Editor". Inside this folder at the top level there should be a file called "AQUAS_QuickSetup.cs". Is it there?
     
    Last edited: May 17, 2016
  45. Wizard-Games

    Wizard-Games

    Joined:
    Jun 4, 2013
    Posts:
    34
    The problem seems to be rooted in the dreaded terrain.details.buildPatchMesh. Is there a way to just not draw details?
     
  46. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Script helped! Thank you very much!
     
  47. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    @dogmachris, Weird. Previously only your script worked. Now only changing Queue directly in shader works. Which isn't great cause now I planned to dynamically change Queue for water when I'm underwater, to solve issue with billboards when I'm underwater.
     
    Last edited: May 18, 2016
  48. MGS-Shawn

    MGS-Shawn

    Joined:
    Jan 3, 2013
    Posts:
    3
    Yes there is.
     
  49. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Uhm... weird. What I can see though is that you use negative values for the script, but the render queue number should be positive to work properly. When you set it to -1 it uses the render queue from the shader. So what if you use something like 2000?
     
  50. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,375
    Ah - are you by any chance using Gaia and if so, are you using a Gaia version < 1.5?