Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Realistic Water

Discussion in 'Assets and Asset Store' started by kripto289, Mar 21, 2015.

  1. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Ahh I had this issue as well, was driving me crazy. Not sure what the answer is on that, spent a couple hours on it and gave up. :p We also were using a Sky with time cycle plugin (TOD) and some image effects so hard to say what causes it. Same deal for us as well, when looking down or at certain angles, when the camera turns there is a sweet spot where it jacks with the color of the water and lights it up like that. It also changes the color of the Caustics as well.
     
    Last edited: Sep 30, 2015
  2. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    293
    Well not that i'd wish dev misfortune on anyone, but glad I'm not the only one with the issue - maybe can get some dev eyeballs on it :)

    I seemed to see a correlation I thought where I thought it would trigger when I could see the "floor" of the skybox. And it makes a bit of sense because my tinting is "brown" like the skybox floor. But I added a huge plane underneath and this didn't seem to help much either.

    I'm not noticing it in the example scenes so tried figuring out what the differences might be but like you after a couple hours gave up and moved on to other features.

    I'm happy to help the dev test out specific things to solve the issue, but I don't really know where to start.
     
  3. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    293
    So it has to do with lighting actually. The orange flickering was from my campfire. I get it well outside the light radius but probably because the light is hitting some portion of the ocean mesh and it's somehow propagating. I tried it with a small (range 5 or so) pink point light and its the same thing, tho I can eventually manage to get out of its change.

    I also found that having any kind of Standard Shader, Fade object rendered on screen will "fix" this. I found this out when I was implementing my tree fading script.



    Further tested it by sticking a faded cube in the scene - it worked but only when within the camera view frustum. So bandaid fix I suppose I could put a small faded quad with alpha 0 attached to my player but I'd like to see an actual solution :D

    EDIT - nope this doesn't seem to work if the light is close enough. It seems strange that this shader cant handle point lights on it.
     
    Last edited: Oct 1, 2015
  4. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    293
    Ah was able to repro this in the example scene finally. It seem point lights affect the whole "infinite water" mesh if you're even remotely close to them, but lights seem to work with the finite water meshes, such as the one in the pool scene.




    We're going to try to use finite meshes that follow the camera and see how that works, but hopefully there is a solution to the infinite as point lights are pretty common :D
     
    Tethys likes this.
  5. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    464
    Does this asset support oceans now? Looking at some of the screens, I'm getting that impression.
     
  6. rocket2guns

    rocket2guns

    Joined:
    Oct 2, 2015
    Posts:
    1
    I too am having this problem. It appears to be any point light that touches the mesh causes the lighting to perform exactly as you demonstrated.

    Did you have any luck solving it?

    EDIT: I have found that by forcing all your lights to be vertex lit (set lights to Not Important), the problem goes away. However, this means everything is vertex lit.
     
    Last edited: Oct 4, 2015
  7. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    293
    That's not really a solution then :D I'm surprised the author hasn't commented yet. For our part we will be trying out using an array of finite meshes, as we're doing a top down "tiled" game. At least the waves are synced via worldspace so that stuff seems to match up.
     
  8. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello all. Now i can't help, because now i'm in the other city up to 13 october without my PC. I'm sorry.
     
  9. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    816
    Hello kripto289,

    Any idea on what this error could be?:

    task.vertexBuffer == NULL

    it happens randomly while playing the game on the editor.

    Regards,
    Carlos
     
  10. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    Perhaps it's unity 5.2 error? I'll verify this error after 13th October.
     
  11. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    954
    I would like to know the solution to the flickering, because is happening in my scene too.
    Also, the prefabs for river/pool/etc cant be used if you have difference of level between your water bodies.
    If you do use them, the underwater script is going to consider you are submerged and enable sunshafts on main camera. Not to mention the infinite water which will cover your sky.
    Lastly, I was unable to set the underwater fog to create a reasonable effect (granted I didnt sweat too much on this).
    Never the less i love this water and it looks great on my river.

     
  12. PharaohZeus

    PharaohZeus

    Joined:
    Oct 11, 2015
    Posts:
    1
    Hey! We are thinking about buying this asset for our project, it looks stunning! I have to ask; does it work with the built-in Global fog effect? Thanks!
     
  13. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    About light problem. I'll try change shader.
    Now you can add water layer (and caustic layer) to point light culling mask. It worked.

    Also, for water and caustic shader add this line
    "LightMode" = "ForwardBase" to tags.
    Like that
    Code (CSharp):
    1. Tags { ... some text.... "LightMode" = "ForwardBase" }
     
    Last edited: Oct 13, 2015
  14. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Yes, unity5 fog is supported.
     
  15. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    After a support conversation with Kripto289, this is all I can contribute in the development of this asset.

    I think it's important that people who want to buy this asset know the current problems.

    If you want infinite ocean with dynamic ripples, this asset its the most advanced on the store. But if you want AAA quality
    you'll have to wait a solution for the flickering problems that this mode have. Check this video and you will understand what I mean:



    Kripto said that he will try to make a solution in the future patches to solve this.

    Also, there is a problem with the caustics and ripples when switching the player setting to deferred rendering and Linear Color space. They lose all intensity and strengh, making them to disappear.

    Same happens with "Displacement Resolution" ( this affect directly the quality of the water). setting it to 256, 512, or 1024 (pretty extreme resolution) will make the ripples disapear. Changing the ripples strenght to get them more visible will show random spikes all over the water.

    Also, kripto really needs to improve the scripts interface to be more "user frendly". Having to find every config on every separate component is pretty hard for novice users.

    After all I said, Realistic Water is still an amazing asset, but need some work to be the AAA quality asset I needed. Hope that this asset will be more awsome in the future.
     
  16. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Ahhh, we ran into this issue with Deferred rendering and Linear color space as well. For anyone using what is now considered the standard in shaders, PBR, their environment is going to be setup exactly like that.

    If we are talking about improvements then I have to say, the way he turns on caustics and other things using colliders is also not the best and causes issues. This means water cannot be next to an area where the player can go underground, as when they do, the water colliders and things will set off effects even though the player isn't in water. We have infinite water in our game in all directions, but not where there is land, so with the current Unity water solution this is not a problem, with Kriptos it is an issue. If you have a body of water, then land, then a body of water, you must make colliders huge in order to set off effects (I dont make the water huge because we use the shader and plane and then infinitely generate it in areas that are supposed to have water). This means colliders go through the land where there should be no water but there is a collider activating scripts/effects (when play testing the player's avatar was kicking up splashes while running through an underground dirt cave because the collider ran through it).

    The fix to this is to use Layers and forget about colliders. Put water on water layer, when player collides with water layer or in water volume, activate effects. We also had the issue mentioned above with improper depth sorting. If there is water surface under a water surface, the top of the underwater water surface shows in front of the top of the top water surface.
     
  17. astrand130

    astrand130

    Joined:
    Nov 9, 2014
    Posts:
    21
    Hi, I just recently purchased Realistic Water and am very happy with the results.
    But besides the flickering issue (Which I resolved by setting the culling mask on the point and spotlights to exclude the water layer, also I ran across the same issue when making my own water shader) I noticed that the culling for the Reflection Capture are inverted. Any help would be greatly appreciated!
    upload_2015-10-15_18-25-7.png
    NVidia 840m, Intel Core i7, Windows 7, DirectX11, Unity 5.1.1f1, Realistic Water v2.0
     
  18. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    Camera of standart water4 have same reflection?
     
  19. astrand130

    astrand130

    Joined:
    Nov 9, 2014
    Posts:
    21
    Nope. The Standard Water4 shader for Unity as well as the old WaterPro shader does not have this issue. I'm guessing that the Planar Reflection script does something different in it's handling of surface culling so checking for differences between Realistic Water's ReflectionCamera.cs and Water4's PlanarReflection.cs would be the best place to start.

    (Edit: also, I would like to point out that the CausticPC shader uses the Object UVs instead of the Projector's UV's which means that objects caustics don't always appear on the top of objects when rotated and caustic size is effected by object scale.)
     
    Last edited: Oct 16, 2015
  20. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    I will check how the reflection standard water and try to fix it.
    Regarding uv-caustic. I ran into some problems. I can not do static uv-projection in space, if the projector is moved. So I had to resort to some tricks.
     
  21. astrand130

    astrand130

    Joined:
    Nov 9, 2014
    Posts:
    21
    I usually just use a trick by adding a Vector offset of the object position multiplied by the scale of the projector driven by a script to the texture coordinate in the shader to get world space position. I implemented this into the Realistic Water in my project and it works quite well. If you want I could PM you the shaders and scripts with my solution if you are not quite sure what I mean and want to look into this in future updates.
     
  22. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    I'll be glad of your help)
     
  23. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    If you guys sort out this depth issue I believe it will fix it for me as well, as I pointed out before, I do not have the underwater water rendering in front of water on top with the Unity Water4Advanced shader. I still don't understand why they didn't update their water shader to be PBR and change with lighting conditions like their other shaders do. :/
     
  24. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    816
    Hello krypto289,

    I am very happy with your asset as I have said before. But:

    Did you ever look into this error in the console that I asked you about?: task.vertexBuffer == NULL

    Regards,
    Carlos
     
    Last edited: Oct 28, 2015
  25. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    Sorry for the long answer.
    What a version of unity you have?
    I checked on unity 5.0.1, 5.1.0, 5.2.0 and not have this errors.
    If you want, you can chat me in the skype "scar289".
     
  26. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    If I buy this asset, can it do rough ocean waves? It is beautiful for ponds, calm island water and lakes, but can I simulate a rough storm or hurricane with it?

    Does it work with Unity5? When I try to buy it, the asset store warns me that it is incompatible with Unity 5.

    Mike
     
    Last edited: Nov 7, 2015
  27. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    You can try to change waves settings (see the readme in the pack)
    Also, water worked on unity4 and unity5 (demo created with unity 5.0.1)
     
  28. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    It's between your asset and Ceto. Ceto requires more overhead, it seems. Most of the time, I would be using water for ponds, islands, intercoastals, rivers, etc and your asset seems perfect for that. It's just the really large oceans and massive waves that I may need as well and I am not sure if your asset can do this?

    Here are some images that Ceto can do - can Realistic Water be used for the same kinds of projects if tweaked properly?

    Islands?



    Oceans?





    Thanks for anwering my questions. My hand is hovering over the BUY button, so I just want to know if I can achieve MOST of my water needs with Realistic Water.

    Mike
     
  29. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Current wave made using gerstner waves.
    The water in the screenshots is working with tessellation.
    Tessellation I will add in the next update.
     
    Project-Mysh likes this.
  30. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Then I will buy this today. Thank you for the answers.

    Mike
     
  31. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Is it possible to remove water from volume (inside boat for example)?
     
  32. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    montyfi likes this.
  33. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    hopeful likes this.
  34. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    When do you think you will be able to release this update? More than a few months?

    Mike
     
  35. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    Now i've full time job and little free time. So, the update will be a few months.
     
  36. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    816
    ReflectionCameraBug.jpg Hello kripto,

    I have attached the following image showing a weird line produced by the reflection camera when my player is underwater. How can I eliminate this?

    Regards,
    Carlos
     
  37. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    Try change reflection color to "0, 0, 0" when you your player is underwater.
    I'll fix it in the next version.
     
  38. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    816
    Thanks I will try that. When do you plan to release the next version?

    Regards,
    Carlos
     
  39. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Maybe after 2+ mouth.
     
  40. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    816
    kripto,

    Is there a way to add specular to the pc water shader? I will do it myself. I just need you to give me some guide about how to do it.

    Regards,
    Carlos
     
  41. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    Now you can use "water/waterLightWaves" for specular from directionlLight.
    Other lighting i'll add in the next update.
     
  42. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    816
    Kripto,

    The problem is that in my game the player dives and the water/waterLightWaves doesn't look good for that since it is an extra mesh and it is visible at the moment the player dives.

    Regards,
    Carlos
     
  43. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    Hello,
    While I have not released an update, you can make smooth glare intensity damping relative from player immersion.
     
  44. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    614
    HI!

    I post here the conversation with Kripto by email in which informed him that I am having problems with the buoyancy of objects in the scene, to see if Kripto answer me and give me a solution.

    I waited 7 days since the last time I answered and still has not done. And I need a solution as early as possible because I have to give a demo on 12/15/29 and can not find solution.

    What happens to me it is that you add the script to objects buoyancy to float, but do not. I also tried the "Sea" sample scene that brings the asset, and not boat fleet.

    I await your response. regards

    /*************************************************************************************************************************************/
    Hi!

    Please, I beg you to give me a solution to my problem. I answered five days ago and still have not answered me ... The version of Unity that I have is the
    5.2.3f1 Personal.

    I await your response as soon as possible, greetings.



    2015-11-25 15:05 GMT+01:00 Pequeno G <fjtejada17@gmail.com>:
    I have increased the box collider water and does not solve the problem.

    I tested her sample scene "Sea" and the boat does not float.

    2015-11-25 4:12 GMT+01:00 Andrey T <kripto289@gmail.com>:
    In the demo scene you have same problem?
    Try increase water collider box?

    2015-11-25 0:20 GMT+05:00 Pequeno G <fjtejada17@gmail.com>:
    ... I think if the water is at coordinates (0,0,0) and the objects that have been tested also have coordinates (0.0, 0) or (0, 10, 0)


    But how can I check that?

    2015-11-24 17:40 GMT+01:00 Andrey T <kripto289@gmail.com>:
    Hello,
    Objects always in the water collider?

    2015-11-24 21:36 GMT+05:00 Pequeno G <fjtejada17@gmail.com>:
    Hello everyone

    I have a problem with the asset Realistic water. I assign the script Bouyancy to a cube or a model and a lot of times do not float objects.
    Each model or cube has his rigidbody and collider, and Density of Buoyancy is less than 1000.
    But sometimes its'n float.

    Can you tell what's happening?


     
  45. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    I'm so sorry, your last message is lost.
    Go to skype "scar289".
    Default water scene worked on unity 4.3, 4.6, 5.0, 5.1, 5.2, 5.3. Maybe you have some import errors?
     
  46. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    614
    I've already sent a message to Skype. My skype is "Pequeño Guizmito"

    I wait your answer. regards
     
  47. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    464
    Does this support oceans now? I'm in serious need of a good water system with little overhead that works well for all types of water (oceans, ponds, rivers, etc.). I'm using the Unity Pro water, but it just doesn't look right, but it does have low overhead and that's a plus in it's favor right now.
     
  48. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    308
    You can see the demo. Right now, water supported infinite water mesh (ocean rendering).
     
  49. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    464
    Can the oceans be dark? I don't want the player to play around in the water...it just has to look good. I don't want people to see down to the bottom.
     
  50. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    816
    EDarkness,

    Fade blend transparency, Fade Depth, and Depth Transparent, in the shader, take care of that. The color of the ocean is handle by the colors at the top of the shader as well.

    Regards,
    Carlos
     
unityunity