Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    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. iceb_

    iceb_

    Joined:
    Nov 10, 2015
    Posts:
    95
  2. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    Decals are working fine for me in 2021.2.

    Also, can anyone point me to how to add scaling/offset to the _BaseMap texture in the Decal shader? My command of shader stuff is pretty wobbly; I'd hoped that swapping the basemap's UV out for the hardcoded float2 on this line in the frag function:

    float2 texUV = positionOS.xz + float2(0.5, 0.5);


    would get me there, but the result is pretty nightmarish and I'm out of my depth. Or, if this is nontrivial because of something about how decals work, I'd appreciate if someone could tip me off to that, too, so I can go a different way for this.
     
  3. iceb_

    iceb_

    Joined:
    Nov 10, 2015
    Posts:
    95
    You are right, needed to run the URP 12.1 installer within the Lux package.
     
    gewl likes this.
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    version 1.8 is available which improves the support for URP 12.1.
    - tweaked more shaders
    - got the custom lighting functions for shader graph work with deferred now (well, lighting of course is still forward here)
     
  5. iceb_

    iceb_

    Joined:
    Nov 10, 2015
    Posts:
    95
    Could you please also fix this error for URP12.1?

    Assets\Lux URP Essentials\Demos\Scripts\CheckSettings.cs(5,29): error CS0234: The type or namespace name 'LWRP' does not exist in the namespace 'UnityEngine.Rendering' (are you missing an assembly reference?)
     
    IS_Twyker likes this.
  6. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    Hi, I'm getting a number of errors on the new patch (Unity 2021.2, URP 12): upload_2021-11-29_12-27-7.png
    Can I do something to fix these?
     
  7. IS_Twyker

    IS_Twyker

    Joined:
    Sep 6, 2021
    Posts:
    35
    Also getting a buch of errors. Fresh import of LUX on Unity 2020 LTS.
    Tried all available URP versions, tried all included LUX packages, nothing helped. :/

    upload_2021-11-29_22-47-56.png

    EDIT: Ok, finally got it to work. Had to separate the editor scripts under an asmdef and went back to the earliest URP package - even though I'm on the newest URP version with Unity 2020 (go figure).
     
    Last edited: Nov 29, 2021
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    the shaders that error are not supported in URP 12 – yet. or may not be supported anymore.
    like the versatile blend shader: it is forward only.
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    hmm, "the namespace Universal does not exist in Unity.Rendering" does not make much sense here, does it?
     
  11. MysleyMakers

    MysleyMakers

    Joined:
    Jul 27, 2021
    Posts:
    30
    Hey, some of your shaders became slightly transparent in the newest update:

    luxurp.png

    This is using the Cloth shader and the Skin shader. They were fine on the previous 2 versions, but when I updated to the newest one, they became slightly transparent. How do I fix this because it is really bothering my project's rendering.
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    i can not really see much there...
    anyway, which version of urp do you use? which platform (dx11, metal...)?
     
  13. MysleyMakers

    MysleyMakers

    Joined:
    Jul 27, 2021
    Posts:
    30
    After some more testing, it seems like your Volumetric Box Volume is what's causing this. Forgot to tell that this area also has a Lux Box Volume in it. Turning it off on that area sets the shirt and skin back to transparent.



    Here you can see how the Box Volume is affecting my player's mesh. The body and shirt is using the Skin and Cloth shader, respectively. The Box Volume transparency bug is only affecting your custom shaders and other assets' shaders. They don't affect standard or lit shader meshes.
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    it looks as if your skin and cloth do not properly write to depth.
    the box volume uses the depth buffer to calculate the fog density. if skin and cloth do not write to depth the will receive fog as from the background. that is what i see.
    dragging mr lee pery into the volumetric demo scene i do not get such issues. fog on the head fits its distance to the camera.
    urp12.1. tested in deferred and forward.

    boxvolume.PNG
     
    MysleyMakers likes this.
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    please check the render queue settings in the material inspector: must be set to anything <= 2500 (alphatest+50) to make the depth written by the skin and cloth land in the camera depth texture.

    ok.PNG

    brokendepth.PNG
     
    MysleyMakers likes this.
  16. MysleyMakers

    MysleyMakers

    Joined:
    Jul 27, 2021
    Posts:
    30

    That works, thanks!
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    fine.
    how come that the render queue changed?
     
  18. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,472
    I'm getting the same errors (2021.2.5f1, URP 12.1) but I don't fully understand the solution. How can I get these working? I've imported the asset, then imported the 12.1 package that was included in the asset. What else do I need to do?
     
  19. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,472
    Update: I managed to get rid of most of the errors by entirely removing Lux URP Essentials, re-importing the package, but deselecting everything except the 12.1 package. Then once that's done, importing that package itself. Apparently there were files in the "base" package that weren't getting overwritten or something when importing the 12.1-specific package. Perhaps a restructuring of the asset or some clearer documentation on the correct installation procedure is in order?
     
  20. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    sounds like a problem with the meta files. or serialization.
     
  21. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,472
    So the correct procedure is to import the entirety of the main package, then import the version-specific package without removing any of the files from the main package?
     
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    this should be the way, yes.
     
  23. CoolCat518

    CoolCat518

    Joined:
    Feb 4, 2015
    Posts:
    18
    Hi, I use Unity 2021.2.7 and I get this error:
    upload_2021-12-22_16-24-4.png
    Can you tell me how to fix it? Thanks!
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    install the proper package included!
     
  25. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    857
    Can I use those shader features in a graph? For exaple can I use this asset to create my own skin shader graph with additional nodes/features?
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    most lighting features: yes. so you can create your custom skin shader.
     
    illinar likes this.
  27. SashaFluffyFox

    SashaFluffyFox

    Joined:
    May 4, 2021
    Posts:
    3
    Hello. I have this error in a bunch of different shaders
    upload_2022-1-11_0-36-57.png

    I fixed it locally with:
    outSurfaceData = (SurfaceData)0;
    as the first line for each InitializeStandardLitSurfaceData
     
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    oh, you have not installed the proper lux urp essentials package for most likely urp 10+. if you do so all errors should be fixed.
     
    SashaFluffyFox likes this.
  29. SashaFluffyFox

    SashaFluffyFox

    Joined:
    May 4, 2021
    Posts:
    3
    Oh, I think I figured it out now. I imported from LuxURPEssentials_URP_10.3.2 and everything seems fine now.
    Thank you
     
  30. SashaFluffyFox

    SashaFluffyFox

    Joined:
    May 4, 2021
    Posts:
    3
    Btw, I also have some warnings in shaders. Should I ignore them?
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    yes, these are just nasty warnings. if we guarantee (due to input) that f always >= 0 then everything is fine.
    i do not want to add an extra instruction (abs) here just to mute the console.
     
  32. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    295
    Hello,
    after importing the package and the corresponding essentials although most samples look good I still get a bunch of errors (Unity 2021.2.7f1, Lux URP 1.8, URP 12.1.2). I get that some things might not be working but regardless I wanted to ask if this is normal because some issues come from pretty core functions in Lit Extended which seem to work in some variants

    for example (more see screenshot):
    Code (CSharp):
    1. Shader error in 'Lux URP/Lit Extended': undeclared identifier 'LightweightFragmentPBR' at line 183 (on d3d11)
    2.  
    3. Shader error in 'Lux URP/Lit Extended': 'UniversalFragmentMeta': input parameter 'metaInput' missing semantics at /Projects/URP_Stuff/Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/ShaderLibrary/UniversalMetaPass.hlsl(37) (on d3d11)
    4.  
    (amazing work nevertheless, so many incredibly useful features I have been missing in URP)
     

    Attached Files:

  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    "Lit Extended" is not supported in URP 12 as it mainly adds stencil support needed to use the outline feature.
    use the "Lit Uber" shader instead.
     
    Last edited: Jan 13, 2022
    fleity likes this.
  34. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Hello, While I was trying to change the shader to the metallic workflow I saw this message from this message:

    "Please note that we have to use the specular workflow. Always! It is essential to not get any lighting from the standard lighting function which would drastically slow down the shader."

    How much will the performance be affected by the change? Will it be the cost of rendering the same mesh again with a lit shader? Or will it cost much more than that?

    Also, will there be any visual issues if I modify the shader graph to use metallic workflow?
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    never, ever do this. lighting will be calculated twice!
    so stop even thinking about it.
    the custom lighting is based on specular workflow. fullstop.

    if you need metallic inputs i think i have added a node for metallic to specular.
    this should convert your inputs properly.
     
  36. Catsploration

    Catsploration

    Joined:
    Mar 9, 2021
    Posts:
    68
    Hello, I'm using Grass TextureDisplace here with the SSAO forward renderer asset enabled inside URP 10.8.1. Any idea would I could be messing up?

    upload_2022-1-21_19-22-59.png

    Thanks!
     
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    looks like the depth normal pass does not properly bend the grass and causes the ghosting there.
    actually it looks as if the grass is entirely dislaced by around .5m?!

    i just checked the vegetation demo scene with URP 10.3.2 (only URP 10.x. i have) where ssao from depth normals look fine.
    but there are not half as crisp as your result?!
    and as the ground show a lot of details i would assume it is URP 12 instead, which support normals from normal maps as well?
     
  38. Catsploration

    Catsploration

    Joined:
    Mar 9, 2021
    Posts:
    68
    Ohh, the background grid is stretched out a little, it's only bending about 0.1m. It's just normal URP Lit, but it does have normal & occlusion textures.

    Hm, I'm probably doing something dumb, I'm not too familiar with concepts like depth normal passes. I could upgrade to URP 11 soon and see if that helps?

    (I absolutely love your shaders by the way!)
     
    Last edited: Feb 24, 2022
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    hmm, i could not reproduce your result in 10.3.2. and 12.1. i haven't tested 11 but i doubt i will "fix" it for you.
    can you post a video showing how it looks in motion?
     
  40. ShakeTheAi

    ShakeTheAi

    Joined:
    Dec 12, 2018
    Posts:
    14
    Man i'm having so muh error in Lux 12.1 URP. I'm using Unity 2021.2.7f1 and the errors are keep coming.

    the First time i used the human skin was avaiable right after select it it removed from the material selection shader and when i looked at the console these things are popping like HELL. I've Lux from updated from teh package manager but still this thingy is not making my life easier.

    every shader has an error now. Cloth, Toon, vegetation etc. what to do now bro



    Shader error in 'Lux URP/Human/Skin': 'AdditionalLightShadow': no matching 4 parameter function at Lighting.hlsl(148) (on d3d11)
    Compiling Fragment program with _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _NORMALMAP _NORMALMAPDIFFUSE _SHADOWS_SOFT
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: DIRLIGHTMAP_COMBINED FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS_VERTEX _BACKSCATTER _DISTANCEFADE _ENVIRONMENTREFLECTIONS_OFF _MAIN_LIGHT_SHADOWS _RECEIVE_SHADOWS_OFF _RIMLIGHTING _SCREEN_SPACE_OCCLUSION _SPECULARHIGHLIGHTS_OFF

     
  41. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    make sure you have the proper package installed and use the proper version of URP (12.1).
    the shaders work perfectly in Unity 2021.2.0f1 and URP 12.1.
     
  42. ShakeTheAi

    ShakeTheAi

    Joined:
    Dec 12, 2018
    Posts:
    14
    Here you go bro, enlighten me. I've completely removed then reinstalled as i were typing and taking screenshot. I love the Skin Shader but it still gives me an error.
    waste1.png waste2.png waste3.png waste4.png
    waste5.png
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    looks like some GUIDs are messed up.
    so i would delete the shaders, scripts and shader graph folder from your project and then reinstall the LuxURPEessentials_URP_12.1.package.
    this will make sure that you only have the updates files and do not mix them with URP 7.x files.
    please note: the urp_12.1. package does not contain all shaders previously provided as not all have been ported yet or will not be ported at all.
    so in case you want to keep all hlsl shaders do not delete the entire "shaders" folder but only the folders from the shaders that will be updated (skin, clearcoat, ...).
     
  44. ShakeTheAi

    ShakeTheAi

    Joined:
    Dec 12, 2018
    Posts:
    14
    That Worked for me Bro, Thanks. Now my Skin Shaders and other's are working fine. Thank you. only this error still there.

    GUID [c57a56d43842745a19b3d3fe46315929] for asset 'Assets/Lux URP Essentials/Lux SRP Grass Displacement/Shaders/Vegetation/Includes/Lux URP Grass Displace Inputs.hlsl' conflicts with:
    'Assets/Lux URP Essentials/Lux SRP Grass Displacement/Shaders/Vegetation/Includes/Lux URP Grass Inputs.hlsl' (current owner)
    Assigning a new guid.
    waste1.png
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    well, this shows that something here has gone wrong. so you may delete the Lux SRP Grass Displacement -> Shaders folder as well, then reimport the URP 12.1. package.
     
  46. VulpineDen

    VulpineDen

    Joined:
    Apr 24, 2021
    Posts:
    7
    Hi. We use you're skin shader and would like to ask if you can add additional setting for you're shader?

    Here is description about it: picture attached below
    Changes are marked with a green line.


    Specular - it will be great to control by textures but not only by selecting a color

    Additional to a normal map we have a Detail normal map which is tileable textures

    The Mask for Detail normal map determinate where it going to apply. You have two options for mask to switch between grayscale (black\white) texture and RGB with Alpha.

    When you have many materials that need to use different Detail normal you just use mask in RGBA texture channel.


    Fuzz Map (grayscale) Mask Fuzz (A) This is one textures combine two textures RGB and Alpha with Fuzz map and alpha mask for Fuzz

    Fuzz - Set the overall intensity of the fuzz effect, simulating a thin layer of microfibers catching light at grazing angles of a surface. Useful for rendering peaches, fuzz cloth, and skin.

    When texture is off you can just use slider "mask" to set Fuzz map. The value from 0 to 1 is a grayscale from black to white. At this case the Mask Fuzz will be on (white) active for no mask.
     

    Attached Files:

  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    i am not sure if these were good changes to the overal HLSL shader: some users are already overwhelmed with the current texture inputs...
    but skin shading comes as shader graph lighting as well. so you should be able to simply add the additional inputs there?
     
  48. VulpineDen

    VulpineDen

    Joined:
    Apr 24, 2021
    Posts:
    7
    When I use you're skin shader I can only apply it on mesh with skin and I can not create textures on it with metal and cloth.
    As an example: You have a human head with skin shared and you need to paint face like a cyberpunk style which mean you need metalness and specular to create metal

    Right now the skin shader is not overwhelmed at all and it will not be anyway because those additional parameters are standard. The request what we ask for shader will make it flexible and advance and also only you will have this product that has those features.

    The request what we ask for shader will make it flexible and advance and also only you will have this product that has those features.
    I tried to find skin shader for Unity that better fit but here is no one did it yet.

    Skin shader with sss, specular, fazz, detail normal, metallnes , etc it's common thing and convenient way to work and create textures.

    As I mentioned before if you can't use one shader and create textures for character (one mesh\object) wearing panty (skin, metal, cloth in one) in this case the shader is not going to work and required to modify it or find another one.

    Sorry could you clarify the question please?
     
  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    it should be striaght forward to add metalness. but you won't be able to add cloth as this would be a completely different lighting function.
    so let's talk about the shader graph version of the skin shader:

    the shader already supports a skin mask which lets you switch between skin and standard lighting.
    using: 1.0 - skin mask you get the metal mask. feeding this together with albedo into the provided "Lux URP Metallic Albedo to Specular Albedo" node you get proper specular and albedo which you can feed into the skin lighting node.

    in case you have to distinguish between metal and non metal, the skin mask falls too short and you will have to add a custom 2 channel texture masking 1) skin and non skin and then 2) metal and non metal. might be a good idea anyway because if you are looking for a cyberpunk like style this mask should be really, really highres.

    open are detail normals and fuzz lighting which i may add in the future. but after all we are still talking about URP here which used to be called Lightweight Render Pipeline.

    you have no idea how many support requests i get regarding the skin shader :)

    i pretty much disagree here :) and as you might have noticed: the skin shader lets you fade out the skin lighting features so you can swap it out with a standard lighting shader (as skin lighting features most of the times only really shine at close distances). so in case you have very, very complex skin/metal/cloth stuff going on you would need several materials only on the highest LOD and could skip and combine these at lower LODs.

    quick test using skin mask as metal mask:
    skin metal.PNG


    modified shader graph: we have to revert the skin mask to get the metal mask (OneMinus) which then we can use with the metallic/albedo to specular/albedo node to calculate the final albedo/specular:
    skinSG.PNG
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    detail normals come with 1.82 - but only to the URP 12.1. package.
    the hlsl shader version does not support masking them for now as it would need some texture repacking. when using shader graph however you have the possibility to set the detail normal scale from an additional custom texture sample - which just gives you a mask if you will.