Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    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:
    6,858
    Lux_water_promo.jpg

    Lux Water is a simple yet robust solution to render water surfaces, which is focused on giving you reliable results as far as refraction, reflection and lighting are concerned.

    Rendering Features
    • Physically based shading including subsurface scattering
    • Dual depth based color absorption
    • Dual depth based underwater fog
    • High precision refraction
    • Cube map based and real time planar reflections
    • Real time lit screen space caustics – no projectors are harmed. (Caustics currently work best using deferred rendering)
    • Dynamic shoreline foam
    • Simple Gerstner waves and dynamic foam caps
    • Water volumes which allow you to create smooth transitions between above and below water surface rendering
    • Water projectors which allow you to add local foam as well as local normals (and displacement)
    • Tessellation and projected displacement
    • Support for orthographic cameras
    • Deep water rendering

    Compatibility

    Lux Water has been successfully tested on DX11, OpenGLCore and Metal.
    Lux Water supports forward and deferred rendering, but it looks best using deferred.

    Resources

    Asset Store | Documentation






     
    Last edited: Jan 11, 2019
  2. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    Awesome water shader!
    Infinite customizations ... a must have!
     
  3. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    Super cool!


    LuxWaterBeach.jpg
    LuxWaterBeach2.jpg
     
    Last edited: Jun 19, 2018
    Jaimi, ftejada, mmaclaurin and 2 others like this.
  4. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    Hey Lars,
    are you planning to support HD Render Pipeline?
    I'm imagining how beautiful would be add this water to the new Book of Dead Environment asset.
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    indeed, that looks super cool!
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    some day maybe, when it is out of preview – or at least a bit more stable.
     
    sjm-tech likes this.
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    btw: which features do you actually use?
    i think i see some very subtle gerstner waves – great job!
    cubemap reflections? or planar?
    and the coloring of the water is super nice. maybe just a little bit too strong (some less/later color absorption?) but it looks fantastic.
     
  8. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    Hey Lars,
    I played ( it was a month agoo i think )a bit with all settings but at last I used probe reflections and i tried to find a good settings to simulate the water shore with small waves as you said.
    Yes the color is quite exagerate (maybe also due post processing) but for a very few minute of testing i was very satisfied of LUX Water.
    I think you need a little but very detailed (texture and models) scene and more image amd videos to show how good Lux Water is.
    I'm surprised to not see other comment here.
    Monday morning i will post more detail about the used settings.
     
  9. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    Awesome caustics and view depth! ;)

     

    Attached Files:

  10. amarillosebas

    amarillosebas

    Joined:
    Feb 28, 2013
    Posts:
    44
    Any chance we could get compatibility with Aura?

    This is how Lux Water looks out of the box with Aura enabled. In my opinion, it looks pretty bad. Every other piece of geometry will be affected by Aura, leaving a strong and unnatural look against the water:



    And this is how it looks when changing the Render Queue to 2500:


    In the second image, the water is basically invisible, except for the light reflections. I've tweaked all of the settings and couldn't make it work.

    Here's another angle. It's impossible to tell where the water is:


    Edit: I see that as long as I have a strong enough light source, the water will show. If there's no light, then you won't be able to tell there's water. Could there be a way to adjust how opaque water is?

     
    Last edited: Jul 25, 2018
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    actually i have no how idea, how you think it should look like.
    so maybe you can add a simple plane to your scene which uses the standard shader set to render mode = transparent and tweak its opacity?
    and i am not sure about what i see on your screen shoots. what are these white bars? why do the glow even if they point away from the light sources?

    the visual fidelity of water heavily depends on reflections (ambient and direct lighting). no light, no water.
    like with any other material.

    you control the opacity by adjusting the "underwater fog" and "light absorption".
     
    VIC20 likes this.
  12. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    HI Lars,
    what's next?
    I can't wait to see more feature coming to this beautiful water shader.

    Something like:
    - Buoyancy
    - Splash on collision/interaction/trails
    - Underwater FX
    - Underwater caustic projection
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    Underwater FX
     
    sjm-tech likes this.
  14. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    Awesome new river setup (1.01 update)





    LuxRiver1.jpg LuxRiver2.jpg LuxRiver3.jpg LuxRiver4.jpg
     
    Last edited: Jul 27, 2018
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    nice!
     
  16. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Could anyone post some underwater pictures with this water?

    Regards,
    Carlos
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    right now only the underwater water surface is rendered :(
    i am working on underwater rendering, but this will probably take some more time.#

    [edit] wip

    underwater.jpg

    underwater1.jpg
     
    Last edited: Jul 29, 2018
    ftejada and sjm-tech like this.
  18. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    that looks pretty awesome! My game is in iOs, Android, Xbox One and I use Forward rendering path, does this shader work on the mobile platform and Forward?

    I will only need the underwater part of this water, I see you have a brown like fog in these picture, can that be tinted to a more tropical blue color instead? and finally, I usually work with the fog from the lighting panel in unity; is the fog in your picture from the shader or I can use the fog mentioned above?

    Regards,
    Carlos
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    hi there,
    the shader supports forward (itself runs in forward of course) – but screen space caustics do not look that nice in forward right now... https://docs.google.com/document/d/...m38h-u3Az-ozaaOX0/edit#heading=h.keck6twhaqe3

    if have tested in on dx11, metal (os x 10.11.6) and opengl core. i did not test it on any mobile device. it might be a bit heavy if you turn on all options. but you may give it a go and we will see what has to be optimized/made optional to make it run on mobile.

    this part is still wip. but you may ask for some kind of beta access.

    yes. please have a look at the docs: https://docs.google.com/document/d/...m38h-u3Az-ozaaOX0/edit#heading=h.thm2k7ru0z0b

    00_variation.jpg

    in forward fog is rendered per pixel right when the geometry is rendered to screen. so you can't add custom fog just to the parts below the water surface :( one would have to add fog as image effect – just like in deferred.

    in deferred we can mask the standard fog so it gets only rendered above the surface and apply custom fog just for the underwater (white fog is built in, water has dark brown fog (muddy water)) – right now this is accomplished using two image effects but it should be possible to join both effects into one.

    fog.jpg
     
  20. bariscigal

    bariscigal

    Joined:
    Oct 26, 2009
    Posts:
    46
    So is underwater fog fx or even the bottom of the ocean shader usable in this version (like the image in your post?)
    I currently need to dive in as a transition. But not a full fledged underwater solution. (underwater is a different setup for me)
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    this one already is useable.
    the under water fog and blur fx is still wip.

    what does this exactly mean?
     
  22. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Nice!
    Would like to see some more videos > 2 seconds :)
     
  23. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    Here my last test of the last update ... amazing asset!

     
    Last edited: Aug 1, 2018
  24. bariscigal

    bariscigal

    Joined:
    Oct 26, 2009
    Posts:
    46
    what i meant was , underwater is another scene (setup) in my project. So what i really need is just a small transition from above sea to below.
     
  25. Wurlox

    Wurlox

    Joined:
    Nov 1, 2015
    Posts:
    50
    Really beautiful water :) - Nailed it again!

    unistorm3_lux-water1.PNG unistorm3_lux-water2.PNG unistorm3_lux-water3.PNG
     
    ftejada likes this.
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    i do not know what "short" transition means: is it 0.5 seconds or 3?
    once the underwater fx is done it will let you simply render above water and/or below water – at the same time.
    you neither have to fade nor to fake anything – which of course you can always do in case you just need a very quick transition.
     
    bariscigal and sjm-tech like this.
  27. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    37
    Hi, any chance this will work with HDRP?
     
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    not in the nearby future, sorry.
    hdrp is still in preview – so a lot of things will change during the next months, making it impossible to maintain a custom shader.
     
  29. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    37
    Thanks for the quick reply. We are adapting to it for sure. I am excited to see what the community comes up with post-release.
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    preview of the upcoming underwater fx:

     
  31. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    wow lars... it's super cool.
     
  32. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    Yessss, this looks fantastic. Is there a general timeframe we can expect the update? Awesome work, your shader blows all other water solutions out of the water IMO
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    if i do not get distracted i hope it will come within the next 2 weeks.
    thanks! the go and rate the package :)
     
  34. Lesnikus5

    Lesnikus5

    Joined:
    May 20, 2016
    Posts:
    131
    Are you going to make a playable demo? This will help evaluate the quality.
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    what do you want to evaluate for 9$?
    but time will tell.
     
    Aaron2348, punk and hippocoder like this.
  36. bariscigal

    bariscigal

    Joined:
    Oct 26, 2009
    Posts:
    46
    Well un-refundable asset store makes people really picky. You can't believe how many garbage assets i have in my library that stays as a reminder :)

    I am definitely "not telling" buying Lux was a mistake :) .

    Waiting for the underwater update hesitantly it looks great. :)
     
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    hi there,

    version 1.02 has been submitted – including water volumes (as preview).
    i hope it will hit the asset store within the next 2–3 days and i am looking forward to your feedback.
     
    HXCMAN and sjm-tech like this.
  38. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    added to the to buy list, looks great
     
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    version 1.02 is available!
     
    sjm-tech likes this.
  40. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    # Water volumes added (preview)
    It's in preview and need to follow carefully the documentation to be setup correctly but it's already awesome!
    The included sample scene helps a lot!

    LuxUnder1.jpg LuxUnder2.jpg
     
    Last edited: Aug 9, 2018
    ftejada, HXCMAN, punk and 1 other person like this.
  41. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    729
    I found a little issue: underwater caustics tile does not respect the material settings.

    LuxUnder3.jpg
     
    Last edited: Aug 8, 2018
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    i will have a look into this, thanks!
     
    sjm-tech likes this.
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    hi there,
    i was able to reproduce the bug. the fix will come with the next update.
    thanks a lot for bringing this up!
     
    sjm-tech likes this.
  44. yotingo

    yotingo

    Joined:
    Jul 10, 2013
    Posts:
    44
    Hi,

    I'm trying to add water to my spherical mesh terrain. Does Lux Water support this use-case?

    Here is an example of the stretching that happens with most solutions:
    Water Stretching.jpg
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    hi there,
    you may switch from world projected texturing to uv based texturing. but how would you control the bump map animation then?
    gerstner waves should break as they displace the water along the local y axis but not the normal (which might be an easy fix tho).
    and i am not sure about all the depth based features.

    but anyway. this is how it looks when i simply assign my river demo material to a unity sphere:

    sphere.png
     
  46. yotingo

    yotingo

    Joined:
    Jul 10, 2013
    Posts:
    44
    Thanks for the test!
    In your screenshot is that a harsh transition line (right, center) between positive and negative values? Or simply just a shadow?

    I'm not sure about the bump map animations or the depth features. I don't have any experience with shader work unfortunately.

    What would you recommend?
     
    Last edited: Aug 9, 2018
  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    i am not sure what you mean... the whitish somethings are refractions from the background.
    the brighter greenish tint on the left half is from translucent lighting.
    the brown tint at the top comes from underwater fog: here we look against the sky. so the depth of the background is pretty high compared to the lower parts of the sphere (where it is rendered against the white cubes). high depth = a lot of fog.

    well, this depends on your uv layout.

    i really don't know, sorry.



    sphere.png
     
  48. yotingo

    yotingo

    Joined:
    Jul 10, 2013
    Posts:
    44
    Oh I see what you're saying. That makes more sense!

    Thanks for describing how the water was interacting with the different parts of the scene.
    It should fit my needs well :)
     
  49. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    Hey was wondering if you could give some insight into water volumes. I'm currently having some issues getting it setup. I attached a couple screenshots, maybe you know off hand what I may have done wrong. Any insight would be greatly appreciated

    I think I set up the water volume correctly? I created a cube with Probuilder that corresponded exactly to the x and z size of the plane I had scaled in my scene and made it very deep. In creating the water volume, should I create it with the scale set to 1 for x, y and z for both the plane and the cube and then set that to the mesh? I was just a bit confused by that section and maybe I set something up incorrectly

    WaterVolumeIncorrect1.PNG WaterVolumeIncorrect2.PNG
     
    Last edited: Aug 12, 2018
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,858
    hi there,
    on the first glance it looks as if the pivot of your water volume is at the center of the cube – and not at the top so that it matches the pivot of the water plane.

    the underwaterrendering script takes the transform of the water plane and renders the water volumes using this transform. so the water volume will be rendered using the same scale, rotation and position, thus pivots must match.

    another reason why the pivot must match the water plane: it is used to compute the depth below surface.