Search Unity

[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,900
    Lux LWRP Essentials provide a growing collection of manually written and optimized HLSL shaders and custom nodes for Shader Graph to cover a wide range of use cases such as:
    • Environment related shaders – like mesh terrain, grass, foliage, rock and water
    • Advanced Materials and lighting – like skin, hair, cloth, transmission, clear coat, glass, toon lighting and lit and shadowed particles
    • Effects – like fast outlines, rim based animated highlights, hidden surfaces, screen space decals and billboards
    Assetstore / Documentation









    Grass.jpg

    Water_2.jpg

    Projection_1.jpg
     
    Last edited: Mar 2, 2022
  2. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    hi,
    do you have any performance scene on android for a sample of a landscape scene with moving grass shader??
     
  3. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Hi, Just wondering if this has an underwater camera included as well? I'm converting my previous project that was using Lux Water in the standard pipe and trying to get as much back as I can before looking elsewhere. any information would be greatly appreciated. thank you! :)
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    sorry, i don't have any as performance depends on a lo of different factors:
    - draw distance of the grass
    - overall amount of placed grass instances (effects culling performance in case you solely rely on built in features)
    - mesh complexity
    - even the resolution of the wind render texture will influence performance.
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    the water shader included is based on my work on lux water. but it is way more simple and does not include any underwater rendering.
     
  6. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    i already bought the asset, what am trying to say here, you need some sort of a showcase demo example.. a scene combines terrain/grass/water etc.. and try to showcase what could be visually done with reasonable performance on a mid range android/ios device.(modern highend devices always will perform well even on heavy shaders)
     
    OfficialHermie likes this.
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.01 is pending – adding a fast outline shader as well as an (animated) rim lighting lit shader.

    Outline01.jpg
    Outline02.jpg
    Outline03.jpg
     
    OfficialHermie likes this.
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    working on unlit decals right now:
    Bildschirmfoto 2019-07-29 um 22.06.35.png
     
    JoshW_3 and Lars-Steenhoff like this.
  9. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    it would be nice if you could support vertex colors instead of splat maps for terrain shaders!
    keep it up!
     
  10. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Any reason why you went straight to 2019 instead of say 2018.3 and up? I'm stuck in 2018.3 for awhile so just wondering why. Looks really great tho once I eventually get into 2019 will pick that up.
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    when it comes to mesh based terrains vertex density may vary heavily: you only add vertices where you really need them. this is one major advantage of mesh based terrains.
    so carving and nicely shaped path or river into you terrain does not need you to raise the overall level of subdivision (height map resolution as far as unity terrains are concerned) but only add some triangles around the effected parts of the terrain:

    meshterrain.jpg

    if you have a look at the wire frame you will see that using vertex colors would not allow you to lively texture the parts of the terrain which are not cliff nor river bed.

    any reason why you would prefer to use vertex colors?
    all i can think of is the fact that – in case you used vertex colors – texturing would follow your changes to the mesh automatically. at least simple sculpt changes like moving some verts. and i am not sure if this feature justifies the tradeoff.
     
  12. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    yes this one, also i read online multiple times that vertex colors texture blending is generally little more "performant" than splatmaps.. (maybe on low poly meshes).. there are pros/cons in any approach..

    when am working with unity and building new meshes in scene.. am fan of probuilder/polybrush..
    and these tools have good vertex color controls.. and these tools in general aren't that good with uvs..
    uvs can shift so easily causing splat map to mismatch (thus requiring repainting again and again..) that's why i like vertex colors.. because they are so easy to work with when editing/changing mesh for any reason.. i can cut/clone part of meshes and reuse/merge them easily with other meshes.. that kind of luxury is lost with splatmaps..

    if you plan to support vertex colors, i would highly "recommend" to check polybrush shaders to see the texture variables naming convention in their shaders.. this will allow polybrush to detect and display textures in your shader inside their tool..
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    adding support for vertex colors should be pretty simple. so i will add it i guess :)
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.01 is available now.
     
  15. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Ah okay. Mildly unfortunate yet good to know. I should be able to either drum up my own solution for this or maybe kitbash with another asset. Thanks very much for the information! :)
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.02 has been submitted:
    ### Added
    - Decal shaders and scripts

    ### Changed
    - Stencil buffer options extended
    - Outline materials adjusted to stencil buffer options

    decals.jpg
     
    ProtoPottyGames likes this.
  17. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    If there lightweight can they be used for say mobile VR on the oculus quest and go?
     
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    not tested but i think so.
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i totally forgot about this in the 1.02 update notes:
    mesh terrain shader now lets you us vertex colors. integration with polybrush seem to be fine.
     
  20. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    lwrp went from preview to production ready with unity 2019.
     
    P3ndragonLLC likes this.
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.02 is available!
     
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.021 has been submitted.
    it brings fully lit decals including normals, ambient occlusion, smoothness and metallic next to distance based fading.
     
    Ruberta likes this.
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    anybody interested in the ongoing development of this asset should consider writing a review on the asset store.
     
    Lars-Steenhoff likes this.
  24. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Good call. Will do. I'm terrible about remembering to do that, but I need to. Not only for this one but all of your stuff I've been using over the years. It's really a stand-up thing the way you price your work so that people like myself who don't make a lot of money (day job: social services) can still contend. :D
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    as people love videos:

     
    chelnok, sjm-tech and ProtoPottyGames like this.
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.021 is available

    ### Added
    - Decal Shaders: Distance based fading
    - Decal Shaders: HDR color input
    - Decal Lit Shader: Support for normal and mask map
    - Decal Lit Shader: Advanced lighting options

    ### Changed
    - Decal script: Allows to align the decal to the underlying normal
     
  29. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    I can't think of any reason why not.
     
  30. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Last edited: Aug 6, 2019
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    thanks!
    not without rewriting them...
    if the the image below shows what you are after, then a top down projection shader will not get the job done.
    just have a closer look at the "after".



    it shows:
    1. wearings at edges
    2. ambient occlusion
    3. all kind of dirt: along the y axis on the red parts, along x axis on the roof.
    to create these in a shader:
    1. it is quite difficult to detect edges in a pixel shader. you can use ddx/ddy to approximate the curvature but this is not very accurate or "clean"
    2. no way to calculate ao in a pixelshader. you either have to bake it (textures, vertices) or apply it as full screen image effect.
    3. the dirt however can be done easily. e.g. you can simply use a 2nd texture and mix it with the base texture. you can even bake it directly into the base texture.
    to achieve:
    1. you do not need substances but could use substance painter to create the masks for the wearings (2nd texture set you mix wit hthe base one). or xnormal if you do not want to spend money.
    2. you can bake ao in pretty much any DCC application. or use substance painter / xnormal.
    3. that can be done in photoshop
    so even with the built in standard shader you could pretty much get the job done.
     
    Last edited: Aug 6, 2019
    AcidArrow likes this.
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.03 has been submitted which brings a dedicated foliage shader supporting pbs lighting, subsurface scattering and more complex bending.

    Bildschirmfoto 2019-08-06 um 20.29.53.png
     
    XthemeCore likes this.
  33. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Thanks. Ah that's disappointing that it doesn't support vanilla unity since a lot of these features are core features for any project. I don't quite understand the decision to make these LWRP specific were the Vanilla Unity features not enough to make these?.

    Is LWRP faster than Vanilla etc?

    By standard render pipeline I meant Vanilla unity out of the box not scriptable render pipeline or anything.
     
    Last edited: Aug 6, 2019
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    lwrp supports up to 4 per pixel lights within a single draw call (upcoming universal render pipeline will support up to 8 afaik) while built in forward rendering has to do one draw call per pixel light.
    furthermore lwrp supports the srp batcher which lifts a lot of work from the cpu.
    but it also has a lot of drawbacks right now – like:
    - no support for per pixel and per vertex lights on the same material: its either or.
    - no support for baked shadow maps.
    just to name a few.
    lwrp or urp are the future. but both pipelines have to evolve imho to really replace built in forward lighting.
     
  35. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    That's why I am just confused on why you would make something for these new render pipelines when they probably won't be truly usable for years to come judging by the track record of Unity. Most users are still Vanilla unity users like myself due to how robust it is and the sheer number of asset store compatibility it has which are not supported in the new pipelines or break.

    As for now it might be a bit too much to ask to convert these all for standard but I wouldn't mind the decal shader being a stand alone asset on it's own it's very impressive and can be alternatively used for grass patches and footpaths too and it works in forward rendering wow!
    The Mesh Terrain shader is a huge performance advantage over the Terrain system of Unity and the projection, pathing and waterfall helps work it all together too.

    If you make these as standalone or just convert it all to Vanilla Standard let us know!
     
    Lars-Steenhoff likes this.
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    2019.3. is supposed to bring shadow maps support.
    camera stacking has been delayed (announced for 2019.2) as well as the increased number of supported pixel lights. but i hope they will come in 2019.3. as well.

    there are still some features missing compared to built in forward (like render with replacement shaders) but i am pretty sure that unity – unless they want to commit harakiri – will listen to the community and add more and more features and stabilize LWRP or URP over time.

    well, with quite some restrictions/artifacts when it comes to lighting.
     
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.03 is available.
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.04 has been submitted which adds a skin shader.

    Skin.jpg
     
  39. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Oh wow! Thank you! I've seriously just been digging through skin shaders for the last 3 days. :D
     
  40. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Me too, care to share what you have found?
    I have found Fast Fake skin on asset store and Unity Separable Subsurface Scattering on github to show best results.
    If you @larsbertram1 you can perhaps upload more pictures of your skin shader because it does look pretty good.
     
  41. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Sure @SilverStorm . Tbh though I did only see one that looked like it had much promise as far as moving over to the LWRP/URP. It was PIDI's PBR Skin + Eye Shader. Seemed to look nice and the developer states that they will support all render pipelines.

    (But yeah.....a bit on the $$$$$$$ side..)
     
    SilverStorm likes this.
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    Version 1.04 is available.
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    textures are a bit blurry (1k only).
    but anyway: the big question is how the shader handles specular and diffuse lighting and how much it costs on the gpu. lux lwrp skin uses 2 different samples of the normals to create crisp (lol) specular and smooth diffuse lighting.
    furthermore you can mix standard and skin lighting in a single material.

    more info in the docs:
    https://docs.google.com/document/d/...azwtpzN7aOLJHvMqE/edit#heading=h.usqfp63lq9wy


    Bildschirmfoto 2019-08-09 um 21.00.59.png
     
    SilverStorm likes this.
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    and a simple video of the skin shader:

     
    sjm-tech, osss and ProtoPottyGames like this.
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    looking into hair shading using Kajiya-Kay:

    Bildschirmfoto 2019-08-13 um 16.52.19.png
     
    osss, SilverStorm and sjm-tech like this.
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.05 has been submitted – which adds the hair shader.
     
    Lars-Steenhoff likes this.
  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    version 1.05 is available.
     
  48. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    I'm getting this error with the hair shader !

    Shader error in 'Lux LWRP/Human/Hair': redefinition of 'ShiftTangent' at Lighting.hlsl(21) (on metal)
     
  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    hmm, i do not get this error (using unity 2019.1.20f1 on macOS 10.11.6, LWRP 5.16.1 and Core RP Library 5.16.1).
    do you use another LWRP or Core SRP?

    maybe newer version already include a "ShiftTangent" function – so in case you use different/newer versions of the LWRP or Core SRP you may edit the "Lux LWRP Hair Lighting.hlsl" file and look for "ShiftTangent":
    simply find and replace it with e.g. "ShiftTangentLuxLWRP" and safe the file. then reimport the hair shader.

    please let me know if this solved the issue!
     
  50. osss

    osss

    Joined:
    Jan 20, 2014
    Posts:
    27
    this error occurred in unity 2019.2.0f1 LWRP 6.9.1.
     
    Last edited: Aug 15, 2019