Search Unity

[RELEASED] Lux Water

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

  1. skyLark9

    skyLark9

    Joined:
    May 2, 2018
    Posts:
    135
    100% You right. Still, I hope you make at less one prefab.
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    lux water is a quite versatile solution and people use it to create ponds, rivers, lakes and even open water.
    so i simply can't provide prefabs for all use cases, sorry.
    furthermore @docsavage is absolutely right when he says that waterfalls most likely are made out of particles. so no water shader would be involved here anyway.
     
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i am still working on improving some of the features. more examples might follow later then.
     
    sjm-tech likes this.
  4. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    65
    Hello, I love this asset but I have one bug when I look at the water at certain angle the skybox disappears from the reflection what could be the cause of this?
     

    Attached Files:

  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    that looks indeed strange.
    have yu checked the frame debugger to see what the reflection camera actually renders?
    maybe you have to adjust the "water surface offset" or "clip plane offset" in the planar reflection script.
     
    no00ob likes this.
  6. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
  8. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    65
    @larsbertram1 those two settings don't seem to help, I tried the frame debugger and I think this is the reflection it renders if I'm right?
    Edit: it seems to be caused by my skybox as if I change the ground color the whole reflections color changes how can I fix this?
     

    Attached Files:

    Last edited: Feb 11, 2019
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    well, the screen shoot is pretty small... but it looks like the reflections, yes.
    and it looks as if the reflection ca,era sees the terrain from underneath. is the terrain double sided? or does it use a double sided shader?
     
  10. GaelTFernandez

    GaelTFernandez

    Joined:
    Feb 10, 2017
    Posts:
    7
    Hi! I just bought this asset and it looks fantastic, but I'm getting this error underwater :(



    How can I fix it? Thank you!


    UPDATE: I've fixed by making the water plane smaller. Somehow I think it was reflecting the terrain as well o_O
     
    Last edited: Feb 11, 2019
  11. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    65
    No I don't think so it uses the default terrain material of unity 2018.3, could it be caused by the cameras position? Can I move the camera somehow?
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    if the water plane = volumes gets too large i will be clipped according to the camera's far clipping plane. so you have to make sure that the water plane = volume is always within the frustum.
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    the scrit is based upomn the original planar reflection script and offers 2 params to adjust the camera: the ones i already mentioned.
    but i had another look at your latest screen shots and it looks as if the reflection vector is way too flat - actually it points even downwards showing all the red from the skybox.
    so it might be gerstner waves and their normals? which are off.
    so try to reduce the normal strength in the gerstner waves section.
     
    no00ob likes this.
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Yea its because Enviro is in the scene.
     
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hmm, enviro is still not updated?
    and have you tried and checked "advanced deferred fog"?
     
  16. ffertigo

    ffertigo

    Joined:
    May 31, 2015
    Posts:
    12
    Hello, I bought your asset for my vr project and everything works in vr except the caustics. Is there hope you could make this effect vr supported? Thanks
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    vr support is on the list. but i do not have any eta.
    so try to use ordinary projectors or skip caustics for the moment, sorry.
     
    ffertigo likes this.
  18. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    65
    Doesn't seem to effect it, I've tried all day to get a render texture out of the reflection to see it better whats going on but it doesn't render anything except blue sky looking thing so idk what the frick is going on.
    Edit: Okay I managed to grab the reflection image as it renders in my project but I noticed that the weird blue only image happens if I don't pause the game while grabbing the reflection weird. Just in case u are interested here's the bit were I added the code to grab the render texture:
    Code (CSharp):
    1.         public void WaterTileBeingRendered(Transform tr, Camera currentCam) {
    2.             RenderHelpCameras(currentCam);
    3.             if (m_ReflectionCamera && m_SharedMaterial) {
    4.                 m_SharedMaterial.SetTexture(reflectionSampler, m_ReflectionCamera.targetTexture);
    5.                 RenderToTexture(false);
    6.             }
    7.         }
     

    Attached Files:

    Last edited: Feb 13, 2019
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    oh, you could simply use the frame debugger to get a clear picture of what the reflection camera renders.
    in the "fjord demo scene" the reflection camera is what gets rendered first.
    so simply click "Camera.Render" and you get the entire picture:

    reflection.jpg
     
  20. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    No update yet... No, where can I find advanced deferred fog?
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
  22. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    65
    Well the more you know, but last time I tried I couldn't find THAT camera from anywhtere there or do you have to select it first in the hierarchy? Also any more ideas what could be the cause of my issue? Could it be multiple cameras I have in the scene?
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it could. as i have never tried it with multiple cameras. what do they do?
     
  24. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    65
    Well I have quite a few cams which are disabled and only activated when needed eg. entering vehicles and when that happens the main cam is disabled (These are most likely not the cause) and then a minimap camera (This may be the problem) which is always enabled, it renders the scene from the top in a orthographic view to a render texture which is then used in the UI as a minimap.
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you may try to disable the minimap camera.
    and does it have to render dynamic objects? if not scrolling a texture sould be way faster...

    anyway: the minimap camera should not interfere with the rendering of the main camera. nevertheless it causes reflections to be rendered.
    you may have a look into the reflection script. it contains code to prevent cubemap cameras (used by dynamic reflections probes) to render reflections. you may want to exclde the minimap camera as well.
     
    Last edited: Feb 15, 2019
    no00ob likes this.
  26. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    65
    Oh thanks, It was the minimap camera, It actually doesn't matter that that's the issue as I'm going to rework the minimap system completely but thanks for the tips and thanks for helping me to just getting this to work. Awesome water system and nice dev! <3
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you are welcome!
     
    no00ob likes this.
  28. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Is there any way to set the opacity of the projector foam separately from the river foam? I've turned the latter down very low, since I don't like how the foam looks around rocks and objects in the river....but that means the projector foam is nearly invisible.
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    only if you use the simple foam projectors. these may bypass the scale property and do not get masked by normals.
    tray to not use color and opacity to turn down the automatic generated foam – but use the edge bend factor instead.
     
  30. Lesnikus5

    Lesnikus5

    Joined:
    May 20, 2016
    Posts:
    131
    Hello!

    Can this water create dynamic volumetric waves from moving objects, such as boats? I mean not simple particles, but waves in the form of the real convex geometry of the water surface, deformation in real time.

    The second question: is it possible to create an endless ocean?

    In general, there is a very lack of playable demo. Although asset is inexpensively, it does not seem to me a good idea to buy it, just to find out that there are no features I need. Maybe you can post a Windows demo?
     
    Last edited: Feb 16, 2019
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    to a certain degree – yes.altho you would most likely use particles to project the deformation onto the watersurface :)
    see the video attached.

    lux water is not an out of the box endless ocean solution – at works with custom meshes. but if you move your water plane(s) with the camera you can create such illusion. enhanced support for "sliding" watervolumes will come with version 1.08.

    oh, the feature description is pretty extensive and you have access to the documentation.

     
    Lesnikus5 and Rowlan like this.
  32. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    Can the moving spheres have ripples as well?
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    yes, you can attach foam and normal projectors of course. it would be just a 2nd particle system.
     
  34. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    Thanks, would be cool if you could attach an example with a 3rd sphere in your demo :)
     
  35. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Is there a demo for this video?
     
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it is "06 LuxWater Water Projectors Tess Demo"
     
  37. papaonn

    papaonn

    Joined:
    Aug 21, 2015
    Posts:
    30
    Dear Creator,

    Sorry to write in, my underwater fog is gone and missing,
    after removing HxLight volumetric light shader and is still not working.

    I tried all project settings and configuration with graphics pipeline etc still not working.
    Is there still anything that I am missing to configure for an underwater fog to work ?
    Or is there any way I can check why is the underwater not working?

    I tried to peek into the shader code and discovered that the render texture of Camera for the underwater depth is not working, returns black for entire screen, it seemed like either the depth value is not passed in, or something is wrong.

    Seeking for your advice in how to trace down and I don't mind messing with some codes to get it worked, many thanks!
     
  38. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    work with the splitscreen ?
     
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    not tested – but most likely yes.
     
    mattis89 likes this.
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    lux water only supports the "legacy" rendering pipeline: no lwrp or hdrp.
    it works fine in 5.6.3 – 2018.3.
    what graphics api do you use? it has been tested using dx11, opengl core and metal (desktop).
    and finally: have you tested lux water in a fresh project?
     
  41. papaonn

    papaonn

    Joined:
    Aug 21, 2015
    Posts:
    30
    #Update :

    Ahhh I found a new solution, I just simply copy the project configuration files over from afresh one and it worked voila!
     
    Last edited: Feb 18, 2019
  42. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Hi Lars;

    Experimenting with switching to Forward for performance. New clean project - I have the "Lux Water_Camera Depth Mode" script on my camera and do *not* have "Grab Depth Texture".

    1) I'm seeing a white flickering on the ocean. Known issue? Unity version is 2018.3f5
    2) Will this force an extra depth render (or copy) on the reflection pass? My guess is that wouldn't be necessary (and would have a cost) but can't tell from a quick look at the script.
    3) My scene typically has one main light and occasionally 2-3 lights for a quick effect (e.g. explosion or spell.) Would you guess that forward rendering + Lux depth pass is still faster than deferred?

    EDIT: Metal on MacOS and iOS
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    have you turned off "Normals from GBuffer" in the caustics section?
    i haven't seen this problen so far.
    nope. just a copy.
    if it is just an outdoor scene... depends on if you use image effects as well wich would need depth and normals (like some ssao solutions). in this case unity would render the scene twice using replacement shaders.
    on the other hand: forward allows you to use msaa and get rid of any aa filter.
     
  44. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
    How can i get the Height of the Water at X Z position?
     
  45. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi, very interested in this water asset!
    One question, it seems to rely on a mesh. Can it be used as an infinite ocean? If it does, is there ant suggestions on this topic?
     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    please have a look at the "LuxWater_SetToGerstnerHeight" script.
     
    killer1171090 likes this.
  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    current version 1.075 can be used as infinite ocean – with some restrictions.
    upcoming version 1.08 will come with full support for sliding volumes and surfaces.
     
  48. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Great to know! Is there a tutorial on the infinite ocean setup?
     
  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    1.08 will come with 2 demos. the documentation is here.
     
    Baldinoboy and Harekelas like this.
  50. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300