Search Unity

  1. Unity 2019.1 is now released.
    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. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    936
    I've made some additional progress here, which is good, but it's led to some further questions.

    First, I don't need underwater cameras, so I switched from the double-sided to single-sided shader. That isn't a total fix, but it did help.

    Second, I've ruled out the water plane mesh as a source of the problem. I checked its poly count and found that it's quite reasonable. Also, replacing it with a Unity-provided Plane doesn't change anything.

    Third, the AquasReflection component seems to be the area of concern. What I observe is that I can change the overall poly count enormously by turning that component on and off, and it's related to how many objects are in the layer(s) being reflected according to this component's culling mask. I started with about 30 million polys in the scene, with a newly-created water material using the 1-sided shader. When I added my default layer to the culling mask for AquasReflection, the scene poly count jumps by about the same as the total polys in the default layer (about 20 million) per water plane. Disable the AquasReflection component, and the poly count goes down. Interestingly, removing the default layer from the culling mask with the component still enabled has no poly count effect.

    I suspect what's going on is that I'm somehow having this component try to reflect every poly in the applicable layers of the scene. I see an option to "ignore occlusion culling", but i have that disabled. Just about every object in the scene is occlusion static, and I have rebaked the occlusion quite often.

    Any idea what I'm doing wrong here?
     
  2. TabiqueMalevolo

    TabiqueMalevolo

    Joined:
    Oct 28, 2017
    Posts:
    4
    Hi! I bought aquas and am pretty happy with it. My only problem seems to be that it doesn't work well with depth of field effects. As you can see in the screenshots, the depth of field settings work fine with 3d meshes but everything gets weird when using it with aquas, am I doing something wrong here? Is there a workaround? I'm just learning unity btw https://imgur.com/a/w4n9X
    Thanks!
     
  3. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    196
    You can convert any of the double-sided shaders to single sided by opening the shader file in a text editor and changing 'Cull Off' to 'Cull Back'.

    Reflections have a significant impact on performance as you discovered. There is a suggestion here about how to improve this:

    https://forum.unity.com/threads/aqu...le-vr-web-desktop.378519/page-28#post-3299033

    However, I find with the triple-textured shader you can get away with turning off reflections. Just have a play around with the Specular, Gloss and Light Wrapping values of the shader and the intensity of the reflection probe attached to the water plane. Make sure the reflection probe is set to only update on awake, or set it to bake. You'll find you can get some nice results with no noticeable performance hit compared to if reflections are on.
     
    Last edited: Feb 2, 2018
    dogmachris, nirvanajie and syscrusher like this.
  4. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    936
    Great reply, and thanks!

    I didn't realize my reflection probes (which I made a standard part of my water plane prefabs) could take the place of the realtime reflections from the water. I'll definitely experiment with that! I thought Aquas needed the probes in addition to its own reflection feature. My probes are already baked, which as you say did help somewhat. In this scene I don't care about reflecting anything that moves; all the reflected objects can be static.

    I looked at the post you cited, and thanks for that also. My own Google searching hadn't found that one yet. Noting the comment about caustics, I don't really need those, because the location of my water planes, relative to light sources, is such that caustics would be barely visible anyway, if at all. I'll make sure those are disabled entirely.

    Again, thanks for the excellent reply.
     
    dogmachris and camta005 like this.
  5. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    936
    Update: This technique is working pretty well in my scene. It isn't quite as pretty as the Aquas reflection, but it's good enough for what I'm doing. The performance has jumped from 7.8 FPS to 42 FPS for me, and my target is 30 FPS so we're good to go. Thanks again for the suggestions!
     
    camta005 likes this.
  6. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    177
    Q1: Non-uniform Foam on non-uniform geometry
    I'm having an issue with non-uniform scaling of the foam layer.

    My ocean geometry is a non-square rectangle that is really long.

    All the bump maps scale properly, keeping their square aspect ratio.

    The foam, however, is very stretched in the long axis.

    Is this easily fixable? It's making foam unusable.

    Q2: can I use a square that moves with my boat as ocean geometry? This would be ideal but would require that the textures all be UV offset as the boat moves. Haven't tried yet, thought I'd ask first.
     
  7. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    177
    Hmm, squared my ocean to fix the foam. Since it's mostly offscreen no bother.

    This scene with triple-textured desktop ocean shader runs over 100fps on iPhone X.

    Thanks for the great asset! Looking forward to the ocean.


    upload_2018-2-4_0-20-59.png
     
    dogmachris, syscrusher and camta005 like this.
  8. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    114
    Hey there,
    Finally bought the full version. The only reason right now was to have a water that works correctly with the fog.
    So, I haven´t read the whole documentation yet and maybe I´m to stupid in general, but this does not look like it would work, right ? :) And it doesn´t matter if I use enviro or not, I can´t get what I want with the unity fog either.



    What do I need to do that have the fog rendered above / before the water ?!

    Thanks for your time and this otherwise great asset !
     
  9. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    114
    I have one strange reflection in the build version that is not visible in the unity editor. First I though distance tiling fade, but everything seems allright. Do I need to change some settings in the player ? I´m using forward rendering in gamma space.



    Otherwise, really loving it now after I disabled all height fogs and sunshafts in enviro :/

    Edit: Two more shots where (whatever is is) is very visible: https://imgur.com/a/9XRHK
     
    Last edited: Feb 6, 2018
  10. goran_okomotive

    goran_okomotive

    Joined:
    Apr 26, 2017
    Posts:
    23
    Dear @dogmachris

    Is there any way that your shaders create NaNs in the buffer? Unity's Post Processing Stack's Bloom and TAA effect have quite problems to handle NaNs and these effects generate a terrible artifact all over the screen: https://github.com/Unity-Technologies/PostProcessing/issues/337

    According to the devs, the problem occurs mostly because of faulty object shaders or geometry.
    I get the problem as well in combination with the "Desktop and Web/Double-Sided/Double-Textured" Aquas shader.

    Thanks for any hint.
     
  11. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    936
    Oh, bless you for posting this link. I am having exactly this problem, and my artifacts even are the mid-sized squares that look just like one of those screen shots! I have been tearing out my hair -- figuratively, because actually I'm bald -- trying to pin down what was wrong with my video driver. Originally I thought it was a z-buffer issue because I have several large transparent objects that sometimes overlap visually, but I couldn't figure out why I never saw the artifacts in a different part of my scene that has similar objects.

    I'm using both Bloom and TAA from the Post Processing stack. This all makes perfect sense now.

    Thanks so much for saving me hours of frustration!
     
  12. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    I'm not sure, how AQUAS could do this? After all, the part of the cube that is afloat isn't blurred out either. Besides, the depth of field has been tested and used in the demo video among other things. Does it work as expected, when disabling the water?
     
  13. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    Thank you for taking the time to help while I was away! :)
     
    camta005 likes this.
  14. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    The shaders shouldn't create NaNs. I've read through the issue thread on github, but couldn't find anything that would point me in the right direction. Integration with the PP stack v2 is currently what I'm working on though, so I guess I will have to adress this issue rather sooner than later - if it occurrs on my end that is (it didn't with the v1 PP stack).
     
  15. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    You may also want to increase the tiling on the foam, to get a better look.
     
  16. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    I'm not sure if that's a reflection or if it's only the look of the surface due to its consistency. does that "line" stay there when you move the camera or does it seem to move along with it? If it stays where it is, if might be due to another object in the scene. See if anything changes when you move the terrain objects then. Does that do anything?
     
  17. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    Aside from the other hints you got, there are some things to tweak on the realtime reflections:

    The performance impact of reflections strongly depends on how many objects have to be reflected. If you have a lot of objects in the scene that don't neccessarily need to be reflected, you might want to put them on a separate layer and exclude that layer from reflections (in the inspector of the waterplane).

    If you have a lot of trees and mesh plants on your terrain, you cannot put them on a separate layer. In this case you can duplicate the terrain, delete all plants from the duplicate and put it on a separate layer. You can now exclude that layer from being rendered by your main camera and at the same time set it to be the only layer reflected by the water. This way you can have the terrain reflected without all the plants, which should give you a performance boost.

    Also have a look at the inspector. There you can reduce the resolution of the reflection texture. Usually small resolutions will already produce satisfactory results, since the reflections are usually distorted, so that the reduced resolution isn't noticable.

    Please let me know if this helped.
     
    syscrusher likes this.
  18. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    936
    Good tips, thanks.

    My scene doesn't use a Unity terrain, but instead is built on a Voxeland terrain object (non-infinite, static size). I'm not using Voxeland's vegetation placement, but instead am hand-placing the plants (it's a small enough area to do that, and a relatively non-verdant environment). That being the case, my foliage is already on a non-reflected layer, but the Voxeland itself is fairly intricately sculpted (read: a lot of polygons) and therefore is the main cause.

    That does give me an idea, though. I have two different situations for my water pools. One pool is underground, in a cave, and there are just a few fungi near the water. I may experiment with putting those few fungi onto a layer apart from the other foliage, and then reflecting only that small number of plants and not the terrain. This might give me an intermediate quality level where I get some reflections but don't kill performance.

    The surface water is less of a problem, because there I might be able to get away with reflecting only some in-scene light emitting objects (basically, the equivalent of street lamps) and nothing else, again to visually suggest a reflection that is not actually there.

    I'm buried with other work this week and may not get to work on this scene until next week, but wanted to let you know I saw your post, and to say thanks. I'm not ignoring you. :)
     
    dogmachris likes this.
  19. ch0kk0

    ch0kk0

    Joined:
    Jan 20, 2016
    Posts:
    31
    Hello,
    I want to use Aquas in a RTS style scenario.

    I've been using projector method to highlight selected units on land:
    http://hyunkell.com/blog/rts-style-unit-selection-in-unity-5/

    Is it possible to do this for units on Aquas water ? At the moment when i select units on the Aquas water, the 'selection' circle is not visible. Just wondering if there is something i need to tweak on the Aquas water, or use another method such as attaching selection sprite to the unit that is selected.

    ta
     
  20. TabiqueMalevolo

    TabiqueMalevolo

    Joined:
    Oct 28, 2017
    Posts:
    4
    Thank you for replying! It seems the depth of field effect has problems with transparencies and takes the terrain and not the water texture as the object to... apply the effect. I could get some sort of workaround to this. Btw I saw in the comments of the Aquas tech demo that you can send the Wake Particle effects. Is it possible I could get a copy? It would be very helpful! Thanks!
     
  21. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    177
    Hi, I had a happy accident in that I was using cube to stand in for my boat and this created a foam around the cube that, when the cube moved, looked like a credible mini-bow-wave.

    I wonder if there's anything you're considering that would make it easier to use edge foam for wakes? Could be done with spherical volumes or...?
     
  22. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    177
    This blurry version animates really, really well across low reefs. Looks more like waves spraying than foam. I'd love to be able to use this effect around the bow of the boat - wondering about using an "apron" beneath the water on the boat to activate the foam in an area around the bow. Don't know how to make it drive the foam without also making the water look shallow, though
     
  23. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    223
    Hello i have a Problem,

    I have a create a littel Scene with Rocks and AquaWater,when my Player is underwater i see the skybox.See on my Screenshot,give it a way to fix that ? problemUnderwater.JPG problemUnderwater.JPG
     
  24. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,031
    You can set your underwater fog to include the skybox if you use a post processing profile. Otherwise it will look like that unless you put something in the way of the sky box. Spawn a cylindar to follow the player for example.
     
    dogmachris, hopeful and Pandur1982 like this.
  25. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    223
    Thx work perfect for me with deffered on postp. :D
     
    dogmachris, hopeful and malkere like this.
  26. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,031
    aquas6.jpg
    I can't seem to get these to blend with any of the available settings. I use a second camera to render distant objects on a lower scale. You can clearly see where the "near" camera's render ends. In this shot I've even applied the same material to both planes. They are both the same size. This is using Enviro. What's different is the camera angle. Because the background shot is at 1/16th the scale, the background camera is 16 times closer to the water. I've tried smoothing the normals and some things, can't wrap my head around it though. ?

    I'm fine with losing some quality if I can get the two to line up better.
     
  27. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    AQUAS is alpha-blended, thus it can't receive projections. It should work, when setting the blending mode to opaque, however this would have lots of negative side effects, such as the foam gone, no more depth transparency and no color absorption, which is basically most of what makes water look the way it looks.

    I would in that case go for a method such as attaching a quad to the unit to be highlighted. That quad can have a cutout shader on it that displays whatever you want, leaving every other part of the quad transparent.
     
    ch0kk0 and syscrusher like this.
  28. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    Sure, send me an email or a PM with your email adress.
     
  29. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    The easiest way would probably be to use a particle system, but building it right into the shader to make edge foam act as a wake may turn out to be not as simple as it may sound. I'll see if I can do it though.
     
  30. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    It seems like you don't have the borders in place. Usually when setting up AQUAS it also sets up a set of borders around the water. This is because fog needs a surface to render on. By default it doesn't render on skyboxes, that's why the borders are neccessary. You can enable fog to be rendered on skyboxes too in the lighting settings for the scene, however this will also make it impossible to see the sky from beneath´the water surface - your call.

    If you just want to get the borders in the right place, best would probably be, to simply readd the water to the scene via quick setup. It usually positions the borders in the right place automatically.
     
  31. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    To be perfectly honest, I don't see how you could make them blend in smoothly if the camera angle is different. It's inherent to water to look different when looked at from different angles. Do you see any way to exlude the water from that approach and instead have it rendered by your "near" camera?
     
  32. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,031
    Shader code is about my worst subject. I was hoping maybe there was some math in there I could force the angle within a shader? Sound possible? Or perhaps not use the skybox but a solid color for reflection (I have all reflection turned off, but you know what I mean). I'd be willing to sacrifice that sunrise gleam if there is a way to go about it. If not... I'll think about it in another month or two XD
     
  33. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,044

    May I ask why you even do this?
     
  34. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,044
    Hello @dogmachris !

    Have you made Aquas friend with pps2?
     
  35. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,031
    This allows you see over 50km of fully procedural landscape in my game including points of interest and player built structures. Rendering them on one camera would only be possible with massive LOD stiching which I just don't have right now. Hoping Terrafirma opens up some new doors in that area.
     
  36. IIporpammep

    IIporpammep

    Joined:
    Aug 16, 2015
    Posts:
    27
  37. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    Right at it. If everything goes well the update should be ready in just a few days. As soon as I'm close to updating, I'll post about all features and fixes that come with the update.
     
  38. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,044
    Cool! Sounds awesome:)
     
  39. Darkap

    Darkap

    Joined:
    Jan 4, 2014
    Posts:
    29
    When I create a new scene the water works, but as soon as I delete the directional light the water becomes invisible and creating a new directional light does not bring it back.

    I'm on Unity 2017.3.0f3
     
  40. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    127
    Hello, does AQUAS support water decals?

    Such as the plants on the water surface in the bottom half of this screenshot from Hunt: Showdown:

    https://s5-allgamesdelta.s-ul.eu/fFVoWPdw

    Or, like the feature advertised as:

    'Water Decals (Projectors)
    Projects textures onto water surface, enabling creation of leaves, dirt, oil spills etc.'

    from a different Unity water asset.
     
  41. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    146
    Im having some trouble when trees billboard the white is Aquas weird trees.png
     
  42. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    196
    Attached to the aquas water plane is a component called "Aquas_Render Queue Editor". Change the render queue index value to something like 2800. The default value of -1 uses the value assigned in the shader which is 3000, so if you are having problems try experimenting with values lower than 3000.
     
  43. tork12

    tork12

    Joined:
    Dec 16, 2017
    Posts:
    37
    Using Invector Third person controller with swimming addon. When character is partially submerged in Aquas water, an extra reflection occurs around the character. It's not too bad in the pool, but if the bottom is light sand like in an ocean scene it's very noticeable. I've tried everything I can think of so hoping somebody here can help.
    Aquas2.PNG
     

    Attached Files:

  44. mik52

    mik52

    Joined:
    May 10, 2015
    Posts:
    2
    The waterlens is displayed as soon as the scene starts, even when i'm nowhere near the water.
     
  45. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    407
    Hello. Aquas looks fantastic, but I'm seeing some strong blinking (attached). How to get rid of it? Thanks!


    PS. Also, I'm getting a lot of errors like this:
    PPtr cast failed when dereferencing! Casting from Texture2D to Material!
    UnityEngine.Camera:Render()
    AQUAS_Reflection:OnWillRenderObject() (at Assets/AQUAS/Scripts/AQUAS_Reflection.cs:100)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     

    Attached Files:

    Last edited: Mar 5, 2018
  46. spso

    spso

    Joined:
    Oct 11, 2017
    Posts:
    8
    Hi there,

    First of all, let me congratulate you on this fantastic asset. Thanks.

    But I have a question. I am trying to get your setup running with reflections in VR (Vive) and alas without success. At least if I am not duplicating my camera and assigning them to the left or right eye respectively. However this is not feasible as it increases the number of drawcalls considerably.

    The problem is that the reflection camera seems to use the wrong projection matrix while rendering for the right eye. Would you be so kind to point me into a direction which could fix this?
    Or even better.. would you mind updating your shaders to work with Single Pass Stereo Rendering? That would be awesome! I tried a while to get into your shadercode myself, but unfortunately it is quite obscured.

    Thank you very much,
    Cheers,
    Simon

    P.S: I am not using / needing underwatermode.
     
  47. lucaslosi

    lucaslosi

    Joined:
    Oct 17, 2017
    Posts:
    5
    Having the same issue here. It seems like the reflections on the water are not aligned with the vr eyes.
     
  48. tork12

    tork12

    Joined:
    Dec 16, 2017
    Posts:
    37
    I found a semi solution.. in the shader refraction settings, particularly Medium Wave Refraction, lowering the setting reduces the outline. Also lower light in general reduces the effect. However, changing the Medium Wave Refraction also makes the water seem to flow like a river when up close. But flowing water not that big of a deal.
     
  49. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    This is AQUAS's transparent refraction. since AQUAS can't use the z-buffer. I'm afraid there's no option to get rid of it completely without turning off transparent refraction. I've just submitted an update for AQUAS. The materials now have 2 extra properties to control transparent refraction based on the distance of the viewer to the object. If everything goes well, the update should be live this week.
    It will allow you - if you want to - to reduce transparent refraction distance based. This will reduce the distortion you see on objects underwater, but it will also milden the effect you've pointed out. You'll have to find a balance between how little refraction is still acceptable for you and how far you want to milden the negative effect. Setting the "Refraction Distance" property to 0 will turn off transparent refraction completely.
     
    camta005 likes this.
  50. dogmachris

    dogmachris

    Joined:
    Sep 15, 2014
    Posts:
    1,088
    Hm... It should automatically detect whether you're underwater or not. Please try removing the UnderWaterCameraEffects object from the hierarchy and use the Quick Setup to add the underwater effects to the scene again. Does that set everything right?