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. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Was there ever an official answer for this or anyone using these shaders on the Quest/Go? I would be interested to know as this looks perfect for a VR title I am working on.
     
  2. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    I'm using the Tree creator shaders from LUX now, and I have one question:

    When I apply the material with the lux shaders to a tree it works,
    but when I change the Tree Seed, it goes back to the default Hidden/Nature/Tree Creator Bark Optimised shader.

    Is there a way to overwrite the default unity hidden shader with the Lux shaders?
     
    f1chris likes this.
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you have to apply the lux lwrp shaders (non optimized version) to the material used within the tree creator. then the tree creator will generate the optimized materials using the lux optimized shaders.
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i ckecked them on the rift and dx11. gles 3.0 should be fine as well but i did not check.
     
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Thanks that fixed it.
    I did get 3 warnings in the console:
    Don't know if they are safe to ignore?

    Im testing on 2020.1a9

    Material doesn't have a color property '_TranslucencyColor'
    UnityEngine.Material:GetColor(String)
    TreeEditor.TreeEditor:GUIMaterialColor(Material, String, String) (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:1971)
    TreeEditor.TreeEditor:InspectorRoot(TreeData, TreeGroupRoot) (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:2104)
    TreeEditor.TreeEditor:OnInspectorGUI() (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:2427)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Material doesn't have a float or range property '_TranslucencyViewDependency'
    UnityEngine.Material:GetFloat(String)
    TreeEditor.TreeEditor:GUIMaterialSlider(Material, String, String) (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:1987)
    TreeEditor.TreeEditor:InspectorRoot(TreeData, TreeGroupRoot) (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:2106)
    TreeEditor.TreeEditor:OnInspectorGUI() (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:2427)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Material doesn't have a float or range property '_ShadowStrength'
    UnityEngine.Material:GetFloat(String)
    TreeEditor.TreeEditor:GUIMaterialSlider(Material, String, String) (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:1987)
    TreeEditor.TreeEditor:InspectorRoot(TreeData, TreeGroupRoot) (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:2108)
    TreeEditor.TreeEditor:OnInspectorGUI() (at /Users/builduser/buildslave/unity/build/Modules/TreeEditor/TreeEditor.cs:2427)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    should be safe to ignore.
     
  7. Blarghle

    Blarghle

    Joined:
    Aug 19, 2014
    Posts:
    19
    Hmm, I checked the demo scene, and I don't see the problem there by default, even with the clipping planes set to .3 and 30000. However if I parent everything in the scene to an empty game object, and move the gameobject to x 20000 y 20000 z 20000, then the issue shows up. Playing with the lighting didn't change it that I could see.
    I realize that such a large world is an edge case, but is unfortunately necessary for the kind of game we're making.
     
    ROBYER1 likes this.
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    sorry, this is nothing i can help with :(
    hdrp introduced camera relative rendering which would probably fix the graphical part of this. but physix still will break afaik.
    maybe dots physics or havok use double precision but standard float precision in unity does not cover such huge areas. some people say it gets unstable at 6000 m, others say you can go up to 9999. but 20000 is definitely out of scope i think.
    a common way to work around this is to use a floating origin, but i am sure that you are aware of this.
     
  9. Blarghle

    Blarghle

    Joined:
    Aug 19, 2014
    Posts:
    19
    It's cool, I think I can work around it.
    I wonder if these kinds of features will eventually make their way from HDRP into URP?
    Yeah that's very unfortunate, but I'm sure we'll find a way to make the phsyics work!
     
  10. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    i would like to see a color overlay to the terrain mesh shaders
     
  11. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    and a base normal map featuere
     
  12. T-Rocktopia

    T-Rocktopia

    Joined:
    Jul 16, 2014
    Posts:
    9
    How would I go about editing the decal shaders to work with Orthographic cameras? It only seems to work with perspective cameras at the moment.
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    decals supporting orthographic projection are coming in version 1.2:

    ortho decals.PNG
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    would be nice - but unfortunately out of the bounds of gles 2.0 as too many texture samplers would be needed.
     
  15. T-Rocktopia

    T-Rocktopia

    Joined:
    Jul 16, 2014
    Posts:
    9
    @larsbertram1 Thanks! Also, is there a way to tile the texture used in the decals? I'm trying to hack my own solution into the unlit decal shader. Any thoughts?
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    version 1.2 is available!
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    the uvs are calculated in this line:
    float2 texUV = opos.xz + float2(0.5, 0.5);
    which centers the uvs in objectspace. you can simply scale them afterwards like:
    texUV *= 2.0f;
    or offset them:
    texUV += float2(0.1f, 0.6f);
    if you need per material control over it you have to add a property to the properties block like:
    _TilingOffset("Tiling (XY) Offset", Vector) = (1,1,0,0)
    and add _TilingOffset to the CBUFFER like
    float4 _TilingOffset;
    then you calculate the uvs like this:
    float2 texUV = opos.xz + float2(0.5, 0.5);
    textUV = texUV * _TilingOffset.xy + _TilingOffset.zw;


     
    T-Rocktopia likes this.
  18. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    141
    Hi can you guys give an use case for this feature? Thanks a lot!
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    Decals:
    • Use them to decorate your scene – like adding some damage, dirt or puddles here and there.
    • Use them to dynamically add feature such as blood or damage.
    • Use them to add some kind of a "ring of spell force"
    • Use them to do an old style blob shadow.
    Doom without and wit decals:

    Bildschirmfoto 2019-10-29 um 22.08.22.png
     
    tehusterr and Lars-Steenhoff like this.
  20. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    141
    Cool example! I'm afraid I was not clear, sorry.
    I was actually asking about the meaning that decals support "orthographic" projection. I had already seen decals in the samples and I was curious about this feature.
    Thanks a lot!
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    orthographic decals were a customer request.
     
  22. T-Rocktopia

    T-Rocktopia

    Joined:
    Jul 16, 2014
    Posts:
    9
    Perfect! Exactly what I needed. Thank you so much for all your help.

    This is the result -- made some underwater caustics for my pet simulator game - Voxelotl Garden.

     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    nice – but quite heavy i guess.
    i wonder if it would be cheaper to add caustics right in the material shaders – where they cold even effect lighting.
     
  24. lizkin

    lizkin

    Joined:
    Jun 22, 2013
    Posts:
    18
    Hello, I am interested in this package. But a bit confused about content. Does this asset also contains the assets " Lux Water" and "Lux Particle Effects" ? Or this one is LWRP compatible version alternative of those assets ?
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it contains the LWRP version of Lux Lit particles and a simple LWRP water shader.
    Lux Water does not work with LWRP.
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    First tests using vector displacement fields to dynamically bend grass.
    no additional camera is used :)

     
    Last edited: Oct 30, 2019
    Mister-D, duncanx and osss like this.
  27. T-Rocktopia

    T-Rocktopia

    Joined:
    Jul 16, 2014
    Posts:
    9
    I think I understand what you're saying. Add Caustics to the LWRP shaders used by the environment and characters instead of projecting a decal over the whole environment.

    I'll see what I can do to make that happen. I'm trying my best to learn shaders, so it is a bit of a struggle.
     
  28. Lay84

    Lay84

    Joined:
    Mar 8, 2014
    Posts:
    34
    Hello, I recently purchased your asset and I'm looking forward to implementing but I'm running into a small issue, well its more of my own ignorance than an issue; What is or how do I get a skin mask for "Skin Lighting", I don't see how to export that texture map in any program including marmoset which has every texture type. thanks for any help
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    take a look at the top down projection (rock) shader e.g. the most complicated part is about the projected normals – which you can simply skip as you do not need it.
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    oh, that is my own invention :) it is like a metalness mask: all parts of the mesh which shall receive standard pbr lighting instead of skin are simply black in this map.
    think of a bare arm with some metal parts on it (like jewelry or armor): usually you would have to use 2 materials to get proper lighting on skin and armor. but using the skin mask you can simply use the skin shader on the entire arm.
    got it?
     
    Lay84 likes this.
  31. Lay84

    Lay84

    Joined:
    Mar 8, 2014
    Posts:
    34
    @larsbertram1 Ha Thanks, that explains a lot! while I have you, are you using any assets that allow you to plug in the different maps on channels within unity or just using photoshop? I am familiar with photoshop just trying to see the best workflow
     
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    using photoshop.
    and usually a bunch of adjustment layers.
    using a unity editor extension would probably mean – 2 clicks?
    1. doing the changes in photoshop.
    2. finding your combined texture asset in unity and recreate it...
     
    Lay84 likes this.
  33. lizkin

    lizkin

    Joined:
    Jun 22, 2013
    Posts:
    18
    Thank you very much
     
  34. mfitzpatrick-1

    mfitzpatrick-1

    Joined:
    Oct 8, 2013
    Posts:
    31
    Does Lux for LWRP support WebGl, I'm having a weird issue when viewing in webgl, doesn't seem to work correctly, shader turns off.

    Thank you.
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i never really checked this as i expected LWRP to just support all platforms. but i gave it a try and it looks fine.
    i checked the "custom shader graph demo" scene which looks like this:

    Bildschirmfoto 2019-11-01 um 21.00.31.png

    so my answer is: yes.
     
  36. mfitzpatrick-1

    mfitzpatrick-1

    Joined:
    Oct 8, 2013
    Posts:
    31
    Ok, thank you! That narrows it down on my end.
     
  37. TheFlyHawk

    TheFlyHawk

    Joined:
    Mar 23, 2016
    Posts:
    58
    Some parameters of the "Lux LWRP Lit Extended" are not refreshed when modified, and "Advanced Option" parameters did not work properly when modified at run time. But the “Lightweight Render Pipeline/Lit” is correct.

    unity 2019.2.11
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    which are not refreshed?
    sorry, but i doubt this.
    advanced -> specular highlights and environment reflections bot are defines as shader features:
    #pragma shader_feature _SPECULARHIGHLIGHTS_OFF
    #pragma shader_feature _ENVIRONMENTREFLECTIONS_OFF
    so they get evaluated only at compile time and can not be changed at run time.
     
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    Lux LWRP Essentials version 1.21 is available.
     
  40. sisermann

    sisermann

    Joined:
    Jun 27, 2013
    Posts:
    25
    Hi, I recently tested the Shaders in VR in Unity 2019.3.b8 and URP 7.12. It seems the new URP post processing only works in (Single Pass Instanced) mode, in Single Pass mode it breaks. The main problem is that many features of the LWRP Essentials like decals, etc. seem only to work in (Single Pass).
     
  41. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i haven't checked urp and vr yet. but read some posts which claim that vr seems to have a lot of problems with urp in general when it comes to read the color or depth buffer...
     
    sisermann likes this.
  42. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    just a suggestion,

    maybe a skyshader that supports a tilling cloudtexture moving across the procedural sky? i made my own in shadergraph but its not looking very good ;)
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i checked single pass instancing in urp and tweaked the water and decal shaders accordingly.
    i will send you a package via pm so you may give it a try. feedback is welcome :)
     
    sisermann likes this.
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    version 1.22 has been published.
    ### changed:
    - Hair shader: Cull exposed
    - URP: Experimental support for "single pass instanced" rendering added to the decal, water and glass shader.
    - PLEASE NOTE: Shader graph shaders do not support VR using URP at all... they are broken.
    ### Added: - Hair shader: VFACE added which provides proper lighting on back faces.
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    latest update lets you turn on VFACE which allows to have proper back face lighting (including ambient reflections).
     
    wdw8903 likes this.
  46. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    not all the shaders are working.

    is there support for toon environments in this package ?
     

    Attached Files:

  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    which version of unity do you use? 2019.3b?
    it looks as if the materials lost the connection to the shaders...
    fortunately the materials more or less contain the name of the shader which must be used – so it is pretty simple to reassign the shaders.
    i will update the urp package.

    it comes with a versatile toon lighting node for shader graph as well as flat shading.
    are you looking for anything specific?
     
  48. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    Im looking to synchronize the terrain with my characters (more than it is in this pic)
    im on 2019.2.3
     

    Attached Files:

  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hmm, difficult to say wahr kind of lighting your characters use... any info about this?
     
  50. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    they are using the "real toon" shader from the asset store
    other wise I do not know enough to go into detail

    unfortunately the toon shaders in the demo seen are some of the ones not rendering