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 LWRP Essentials

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

  1. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    109
    Great job with this asset! We are currently using built-in renderer with Lux plus, but because of consoles and the overall optimization we are considering switching to URP. However we need features like dynamic snow coverage (in world space) and dynamic wetness (ideally with puddles). We would need it on Mesh Terrain Shader, Decals and Lit Shader/Lit Uber Shader. These missing features are holding us from switching to URP :(

    Here are few examples from our game with Lux plus:

    dynamic_weather.png

    wetness.jpg
     
    milox777, Rowlan and Quast like this.
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    these may come some day – but no eta, sorry.
    nice screen shots btw!
     
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    regarding urp: right now you have 8 additional lights. but when it comes to a city scene each car will just add 2 spot lights (front) and maybe just a single for the back lights. so 8 is not really huge amount here. and i wonder why you should go away from built in deferred before upr supports deferred rendering as well?
     
  4. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    109
    We had information that deferred was coming in 2020.1, but this have changed recently to 2020.2. So yeah, right now it would be pointless.
     
  5. vsinners

    vsinners

    Joined:
    Jun 12, 2019
    Posts:
    2
    Hello! I'm using Unity 2019.2.7f2.

    Currently having 2 problems.

    Having some wrong backface reflections using an older version of the hair shader. The backfaces are extremely light. I tried using the updated version with VFACE and it looks like the problem persists + wrong zsorting.

    hair_back.png ^weird backface lighting with older shader

    hair_with_updated_shader.png
    ^wrong zsorting with updated shader

    And my second problem is a weird alpha issue at the edge of the hair. This problem is only in VR, as it looks fine in the normal unity project.
    hair_VR.png
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    z sorting within a single mesh of course is not suported. but enabling vface should give you proper results.
    make sure you do not have double sided geometry.

    regarding alpha: this could be related to msaa.
     
  7. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    70
    hey does this plugin works with ARFoundation?
    I can see that the description in the asset store says "...using Vulcan"
    vulcan.PNG
    is that "Vulcan" or "Vulkan"
    are you meaning Vulkan Graphics API?
    which is not supported by ARFoundation.
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    version 1.4.1 for urp 7.2 is available.
     
    AA-Matt likes this.
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    i have not checked ar. and vr only using the rift.
     
  10. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    70
    Okay.
    It will run on OPENGELS3 right?
    without the Vulkan graphics library?
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    i have not checked each single shader (there are just too many of these) but most if not all should be fine.
    otherwise just let me know.
     
  12. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    70
    I just need the hair/fur shader. Can you please make sure will it run on OPENGELS3 only? (without vulkan)
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    i do not get any error when compiling for opengles3. so it should just be fine.
     
  14. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    70
    Okay, thanks.
     
  15. Arsonide

    Arsonide

    Joined:
    Nov 16, 2009
    Posts:
    39
    Hello, I am using Lux URP for a variety of things, but I had a question about the Billboard shader. I am using it as a replacement for lens flares currently along with some scripting. It's working great, except for one small caveat.

    When I rotate my head (VR) left or right, the billboard also rotates left or right, which is a bit disconcerting. If I check the "Upright" option, then this stops occurring, but it also has some other side effects, like the billboard will no longer rotate up and down if I move above it.

    All I'd like to do is stop the left/right rotation with the camera when I twist my head, keeping all other functionality. How would I need to modify the shader to do this?
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    right out of my head: the easiest thing might be to gran the roll rotation of the camera and fed it as global matrix to the shader. there you would perform the regular billboard transformation in view space and finally (just before the shader goes to world and clip space) the roll rotation on top.
     
  17. eldvbear

    eldvbear

    Joined:
    Jul 21, 2016
    Posts:
    3
    Installed the newest version of LWRP essentials. I am getting a strange flickering in the shadows on the Foliage and Grass shaders when rotating the cameras. Have tried a number of things, and fiddling with the settings. The previous version did not have these problems. Using unity 2019.2.19f.
     
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    the last update only included changes for urp and unity 2019.3. you should not have got this version as it is related to urp. do all the shaders still identify as Lux LWRP and not Lux URP?
    if so: i stopped looking into unity 2019.2. as it used to be too buggy. 2019.1. and 2019.3 should be fine though.
     
    Last edited: Mar 1, 2020
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    just a minor update as 1.4.2 will only bring a new shader graph node for improved uvs and better texture sampling eliminating these diamond crosses from regular bilinear filtering at virtually no costs (well, some ALU ops):

    improvedSampling.gif
     
    soorya696 likes this.
  20. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    ## Version 1.42 has been published
    ### Added:
    - Lux URP version: Improved Sampling Shader Graph node added.
     
    osss likes this.
  21. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    70
    @larsbertram1 is it possible to make fur with your plugin like this?

    dog.PNG

    if not, please consider this as a feature request.
     
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    nope, multi pass shaders are not supported in URP...
     
  23. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    70
    sorry. I'm not familiar with shaders.
    is it possible to make a single color fur?
    just the white portion only?
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    it is not about the color :)
    it is about the fibres: usually you would use one shader but make it use 8, 16, 32, 48 passes to draw the fibres as shells. as urp does not support multi passes you would have to assign 8, 16, 32, 48 materials and slightly change them from pass to pass!
    mayb shader features or custom scriptable passes may help here...
     
  25. Rexoto-Games

    Rexoto-Games

    Joined:
    Jan 11, 2013
    Posts:
    41
    Getting the same issue using 2019.3.3f1
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    this flickering occurs if you use URP 7.1.8.
    you have to upgrade to 7.2.1.
     
  27. qpuilie

    qpuilie

    Joined:
    Jan 14, 2020
    Posts:
    47
    I use your Lux_URP Essentials
    Now,I found that some quesstion for human skin shader
    The shadows was layered,When I select the Receive Shadows checkbox
    Such as:


    I will appreciate it if you could help me
     

    Attached Files:

    Last edited: Mar 7, 2020
  28. qpuilie

    qpuilie

    Joined:
    Jan 14, 2020
    Posts:
    47
     

    Attached Files:

  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    oh, that is a problem of self shadowing, shadow bias and the smooth skin normal.

    this screenshot shows light * shadows * NdotL
    selfshadowing causes the artifacts or stripes you see.
    skin_ndotl.PNG

    adding a "harsh" normal map hides most of the artifacts, but some still are visible:
    skin_ndotl_normal.PNG

    the problem with skin lighting: we want smooth normals for the diffuse lighting :(

    using smooth normals (or just the normals from the geometry by setting the normal scale factor to 0.0) any shader will reveal these artifacts. URP Lit on the left, Lux URP Skin on the right:
    skin standard.PNG


    so all you can do right now is less smoothing the diffuse normal.
    in addition to this you may tweak the shadow caster pass.
    find:
    output.positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, _LightDirection));
    and replace it with e.g.:
    output.positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS * 0.5, _LightDirection));

    the next update will let you tweak the shadow bias in the material.
     
  30. SuperSteeeeeeeve

    SuperSteeeeeeeve

    Joined:
    Jan 12, 2018
    Posts:
    19
    Screenshot_20200308_074042.png
    Hi i'm getting this strange black circles on the terrain shader, it happens when "Cast Shadows" is on.
    It was on 7.1.8 (previous version of URPE and current version), i thought its a Vulkan bug on Linux's side but unfortunately not, on Windows in DX11 its the same.
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    i assume that you are either using URP 7.2+ and "old" Lux URP Essentials or URP < 7.2. but the latest Lux URP Essentials. With URP 7.2. Unity changed the way they handle shadows. So you have to make sure URP and Lux URP Essentials match.
    I recommend to use URP 7.2.1. and the latest version of Lux URP Essentials.
     
    SuperSteeeeeeeve likes this.
  32. SuperSteeeeeeeve

    SuperSteeeeeeeve

    Joined:
    Jan 12, 2018
    Posts:
    19
    I'm on URP 7.2.1, and URPE is on latest version, i've imported the URP7.1.8 Unitypackage by mistake because i still thought it relies still on LWRP and this package is intendet to use URP instead, just deleted both folders and reimported it without importing the separate unitypackage fixed it, thanks!
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    Version 1.43 is available
    ### Added:
    - Lux URP version - Skin shader: Shadow and shadow sampling bias added.
     
    Lars-Steenhoff and osss like this.
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    version 1.4.3 should allow you to improve this.
     
  35. qpuilie

    qpuilie

    Joined:
    Jan 14, 2020
    Posts:
    47
    Thank you very much for answering my questions.I'm sorry to disturb you again,I Want know:How can i acchive your effect of your screenshot in picture2?the details are great.
     

    Attached Files:

  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    those a "bad" diffuse normals... as they are too harsh. they are fine for the specular lighting tho.
    you can adjust the sharpness of the diffuse normals using the "bias" slider.

    and upgrade to the latest version which contains properties to adjust the shadows.
     
  37. qpuilie

    qpuilie

    Joined:
    Jan 14, 2020
    Posts:
    47
    I hava a quesstion for Hair Shader.
    Could you tell me why the seam of uv appears here?I was puzzled.
     

    Attached Files:

  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    look into your uvs. uvs are stored per vertex and then interpolated in the fragment shader.
    nothing special here regarding the hair shader.
     
  39. qpuilie

    qpuilie

    Joined:
    Jan 14, 2020
    Posts:
    47
    The first picture is your material in Demo screenshot ,I never change it,I want to know it's right? uvs seem to be no problem.
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    that is a unity standard sphere. you probably will provide better uvs on your custom hair mesh.
     
  41. Andrzej828

    Andrzej828

    Joined:
    Jun 22, 2015
    Posts:
    3
    Hello, I tried this package out but have gotten many errors on import (I sent you an e-mail with more info). I'm mainly looking for the toon shader. The shader graphs don't seem to pick up their respective subgraphs (saying they are invalid). But I can open the subgraphs just fine. Any ideas? Thanks.
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
  43. manmantas

    manmantas

    Joined:
    Mar 24, 2018
    Posts:
    2
    Hello, I'm having a problem with your skin shader. It doesn't seem to receive shadows from other objects, but kind of generally checks if it's in shadow. I tried messing with the shadow settings but nothing seems to help.
    upload_2020-3-13_12-57-39.png
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    hmm, just works fine for me. do you have the right version of URP (7.2.+)?
     
  45. sas67uss

    sas67uss

    Joined:
    Feb 8, 2020
    Posts:
    50
    Hi
    very nice asset
    but i have a question :
    do you have any solution to apply stochastic procedural texturing on mesh terrain texturing or mesh terrain shader?
     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    yes.
     
  47. sas67uss

    sas67uss

    Joined:
    Feb 8, 2020
    Posts:
    50
    What is this approach ?
    Where is that ?
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    oh, sorry: i overlooked the "mesh". procedural stochastic texturing is only supported on unity terrains.
     
  49. Rexoto-Games

    Rexoto-Games

    Joined:
    Jan 11, 2013
    Posts:
    41
    This asset is great and has been a real time saver for switching to URP for VR. But I'm now having trouble with the water shader. It works fine in single pass but once I switch to single pass instanced edge blending doesn't work for the right eye. Using 2019.3.3f1, URP 7.2.1 and LUX URP 1.42. watershader.PNG
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,846
    hmm, it all worked fine in versions before URP 7.2. since unity has switched to their xr framework a was not even able to run vr... will have a look into it.
     
unityunity