Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Lux URP Essentials

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

?

Does Lux URP Essentials need a Discord Server?

Poll closed Apr 29, 2021.
  1. yes - even if there was no moderator

    4 vote(s)
    57.1%
  2. no, the forum is all we need

    3 vote(s)
    42.9%
  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    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:
    142
    I think that is what I am doing? Shader -> RT -> Decal over the mesh
     
  3. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    92
    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:
    6,899
    it would be: procedural shader -> rt -> terrain or whatever it is shader. no decal projector involved :)
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    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:
    345
    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:
    6,899
    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:
    345
    Thanks. Sorted.
     
  9. larsbertram1

    larsbertram1

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

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    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:
    6,899
    :)
     
  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:
    6,899
    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:
    181
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    colin299 likes this.
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    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:
    6,899
    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:
    62
    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:
    6,899
    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:
    6,899
    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:
    6,899
    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:
    177
    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:
    6,899
    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:
    6,899
    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:
    6,899
    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:
    6,899
    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:
    6,899
    you are welcome!
     
  35. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    78
    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:
    6,899
    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:
    78
    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
  38. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,298
    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
  39. larsbertram1

    larsbertram1

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

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,298
    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.
     
  41. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    Hello, im trying to use the URP skin shader on the lastest unity 2019 LTS. Everything seems to work fine, but sometimes when i have 2 characters using the same material for it's face one of them becomes pink, but not the other.
    Any idea what causes this? or how to fix it?

    Also is there any way to make the shadows less strong on the face?
     
  42. Abended

    Abended

    Joined:
    Oct 9, 2018
    Posts:
    142
    I am having an issue with hidden surfaces. the hidden surfaces are showing through the objects normal material.
    upload_2020-8-15_11-50-35.png upload_2020-8-15_11-53-58.png upload_2020-8-15_11-53-8.png
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    unfortunately no, this does not make any sense at all... using the same material should always give the same result?! have you checked the material that is pink? do you use any script on the materials like renderer.material? (this would instantiate the material. use sharedMaterial instead).
    you can only fade the shadow strength on the transmissive lighting by default - not the direct lighting. this is due to the fact that specular highlights may become very, very bright. so reducing shadow strength on the direct lighting will look ok when it comes to the diffuse part but will leave odd looking specular highlights in the areas which are in shadow :(
    for this reason using pbs you may never set shadow strength to something smaller than 1.0.
    all you can do is to edit the lighting function and split it up into diffuse und specular. then use your tweaked shadow strength just for the diffuse part, but use the original value of 1.0 on the specular one.

    let me know if you need further advice.
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    in the outline shader "stencil comparison" is disabled. this means that it will draw the hidden surfaces whenever it is behind any kind of geometry as it simply ignores the stencil.
    your material writes 9 into the stencil buffer.
    so the outline should use:
    stencil reference = 9
    stencil comparison = notequal
     
  45. Abended

    Abended

    Joined:
    Oct 9, 2018
    Posts:
    142
    Lars,

    I had the stencil off because that was what the hidden surfaces in the doc suggested. When I use the stencil, I can't see the hidden surface when its obscured. do these two things conflict with each other? my settings are the same as my screenshot, now updated with your suggestion.

    Thanks!

     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    i might not have tested this with concave geometry when writing the docs.
    however using the stencil in conjunction with proper depth testing should get you get the job done.

    the base material writes "2" into the stencil buffer whenever it successfully passes the depth test.
    if depth testing fails it will not dirty or change the stencil buffer (using: Stencil Z Fail Op = Keep)
    the hidden surface shader will only draw if 1) the depth test fails and 2) the stencil buffer does not contain "2".
    in order to ensure that the depth test will fail it is important that (here) the saw draws after the box. do so by setting priority to "1".

    complex_hidden.PNG
     
  47. Abended

    Abended

    Joined:
    Oct 9, 2018
    Posts:
    142
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    new showcase:

     
    mikeohc, biscito, URPian and 7 others like this.
  49. Abended

    Abended

    Joined:
    Oct 9, 2018
    Posts:
    142
    @larsbertram1 Ran into a problem related to the hidden surfaces. My object is a probuilder arrow, nothing complicated. if I alter the vertices( I was collapsing them) the outline shader no longer works on the object. I had to rollback my changes to get the shader working. None of the shader/material variables were changed it just refused to work. It was only ~20 verts, so I don't have to collapse them but wanted to make you aware.
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    i am not into pro builder at all.