Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. 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 LWRP Essentials

Discussion in 'Assets and Asset Store' started by larsbertram1, Jul 18, 2019.

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    why don't you assign the procedural texture to the geometry but use a decal to project it?
     
  2. Abended

    Abended

    Joined:
    Oct 9, 2018
    Posts:
    58
    I think that is what I am doing? Shader -> RT -> Decal over the mesh
     
  3. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    22
    Hello everyone!
    I am searching for a URP terrain shader, which does the following:
    • Triplanar mapping with mutliple textures (x,y,z different textures)
    • Splat mapping
    • Compatible with the unity terrain painting/sculpting system
    Does the terrain shaders which come with this asset support these requirements? If so, I would love to get my hands on it :)

    Thanks
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    it would be: procedural shader -> rt -> terrain or whatever it is shader. no decal projector involved :)
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    it does not support triplanar mapping because triplanar is just way too expensive (you may read/watch the comments of the authors whose terrain shaders offer triplanar). furthermore: a height map based terrain such as unity's (but also frostbite, unreal, ...) doesn't allow you to sculpt nice cliffs or even overhangs. so you use meshes here instead.
    Lux URP Essentials at least offers you some nice and cheap mesh/terrain blending techniques.

    of course i do not know your specific use case. and it might be that according to your art style/work flow triplanar would be the perfect fit. but it will always be expensive:
    - using 4 texture sets with albedo/smoothness + normal and regular projection --> 8 texture samples.
    - using 4 texture sets with albedo/smoothness + normal and triplanar projection --> 24 texture samples.
     
  6. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    177
    There seems to be some kind of issue with Shadow Cascades where the 2 cascades meet you get a weird black line

    upload_2020-7-18_12-32-31.png

    I'm using Unity 2019.4.4f1 with URP 7.4.1 and Lux 1.44

    Tested with Skin, Transmission, Cloth, etc. all do it. Yet the Unity Lit shader does not.
     
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    for some reason you must have installed the old version for urp < 7.2.
    so please create a new project in 2019.4.4, open the asset store window and download/import latest Lux URP Essentials.
     
  8. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    177
    Thanks. Sorted.
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    do you have idea what the issue was?
     
  10. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    177
    After installing the first time I must have run the 7.1.8 package, a lot of projects have URP version separate to the LRP or HDRP version so just assumed I needed to install it as I was using URP.

    To fix I just re-installed the package.
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    :)
     
  12. fjhamming_CleVR

    fjhamming_CleVR

    Joined:
    Feb 6, 2014
    Posts:
    10
    I ended up fixing the thing by reimporting the shader. I guess the import result in the accelerator somehow got corrupted or something.
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    Version 1.45 for URP 7.41 is available!

    ### Changed:
    - Shader Graph based shaders: Now listed under "Lux URP/Shader Graphs/..."
    - HLSL shaders: Bitangent gets calculated in the fragment shader (according to URP 7.41)
    - Uber shader: Alpha Clipping for transparent workflow exposed in the inspector
    - Skin Shader: Base Color exposed

    ### Added:
    - Advanced parallax subgraph
    - Camera fading subgraph
    - Uber shader: LOD cross fading added (using custom dithering instead of the built in one)
    - Uber shader: Tooltips for advanced surface inputs added
     
    kenamis likes this.
  14. colin299

    colin299

    Joined:
    Sep 2, 2013
    Posts:
    165
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    colin299 likes this.
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    Version 1.451 is available and brings a hotfix for the skin shader.
     
  17. Kingo64

    Kingo64

    Joined:
    Sep 20, 2014
    Posts:
    3
    Hi there, I'm running into issues with the Lux Water shader when using Terrain Detail (grass). It creates a fake ghost image/reflection on the Left Eye however the Right Eye has the correct image. I've tried changing all the settings on the material but none seem to resolve this issue, meshes and the terrain itself are unaffected; only terrain detail.

    I am using Unity 2019.4.1f with URP 7.3.1 and single pass instanced rendering in VR. I would greatly appreciate it if you could look into this issue. Thank you!
     

    Attached Files:

  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    terrain details are rendered by the built in shaders. and i can't see any issues related to the water, sorry.
    how does grass look just on top of the terrain? it should be "broken" as well.
     
  19. Kingo64

    Kingo64

    Joined:
    Sep 20, 2014
    Posts:
    3
    Grass looks fine absolutely everywhere else except the Lux Water. Changing the Terrain shader to anything else doesn't solve the issue either.

    Seems to be an issue with how depth and reflections are handled since the right eye is correct and it seems like the left eye is using the right eye's depth results or is just incorrect?

    I've attached more screenshots to help you diagnose the issue, if you need any more information just ask :)
     

    Attached Files:

  20. Jairusx

    Jairusx

    Joined:
    Jun 25, 2020
    Posts:
    13
    Hello.Can i get a little help? :) i have little issues with water shader.Enabled both options in URP quality options tab - Depth texture and Opaque texture, created material and applied water shader to it.And the result is that https://imgur.com/a/yVl0IEq
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    the result looks as expected: you set underwater fog to white. so you get this white tint according to the depth between the water surface and the scene.
    so i highly recommend to just copy the included water material and tweak it.
     
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    the new images actually show the problem. regarding the grass.
    it is a bit difficult to see if the depth texture on the terrain is handled properly by the water shader.
    so could you please add some sharp geometry there as well like simple cubes and spheres?
    if these get rendered properly together with the water (which is what i assume) then something might be wrong with th depth pass of the grass shader.
     
  23. Kingo64

    Kingo64

    Joined:
    Sep 20, 2014
    Posts:
    3
    As requested I've attached an image with sharp geometry. It's definitely an issue with the grass since none of the meshes are affected.
     

    Attached Files:

    Last edited: Jul 30, 2020
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    thanks. so grass is not rendered properly.
    and grass is added as details to the terrain?
    then i can do nothing about it, sorry. it is a "built in" shader.
    you could file a bug report tho.
     
  25. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    107
    Hi,

    There is a way to control snow covrage globally (for all object that using Top down projection shader) ?

    Thanks
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    top down is not only for snow, so: no.
    you can either register all materials to a script and tweak them this way – or hack the shader:
    comment the "strength" parameter in the shader's properties and move it outside the cbuffer (Top Down URP Input.hlsl). for some reason it is called "_NormalFactor"...then set it globally via script: Shader.SetGlobaFloat("_NormalFactor", value);
     
  27. aerisbueller

    aerisbueller

    Joined:
    Aug 3, 2020
    Posts:
    2
    hello @larsbertram1. I was wondering if the basic version of the lighting shader graph node from this article included? (not the toon shading one - the one that just provides basic lighting/shadow information) :
    https://medium.com/@larsbertram1/lwrp-and-custom-lighting-in-shader-graph-6a7c48008a1d

    I couldn't tell from the article if the source code was supposed to be linked in the article, but I couldn't find it, and I wouldn't mind paying for it if not. Also, is Lux Plus required to use this asset?
     
    Last edited: Aug 3, 2020
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    no.
    included custom lighting functions for shader graph are: toon, flat, clear coat, ggx anisotropic, charllie sheen and transmission and transparent. the package does not contain a standard pbr lighting node fro shader graph as this is what the built in node provides. but starting from using the transmission node for example you should be able to create any lighting you want.if you need anything special just let me know.
     
    aerisbueller likes this.
  29. 838nHex

    838nHex

    Joined:
    May 14, 2014
    Posts:
    14
    Hello,
    I use a lux urp billboard and a lux urp fast outline shader. How can I display the billboard infront of the outline ?
     
    Last edited: Aug 3, 2020
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    you have to make sure that the billboard a) is placed in front of the outline and b) renders after the outline.
     
  31. 838nHex

    838nHex

    Joined:
    May 14, 2014
    Posts:
    14
    thanks, any hint to make it renders after the outline?. Layers ?
     
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    using a proper render queue should do the trick:
    1) you have to make the billboard being/using transparent: set alpha from tested to blended. this will change its render queue to 3000.
    2) now have a look at the render queue param of the fast outlibne shader: it is set to 3059 by default.
    3) as can't raise the billboard queue higher than 3050 :( we have to set the render queue of the outline shader to 3049.

    the result should look like shown below.
    please note: other outline materials (on the right) still use queue=3059 so they draw on top of the billboard.

    bboutline.PNG
     
  33. 838nHex

    838nHex

    Joined:
    May 14, 2014
    Posts:
    14
    that works very well. could also realize different layers of billboards. thank you very much
     
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    you are welcome!
     
  35. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    47
    Hi, i am using Unity 2019.4.6f1 with URP 7.4.1 in an OpenVR XR project. I have been using the water shader (from the matching urp package), successfully within the editor, but when I build the project and run it, only the right eye in the headset is rendering the water correctly and the left eye just renders a semi transparent black plane for where the water should be.

    Have you any ideas on what could be the problem? thanks
     
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    that sounds really strange and like a unity bug: maybe the needed vr shader variant gets stripped from the build.
    in case you have renderdoc you could look into what is going on there. otherwise i would file a bug report to unity.
     
  37. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    47
    Hi, thanks for the reply. I set the 'Shader Variant Log Level' (at the bottom of UniversalRenderPipelineAsset settings) to 'All shaders' and I found these entries in the log:
    • STRIPPING: Lux URP/Water (Pass 0 pass) (Vertex) - Remaining shader variants = 960/4608 = 20.83333% - Total = 18068/74612 = 24.21594%
    • STRIPPING: Lux URP/Water (Pass 0 pass) (Fragment) - Remaining shader variants = 960/4608 = 20.83333% - Total = 19028/79220 = 24.01919%
    EDIT: I added the shader to the always included list, built it again and the problem is still there, so I will submit a bug report. thanks
     
    Last edited: Aug 6, 2020 at 1:50 AM
  38. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    98
    Hi, I am having a little trouble with the Decal shader. It works in the Editor Scene View but not at runtime. I am using Unity 2019.4.1f1 and URP 7.3.1., "Depth Texture" is enabled. Maybe I have missed something?

    Here is a short gif of how it looks (hard to describe):



    The unity forum does not seem to like externally linked animated gifs, so here is the direct url: http://kamgam.com/unity/decal-runtime-problem.gif

    Update: got it to work by adding a "Renderer Feature" with the default settings to my ForwardRenderer Settings. Not sure if that's really required for the shader to work.

    Thank you
     
    Last edited: Aug 8, 2020 at 7:16 PM
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,783
    which forward renderer did you use before?
     
  40. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    98
    At project start Unity generated an asset called ForwardRenderer, that's what I was referring to.

    I have made a compilation of screenshots to show the current setup and what's new.
    forward-renderer-setup.png
    Thank you.
     
unityunity