Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. 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. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    no benchmark. and of course the tweaked shader is much heavier on performance: advanced parallax mappig and procedural splatting!

    nope. the included terrain shader is just a nicely improved terrain shader but no replacement for e.g a dedicated terrain shader solution such as micro splat where you can spend 4 times the money buying modules to get more and more features.
     
    Last edited: Apr 2, 2021
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    the material editor only changes any settings if you change them while the editor is active and drawn in the inspector.
    however: if you look into the "LuxURPUniversalCustomShaderGUI" cs it does not do anything regarding "receive shadows". here it relies fully on the shader gui provided by urp.
    keyword is keyword. the checkbox is just a float stored with the material. and the editor reads this float and sets the keyword accordingly - if it changes while the editor is opened (unity code).

    is works perfectely for me in editor. but i have not worked with addressables. so in case you run into any issues regarding them you will have o file a bug report to unity: lux urp essentials simply does not do any changes here.
     
    Ceylan12 likes this.
  3. Quast

    Quast

    Joined:
    Jul 5, 2015
    Posts:
    531
    Is there a way to fade object by color alpha without using Transparent ? Could you add this material ?
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    i am not sure if i get this right.
    there is a function to stipple/dither in opaque materials. look into the uber shader and the custom shader graph demo scene and look for the cubes covered with the brownish rock texture.
     
  5. mfolsom

    mfolsom

    Joined:
    May 21, 2016
    Posts:
    3
    Trying to get the Particles Simple Lit to work. Unity 2020.3.0f1 + URP 10.3.2

    Code (CSharp):
    1. Shader error in 'Lux URP/Particles/Simple Lit Tess': unrecognized identifier 'VaryingsParticle' at /Users/matt/dev/project/Library/PackageCache/com.unity.render-pipelines.universal@10.3.2/ShaderLibrary/Particles.hlsl(21) (on metal)
    Happens even on import to fresh URP project. Wondering if it could be an M1 issue? Out of ideas for the moment.
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    the shader compiles fine on dx11. i have no m1 to test.
    what you can try:
    in "LuxURP Particles Simple Lit Forward Pass.hlsl"
    just comment line 9:
    #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Particles.hlsl"
    it is not needed.
     
  7. SBliznitsov

    SBliznitsov

    Joined:
    Mar 13, 2019
    Posts:
    15
    Hello.
    Camera fading subgraph does not work in Unity 2020.3.3f1, URP 10.4.0.

    Shader error in 'hidden/preview/LuxURPCameraFading_0e7e654ca46e489da1a707fc8cb793ca': undeclared identifier 'GetCameraPositionWS' at Graphs/Includes/Lux_Camera_Fade.hlsl(27) (on d3d11)

    Could you help solve this problem?
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    that only effects the preview shader.
    the final shader just works. so you can ignore this.

    if you want to get rid of the warning in the editor you would have to wrap the function with:
    #if !defined(SHADERGRAPH_PREVIEW)
    ...
    #endif
     
    SBliznitsov likes this.
  9. mfolsom

    mfolsom

    Joined:
    May 21, 2016
    Posts:
    3
    Ok I must have been tired, I hadn't imported the specific URP per version under LuxURPEssentials_URP_10.3.2
     
    Last edited: Apr 9, 2021
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    :) get some rest!
     
  11. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    23
    I've been using these shaders for the past few months and really enjoying them! I've been having some problems getting my materials (a lot of which are using Lux Extended) to batch, though—the frame debugger shows that each SRP batch includes very very few drawcalls, and that usually the reason more can't be batched together is "SRP: Node uses different shader keywords." Sometimes the frame debugger shows the batches having different keywords (frequently _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A), sometimes it doesn't.

    I don't know much about graphics optimization, and I'm sure this isn't actually a Lux thing, but does anyone have any advice for how I can rectify this?

    Thank you!
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    if your materials really need and use different keywords then this behavior is expected.
    _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A should be set only if you have selected: Surface inputs --> Smoothness --> Source = Albedo Alpha.
    if the keyword is enabled although you haven't selected "Albedo Alpha" then this might be a bug in the custom material inspector. it works fine however in my tests.
    if it not a bug then one could think about moving features away from keywords and use branching instead. something i haven't really looked into yet and how it influences performance.
     
    gewl likes this.
  13. SBliznitsov

    SBliznitsov

    Joined:
    Mar 13, 2019
    Posts:
    15
    Thanks for the help!
     
  14. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    151
    Hi,
    Is it possible for you to make a quick demo about making some stylized display of using
    Lux URP Essentials.

    I am interested in using it for Toon shaders for Anime/Manga Look.
     
  15. Raimek123

    Raimek123

    Joined:
    Mar 27, 2015
    Posts:
    1
    upload_2021-4-12_20-20-24.png

    I can say, this shader is fantastic!
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    i am sorry, i am not an artist. but the screen shot below shows most of the available features like:
    lighting based on steps or ramps, colorized lighting (i have no better word for this...), rim lighting, isotropic and anisotropic specular highlights (for hair or brushed metal)...

    the toon lighting manual should give you a deep insight:
    https://docs.google.com/document/d/...V6e5x8n35SebR3W5o/edit#heading=h.6zvjnfuiskj1

    toon lighting comes as predefined hlsl shader as well as as node for shader graph. so you can do pretty much anything you want.


    toonOverviiw.PNG
     
  17. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    151
    Thanks for the reply I am definitely grabbing this. So many goodies come with it. Do you have a discord server? You don't have to be active but other users of this awesome addon can help each other if you set up a discord server. Please consider making a discord server. Thanks for making this amazing add-on.
     
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    i like the forum to be the central place... but le's see what other people think
     
  19. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    I found an error when I use terrain hole.
    Code (CSharp):
    1. Shader error in 'Lux URP/Terrain/Lit': undeclared identifier 'ClipHoles' at Essentials/Shaders/Terrain/Includes/TerrainLitPasses.hlsl(828)
     
  20. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    which version of urp do you use? which version of unity?

    [edit] ah, found (10.3.2.) and fixed.
    you can manually fix it by editing "TerrainLitPasses.hlsl"
    find:
    ClipHoles(IN.uvMainAndLM.xy); (line 828)
    replace it with:
    float hole = SAMPLE_TEXTURE2D(_TerrainHolesTexture, sampler_TerrainHolesTexture, IN.uvMainAndLM.xy).r;
    clip(hole == 0.0f ? -1 : 1);

    an official fix will come soon as well.
    thanks for reporting!
     
    Last edited: Apr 17, 2021
    lilacsky824 likes this.
  21. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    Thank you! :)

    I use 10.4 version of URP. Unity is 2020.3.4.
    But I found another problem is ghosting.
    See through hole area will become ghosting and white eventually.
    未命名-1.jpg .
     
  22. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    151
    Hi was wondering if you going to add some kind of pixel art shader for 3D models in lux or in any of your assets. Kind of an interesting thing that maybe can be achieved with a shader graph.

    Regarding discord, I think it's the best form of support. Many developers and content creators use discord for their community :D.

    Thanks for your time and consideration @larsbertram1
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    hmm: i checked urp 10.3.2. and 11.0. depth is writtem properly whem it comes to holes.
    and i did not spot any ghosting. well: in the terrain demo scene i spotted some but that is caused by the blend shader on the cliffs or better: the depth only shaders attached to them. do you use any depth only shaders in your scene?
    but i spotted some problems when it comes to ssao which will be fixed with the upcoming update which should land within the next 2 days.

    your scene looks quite interesting! any chance to share more screen shots of it? and what you have achieved so far and what you are heading fore?
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    what are "pixel art" shaders? do you have any examples?
     
  25. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    151
    Something like this



    An example game would be dead cells. I wonder if it is possible to achieve that kind of aesthetics for 3D models in Unity instead of Blender. In Blender, you just go to its shading tab and adjust some settings and you get a pixel art look for your 3D models.

    Example:


    https://www.gamasutra.com/view/news...D_pipeline_for_2D_animation_in_Dead_Cells.php

    You apply some shader and the 3D object looks almost like pixel art. Gives a nice stylized look
     
  26. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    Sure!
    I'm going to open a thread at WIP forum.:p
    You can see current progress at my twitter, too.
    Twitter Here!
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    version 1.7.1. is available.
     
    lilacsky824 likes this.
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    hmm, it looks interesting but very special.
    watching the blender howto i think you can already do this with lux urp essentials in unity: they just render out a bunch images at a very low res. so you can do in unity using e.g. the toon shader. or do i miss something here?
     
  29. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    151
    I think there is more to it.





    And check out that Gamasutra article. Dead cells game has done this way I believe.

    Anyways I am doing this in blender already. Not awesome quality but looks good enough. While I was doing it I just thought maybe you can also add this to your lux, so people can do in unity with your addon. Maybe a short google docs guide on how to achieve this using lux will be nice if it is already doable with lux.

    Thanks again for this amazing add-on.
     
    Last edited: Apr 20, 2021
  30. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
  31. felixsg

    felixsg

    Joined:
    Jul 5, 2018
    Posts:
    13
    I recent buy the shader and i have a problem I use unity 2020.3.4
    in the demos, Decals and other where have terrains all are pink
    I use URP 10.4.0
    thanks 2021-04-20 (2).png
     
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    have you installed the package for urp 10.3.2?
     
  33. felixsg

    felixsg

    Joined:
    Jul 5, 2018
    Posts:
    13
    not import before, now if fix thanks the terrain

    not work decals transparency outline demos
     
    Last edited: Apr 20, 2021
  34. Jesper-Nielsen

    Jesper-Nielsen

    Joined:
    Nov 14, 2013
    Posts:
    73
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    you can use whatever method you want. i think substance designer or unity's artengine let you create seamless tiling textures. or you grab prmade textures from textures.com, quixel.se or allegorithmic.
     
    Jesper-Nielsen likes this.
  36. Jesper-Nielsen

    Jesper-Nielsen

    Joined:
    Nov 14, 2013
    Posts:
    73
    Yeah but the method I linked to expects a texture that can be split in 16 and tiled randomly as long as the edge colors match.
     
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    sounds too complicated :) all you need is a nicely tiling texture.
     
  38. Jesper-Nielsen

    Jesper-Nielsen

    Joined:
    Nov 14, 2013
    Posts:
    73
    Ah awesome - now I kinda get what it does but not quite how :) Does it work for neighboring terrain tiles?
     
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    it does.
     
  40. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    I found a fix for ghosting through terrain hole.:p
    By add directive to Lux URP Terrain Add.shader.
    Below properties section of shader's code.
    Code (CSharp):
    1.     HLSLINCLUDE
    2.  
    3.     #pragma multi_compile_fragment __ _ALPHATEST_ON
    4.  
    5.     ENDHLSL
     
  41. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    latest version uses "ZTest Equal" which is way cheaper :)
     
  42. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    I found probably is comes from splat map.
    Ghosting through terrain hole only appear at where splat map is not black.
    And don't happen at splat map 0.
    So When I paint 5th terrain layer and following layers on at where hole is will cause ghosting.
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    it should be fixed in latest using the fast path i described above.
     
  44. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    I tried newest version but still not work. :(
    Can you try and see if it is work?
    Use demo's terrain scene.
    Paint 5th terrain layer and paint hole same place.
    Use fresh new project is same. test.png
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    maybe you do not have the latest then.
     
  46. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    Delete package cache and redownload still no luck.:(
    It is only happen at where you paint terrain layer 5 or above when there is hole.
     
  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    strange.
    which version of urp?
    i just checked it in the terrain demo scene (which has 5 terrain textures) and uro 10.3.2. 5th is the path. and holes just work fine.have you checked the terrain add shader? does it contain "ZTest = Equal"? otherwise you may still not be on the latest – or i messed up the packages.

    holesAddPass.PNG
     
  48. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    I use URP v11.
    Import several version's package, but I didn't I find ZTest in Lux URP Terrain Add shader.
     
  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,217
    what is ther version number in "Version.txt" of the kux urp package? should be 1.71
     
  50. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    151
    Not really a problem but I have some warnings saying failed to load.

    Some warnings like

    Shader error in 'Lux URP/Shader Graphs/Lux Skin Graph': Couldn't open include file 'Assets/Lux URP Essentials/Shader Graphs/Includes/Lux_Lighting_Skin.hlsl'. at line 327

    And for a lot of other shaders, I get this warning.


    https://gyazo.com/c418b97015f78ad59a7dc58cccfd8948
     

    Attached Files:

    Last edited: Apr 25, 2021
unityunity