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

[RELEASED] Lux Water

Discussion in 'Assets and Asset Store' started by larsbertram1, Jun 18, 2018.

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    it does not look as if there were any reflections.
    just have a look at the water: it gets more and more black towards the horizon were usually reflections replace refraction (fresnel).
    so put a chrome ball into your scene and check if it shows up any reflections from the skybox.
    it is just geometry.
    this scene uses a sliding volume.
    so if you are using the water material from the ocean demo the brown tint may be simple caused by the color of the under water fog set in the material.

    ocean demo: reflection intensity = 0.

    water_reflections1.PNG


    ocean demo: reflection intensity = 1.

    water_reflections2.PNG
     
    hoodoo likes this.
  2. blackaciddevil

    blackaciddevil

    Joined:
    Mar 6, 2016
    Posts:
    42
    I am running this in deferred rendering with Enviro and NGSS 2 and just noticed that the objects below the surface is really visible when there is fog above the surface. I have not seen this before (just got the over-the-surface-fog working so it might be the reason why), is it normal?


    2020-01-06 (10).png

    2020-01-06 (11).png
     
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    i am not sure about this. but it might be related to ngss.
    please let me know if it is not.
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    if not make sure that you have checked advanced deferred fog in the underwater rendering script and you have tweaked the shader to apply proper enviro fog. you also need the tweaked enviro fog shader which should be included in the enviro package already.
     
  5. blackaciddevil

    blackaciddevil

    Joined:
    Mar 6, 2016
    Posts:
    42
    All settings is as it should be, I'll hope. Advanced deferred fog, DeferredFog.cs is updated and WaterSetup is set to Enviro. I made some tests, and I think it is the volumetric lighting in Enviro that is "leaking" below the water surface. Switching it on and of made some changes, nothing else did, with or without NGSS. I hope that it is some easy way of fixing it if thats the real problem.

    While I'm here. Is this something that is expected, that the sun reflects in the water behind the terrain (as shown in the in the middle)? If so, can I disable the reflection when it is behind the terrain or something?

    Volume light.jpg
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    this is expected as transparent materials do not receive shadows by default.
    you would have to sample the shadow cascades per pixel to support this – which is quite expensive tho.
    i am not sure if i checked this, sorry. i do not use enviro. but the strategy should be the same as used by the fog: use the water mask provided by the under water rendering script when deferred fog is enabled to mask the volumetric lighting on parts which are below the water surface.
    i may have a look into this tonight.
     
    blackaciddevil likes this.
  7. blackaciddevil

    blackaciddevil

    Joined:
    Mar 6, 2016
    Posts:
    42
    I have 0 experience with shader programming so this might be what you said, but in other words.

    Enviro is using some sort of cookie created from the clouds that is used as fake shadows on the ground. Works fine with the water, even follows the waves. Would it be possible to do something like that, grab det depth map(?), the shadows in view of the frustum then apply it to the water.

    EDIT: Super impressive with your fast response on the volumetric light! I was expecting it to get last in a big TODO list
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    if enviro adds a cookie to the directional light to simulate cloud shadows these sadows should effect specular highlights as well.
    but as specular can have very crazy and high values you have to have real black in the cookie texture to actually kill specular highlights.
     
    blackaciddevil likes this.
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    i had a look into enviro: its volumetric lighting is applied together with the fog.
    so if the fog gets proeprly blocked the volumetric lighting will be too like shown on the following screen shot from the frame debugger:

    enviro_volumetric lighting.PNG

    i am not familiar with enviro's demo gui but having a closer look at your FIRST screen shot it looks as if volumetric lighting is disabled but light shafts are enabled?!

    lux water does not handle enviros light shafts. so all you can do right now is playing around with the image effect order:
    selct your camera and make sure that enviro's image effects are ABOVE the lux underwater rendering script.

    i hope this helps.
     
  10. blackaciddevil

    blackaciddevil

    Joined:
    Mar 6, 2016
    Posts:
    42
    @larsbertram1 Thanks for your fast support! But I think I've found the "problem". I played with some values on the water shader and found out that it might be the subsurface scattering. All settings is the same except the Occlusion and Intensity(Water).

    1.jpg 2.jpg 3.jpg
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    yeah, subsurface scattering can reveal underwater geometry as well.
    however i looked into the latest version of enviro and lux water and in fact volumetric lighting broken.
    it seems to be way stronger now and has a similar effect as strong sss.
     
    blackaciddevil likes this.
  12. desukarhu

    desukarhu

    Joined:
    Jun 14, 2017
    Posts:
    12
    Hey,

    Is it possible to use Planar Reflection script with occlusion culling? Right now the tree reflections etc disappear when they get culled.
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    i never tried this. you may try to add checkbox like: use occlusion culling and set up the reflection camera accordingly.
     
  14. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    614
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    it does not, sorry.
     
  16. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,031
    Looks great. Did you ever see if it's compatible with TrueSKY?
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    it supports enviro, azure and aura 2 ... sorry, if your sky solution is not in this list.
    but did trysky ever make it into unity?
    if so you may contact the developers and we might figure something out.
     
  18. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,031
    It use to be sold on the asset store, but now they're only offering it through their website.

    Do you know if anyone has gotten your asset to work with OverCloud? I'm trying to find a volumetric cloud based solution to work with your asset.

    Thanks.
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
  20. canalecosmo

    canalecosmo

    Joined:
    Jan 17, 2020
    Posts:
    2
    I am working on a project and the whole scene is black with the exception of waves of green and white pixels. processed.jpeg
     
  21. canalecosmo

    canalecosmo

    Joined:
    Jan 17, 2020
    Posts:
    2
    I am using Lux Water any suggestion is greatly appreciated.
     
  22. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    152
    It's hard to tell why without more information. What version of Unity are you using? Try starting with a Lux demo scene, then save it as a new scene and delete what you don't need. Next add your other components one by one so that you can tell if there is a problem with one of them.
     
  23. Image3d

    Image3d

    Joined:
    Jun 20, 2008
    Posts:
    111
  24. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    709
    It is very old but here the link.
    Assets:
    - Lux Water (not included)
    - MicroSplat (free asset)
    - Dnk_Dev HQ Rock Pack Free (free asset )
    - NaturalTilingTextures (free asset)
    cheers
    Max
     
    Last edited: Jan 21, 2020
    Rowlan likes this.
  25. Image3d

    Image3d

    Joined:
    Jun 20, 2008
    Posts:
    111
    Thanks Max for the file...I am installing and let you know how it goes...
     
    sjm-tech likes this.
  26. Ocean42

    Ocean42

    Joined:
    Nov 12, 2014
    Posts:
    3
    @larsbertram1 your asset is wonderful..
    The only thing currently not working correctly is distance fog with aura 2. Do you already have a solution that allows aura 2 and lux water work together?
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    it should already work.
    but i am not sure if the latest version ahs been added to aura 2 already...

     
    Hikiko66, cstreb and sjm-tech like this.
  28. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,008
    When is the URP going to be supported?
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    no eta.
     
  30. andresandovalba

    andresandovalba

    Joined:
    Mar 22, 2018
    Posts:
    1
    Dear LuxWater
    It is posible use "Unity Recorder" and have the blur effect under the water?
    Thanks!!
    Andres
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    is it not?
     
  32. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,232
    Been playing around with your lovely water system and it does look wonderful, great job :) I have been trying to get it to change the sea state based on my own weather values, so I have wind speed and direction and based on those I am trying to change the Gerstner values to go from flat calm to largish waves and moving in the correct direction etc. But I am having an issue I need some help with.
    I can't seem to change the Freq or Speed values without seeing a nasty jumps in the waves in the scene, is it possible to change these values smoothly?
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    unfortunately, no... gerstner waves have no memory. you would need to use a render texture to support this.
    but you can change the final offset at least...
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,232
    No worries I will work around it somehow. On another point is there a trick to getting fog working with Lux and Enviro, I have followed the instructions and uncommented Enviro fog in LUXWater_Setup.cginc and reimported the shaders but there is no change, not seeing any fog at all. If I change to Linear fog then all the water is totally fogged out. Am I missing something? Where does LUX Water get its fog settings from?
     
    Last edited: Feb 9, 2020
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    you have to cmment default fog and uncomment enviro fog,
     
  36. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,232
    Ok I commented out all the default fog but I am still not seeing any fog for some reason. Where does LUX water get its fog settings from?
     
  37. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,232
    Arr think its working now, though cant seem to get it very foggy at all.
     
    Last edited: Feb 9, 2020
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    the water? or all the scene? i am no enviro expert tho.
     
  39. cstreb

    cstreb

    Joined:
    Nov 10, 2016
    Posts:
    1
    My water surface is cutting out. it is taking the shapes from above and cutting out water surface as seen in the bottom display1. Looks great in scene on top. But we see display with VR. Thanks for help !
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    looks as if the water shader flips or does not flip the depth texture...
    which version of unity? which vr sdk?
     
  41. terpardev

    terpardev

    Joined:
    Dec 4, 2019
    Posts:
    10
    It works smoothly on Android phones with unlimited ocean, and forward rendering.

    But when I imported it to iOS and use Metal, at first, it is all good. Then at some point in time, the waves seems to stutter or skipping, and as the time goes on, it becomes worse.

    Any idea how should I fix it?
     
  42. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,008
    Any word on when LUX will support URP?
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    i never heard of this so far... anybody here having the same problem?
    (i only checked old metal 1 on desktop.)
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    nope. URP still changes too frequently and still lacks some functionality. i was told that some will be added to 2020. but that is nothing i am looking into right now.
     
  45. terpardev

    terpardev

    Joined:
    Dec 4, 2019
    Posts:
    10
    here's a video of the problem:
     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    still: i can not reproduce it.
     
  47. rostik1975

    rostik1975

    Joined:
    May 14, 2015
    Posts:
    34
    glassShader1.jpg glassShader2.jpg Hi,
    I am trying to implement water splash visual effect by placing a screen in front of the camera, and applying a material with Unity GlassStainedBumpDistort shader to it.
    However on some angles (this depends only on camera angle) the water is not rendered at all.
    Any ideas on how I should edit the GlassStainedBumpDistort shader, to remove this visual bug?
    Thank you.
     

    Attached Files:

  48. terpardev

    terpardev

    Joined:
    Dec 4, 2019
    Posts:
    10
    have you tried it on an iOS device?
     
  49. terpardev

    terpardev

    Joined:
    Dec 4, 2019
    Posts:
    10
    here's an error from the XCode that might help: Screen Shot 2020-02-22 at 11.22.31 AM.png
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,867
    make sure that your distortion plane always renders after the water by raising its render queue. so try setting it to 3010 e.g.
     
unityunity