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

    al3xj3ns3n

    Joined:
    Sep 10, 2018
    Posts:
    21
    The decal can be any shape, it's read in as a series of coordinates which we use to generate a mesh that has these stencil shaders applied to it. Here's one for Hawaii as an example.

    upload_2022-8-29_15-31-51.png
     
  2. Grannyboy

    Grannyboy

    Joined:
    Jul 23, 2019
    Posts:
    4
    Greetings! I have a slight issue and im not sure its related to this asset or not but I will try here anyway. Im using Urp 10.3.2 and I need decals. Upgrading to 12.x.x isnt an option atm since it might wreck my entire MMORPG im working with.
    I have this issue where my decal collides with IsTrigger colliders. Is there any work around for this? Please see attached video and if additional information is needed please let me know!
     
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    decals are graphics. colliders are physics/programming -> cpu. something in your code seems to be brpken i guess.
     
  4. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Hello,

    Was wondering if I might be able to get help with the Lux URP/Human/Hair material when used in a RenderTexture. I have an ape character that uses this material. I currently have a Canvas scene going on where I have a RenderTexture set up to render the character on the canvas in a Raw Texture.

    The problem I'm having is the character, and any character using the hair material, when rendered on the RenderTexture seems to be appearing transparent to the other images in the background (e.g. can see the drea of the background image appearing through him when it's behind).

    Is there a known fix for this? This only appears to be happening to the hair material. The other materials that are solid don't seem to have this issue.

     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    to me it does not look transpoarent as i can see some black strands in front of the "drea". also the face. you might have to tweak the alpha cutout threshold? and may llok into the hq variant using 2 materials to smooth the hair a bit.
     
  6. Blepius

    Blepius

    Joined:
    Mar 9, 2021
    Posts:
    68
    Hello!

    What would be the best way to cover a 3000x3000 meter area with water?

    Should we tile planes and let frustum culling handle far away tiles? (eg, 30x30 planes that are 100x100 meters)

    Or should we modify material offset values in order to warp/center a single large water plane onto the player?
     
  7. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    Hey, I am getting an error if I use subgraph LuxURP SKin Lighting in my shader graph:
    undeclared identifier '_SkinLUT' at Graphs/Includes/Lux_Lighting_Skin.hlsl(47) (on d3d11)

    The shader graph example provided with the lib seems to compile fine. I copied all settings of the master node, but still getting the compile error.

    Edit: Additional info: Running Unity 2021.3.10 with the according URP version, and migrated from HDRP to URP (also the shader graph with the error, was a StackedLit master node before, and changed it to URP / Lit).
     
    Last edited: Sep 26, 2022
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    i would go with tiles.
     
    Blepius likes this.
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    stay with the provided example. duplicate it and tweak it if needed. it should just work properly.
     
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    ah, and your graph must have a texture2D property named "_SkinLUT" in the reference. you can copy this from the provided shader graph.
     
    Qleenie likes this.
  11. Grannyboy

    Grannyboy

    Joined:
    Jul 23, 2019
    Posts:
    4
    Hi again, im not completly sure how the URP ignore decal works. I have the Synty modular character and I want this characters material to ignore decals, see picture for clearifications:
    upload_2022-10-12_20-36-4.png

    How would you recommend I go on about this?

    Thanks in advance!
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    lux urp decls do not have decal or rendering layers like latest urp (14 i guess) but relies on a) the stencil buffer or b) rendering order.
    a) and b) both are included in the decal demo scene. a) needs a shader on the character that allows you to write to the stencil buffer (like the lux urp hlsl shaders) and is stable while b) uses the depth buffer from last frame and is not stable.

    in short:
    a) dirty the stencil buffer with your character by setting it to e.g. 1. then draw the decal but check the stencil and only render the decal if the stencil is not 1.
    b) is based on the rendering order. start with rendering anything the decal shall appear on top. then the decal. finally everything the decal shall not effect.

    more info: https://docs.google.com/document/d/...azwtpzN7aOLJHvMqE/edit#heading=h.9p8smgkrz6b2
     
    Grannyboy likes this.
  13. Grannyboy

    Grannyboy

    Joined:
    Jul 23, 2019
    Posts:
    4
    Worked like a charm, thank you sir!
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    you are welcome!
     
  15. c_hanson

    c_hanson

    Joined:
    Nov 7, 2017
    Posts:
    2
    upload_2022-10-14_13-56-18.png

    This is what my TextureDisplace Grass Displacement shader looks like after following the setup instructions. The other foliage looks fine, just the grass looks like this. any thoughts?
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    might be a missing rendering feature? if not enable the displacement texture will be unefined.
     
  17. c_hanson

    c_hanson

    Joined:
    Nov 7, 2017
    Posts:
    2
    This was my bad, I didn't realize I was on URP 13.. Downgraded my project to 12 and it works perfectly now!
     
  18. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Hi again, after further research, I found that the Unity URP Lit Shader was having the same issue in 2021. However, upgrading to 2022 shows it's been fixed in the Unity URP Lit Shader, but still having the issue with the Lux URP shader. Also, using latest Lux URP Shader available on the store atm.

    Lux:
    upload_2022-10-18_10-36-9.png

    Unity URP Lit Shader:
    upload_2022-10-18_10-37-3.png


    Both in same screen:
    unknown-140.png





    I had posted a thread about this for 2021 due to it happening in Unity's renderer. Hoping we can get this resolved for Lux as I do prefer it over Unity.
     
    Last edited: Oct 18, 2022
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    hi, i do not know about this issue in 2021. support for 2022 is coming but has not arrived yet.
     
  20. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    If you can fix the issue for 2021 then that would be appreciated as well. Again, can reference my earlier post here, or my existing thread about those issues.
     
  21. ylche

    ylche

    Joined:
    Aug 30, 2022
    Posts:
    7
    Hi,

    I'm finding the hair shaders cause my hair to have a grey-ish base colour, even though the base and secondary colours are set to white, and the albedo texture is white.

    example.png

    Example above the hair uses blend+basic hair shaders and the eyebrows are just the blend shader. I've played around with the various settings and colouring the hair any other colour looks fine, but it never gets any lighter than this grey.

    Have I just misconfigured something?

    Thanks!
     
    Last edited: Oct 24, 2022
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    not sure what you are trying to achieve.
    from what i can see the specular highlights are a bit subtle. so try to increase smoothness and/or brighten the spec color.
     
  23. ylche

    ylche

    Joined:
    Aug 30, 2022
    Posts:
    7
    The specular highlights I adjusted to my liking and that isn't a problem. If I set the base / albedo colours to red it looks red, if I set it to blue then it looks blue. But in that screenshot I've set it to white but it still looks medium grey to me. Nothing I do lets the hair go any lighter than that grey. The character is supposed to have adjustable hair colour but if I want her to have white hair then it won't work.
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    i see. have you checked secondary specular light, ao etc?
     
  25. Tsehov

    Tsehov

    Joined:
    Oct 31, 2022
    Posts:
    1
    Is there a shader in the LUX RP library which can replace Versitile Blend? This shader is very useful in the project that I'm working on and in LUX RP v1.86 there is no Versitile Blend shader anymore. At least I can't find it. Or maybe I can load Versitile Blend separately into Unity and use it. Can you help with it, please?
     
  26. ylche

    ylche

    Joined:
    Aug 30, 2022
    Posts:
    7
    Seems I had the specular light set to grey, which I copied over from the demo materials. Mea culpa. Setting it to white seems to improve things, but I'm still left with a light grey which is good enough. Enabling/disabling AO doesn't seem to make a huge difference.

    Thanks for your help.
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    it should be still there?! maybe you have to install an older version to get it. 1.86 just might not update it.
     
  28. flissule

    flissule

    Joined:
    Aug 23, 2013
    Posts:
    6
    Hi! I noticed that since the latest update I can't change the render queue value for the Lit Extended Uber shader. Depending on the surface type it immediately switches back to Geometry/2000 or Transparent/3000 no matter what I do. Is that normal ?
     
  29. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    Hey, I have another question regarding the shader graph nodes for skin; I'd really like to feed in my own normals, as I usually blend multiple normal maps for e.g. wrinkle and other things. This seems currently not possible, as we only can feed in the textures, and sampling happens somewhere inside.
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    ah, sorry. i tweaked the validate function o the material editor - which now resets the the render queue.
    in order to fix this edit the "LuxUberShaderGUI.cs" and find the "public override void ValidateMaterial" function.
    there comment the line:
    material.renderQueue = (int)RenderQueue.Geometry;
    and the line:
    material.renderQueue = (int)RenderQueue.Transparent;
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    sampling happens inside the HLSL include file as shader graph does not offer a function to do TEXTURE2D_SAMPLE_BIAS. :(
     
  32. flissule

    flissule

    Joined:
    Aug 23, 2013
    Posts:
    6
    Thanks! Worked perfectly :cool:
    Is this something that I'll have to do with every new update?
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    na, i will fix it. thanks for pointing this out!
     
    flissule likes this.
  34. flissule

    flissule

    Joined:
    Aug 23, 2013
    Posts:
    6
    Cool, thanks for your quick support !

    I actually had another question.
    I was playing around with foliage and wind and I was looking for a way to make it work in our game that takes place on moving spherical worlds. The fact that the planets are moving around makes the grass jitter like crazy since they're running all around the wind texture, I guess.
    Do you think it would be complicated to set up maybe local wind zones with spheres of influence could be parented to each planet, or maybe it just doesn't work like that ?

    Just wondering if it's worth investigating any further...

    Thx !
     
  35. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    And yet another question: Is there a way to build a Hair shader with shader graph? There are nodes for skin and stuff, but there seems nothing for the Hair shader. This would be especially necessary to use the new Untiy hair package with Lux, as we need to set vertex positions, normals and tangents directly.
     
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    there is not right now.
     
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    the wind texture is sampled in world space. if you move the world you will have to subtract the movement from the sample position by e.g. using a global float3.
     
  38. flissule

    flissule

    Joined:
    Aug 23, 2013
    Posts:
    6
    cool, thanks, I'll look into it !
     
  39. Sheynes

    Sheynes

    Joined:
    Mar 27, 2017
    Posts:
    66
    I havn't seen that in the review of the asset neither on the description : Does the volumetric light works with VR single pass with URP 12.1.7 on unity 2021 ?
     
  40. patek-monsarrat

    patek-monsarrat

    Joined:
    Nov 21, 2022
    Posts:
    4
    Hello! First of all thank you for a wonderful shader pack. Secondly - I am having an issue with both Hair and Hair Blend shaders. This error shows up on 2021.3.7f1 and prevents us from completing a build (URP 12)

    upload_2022-11-21_13-49-35.png

    Could you please be so kind and explain to me like I am 5 what shall I do to make it go away?
     
  41. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    @larsbertram1

    We recently moved to Unity 2021.3.14 so I updated LUX to 1.86. Since then the Lux decals don't work correctly anymore in VR. When I move my head the decals move or rotate the wrong way. It's a bit hard to describe so I hope you can check yourself with a VR headset. Decals worked fine in VR with version 1.7 on 2021.3.
    We are using single pass instanced if that make a difference.
    Thanks for your help!
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    i could only check the decals in 2021.2 using MockHMD and single pass instanced - which simply works.
    and i am not sure if the decal shader got updated in version 1.86 at all...
     
  43. tianniunai

    tianniunai

    Joined:
    Oct 19, 2020
    Posts:
    2
    Hi, i use the unity 2022.2.0b16.112 vision, waining this, the shader do not work,can you help me?thank you
    I already bought the Lux URP Essentials,
    upload_2022-11-30_1-26-46.png
    upload_2022-11-30_1-28-17.png
     
    Last edited: Nov 30, 2022
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    urp 14 is not supported currently. you have to use urp 12 or 13.
     
  45. tianniunai

    tianniunai

    Joined:
    Oct 19, 2020
    Posts:
    2
    oh, When can support the urp14 ? I need to use 2022.2 vision entities1.0 .....
    Or is there any way to use urp13 in 2022.2vision ?
     
    Last edited: Nov 30, 2022
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    dots instancing is not supported on any of the hlsl shaders. shader graph version of course may support it.
     
  47. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    60
    Hello!I‘ve found Batching problem with depthnormal pass and shadowmap pass.
    Materials with same keyword still can't be batched with the tip of "using different keywords". But actually they did not use any keyword in these passes.
    I think it is caused by that the forward pass using "_Emission" or something else that only cares about the surface rendering, but they somehow disturb the batchers of the other two passes.
    I've found a Unity official issue tracker which declares the similar situation.
    https://issuetracker.unity3d.com/is...-pass-when-emmision-is-enabled-on-one-of-them
    Says that the issue has been solved in the beta version 2022.2, sadly it's the only version fixed so far.
    Is there any work around right now which can be used without letting the project risk the beta version?
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    which version of lux urp essentials and which version of URP do you refer to?
     
  49. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    60
    The version of Unity I'm using is 2021.3.15f with URP 12.1.8. And the lux urp essential version is 1.86.
    I'm now using shadow caster proxy as a temporary solution. But it does'nt work for the DepthNormal prepass case.
    You can have a try testing on the 2022.2b to check if the depthnormal issue is also solved btw since the update notes didn't mention about it.
    Maybe it's not the asset's issue but an engine issue.
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,901
    i checked some shaders in the inspector and they were all compatible with srp batcher. looking deeper skin actually made some problems in the depth prepass, but that is any easy fix.
    anything else?