Search Unity

UBER - Standard Shader Ultra

Discussion in 'Assets and Asset Store' started by tomaszek, Jun 23, 2015.

  1. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    565
    Update: I have edited this post and made new one to easily explain the two things I ask:

    SSAO is expensive and too many artifact for such simple effect and it needs to be per object. Many places it not showing properly on my mesh anyway.

    RTP I think better for terrains. I only use meshes. I think Uber has geom blend shader anyway?

    Maybe I use snow totally wrong way but I am trying to use the snow as a secondary dirt effect that only show on edges of mesh. I changed settings but it only covers entire mesh.

    If I can change the lower part of mesh with color or texture then I can simulate many things like Translucency, Subsurface Scattering, Dark areas for AO. I have bough this shader package called height fog and it some of this but I can only use Uber for my production so only choice is we must find way to do it with Uber:

    Translucency AO.gif

    P.S. You asked me about the other thing I told you which was the "color trick".
    That one uses two different methods first one is just a second texture we apply on edges of mesh. The texture is the same texture as our floor mesh and the blend is not perfect but it make fake blend.

    Second option is just a Top Down Projection:
    https://assetstorev1-prd-cdn.unity3...3c17d2-489a-4cfb-b728-94b6e591eac1_scaled.jpg
     

    Attached Files:

    Last edited: Aug 30, 2019
  2. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    565
    Remember there are two things we are discussing:
    1. Height Fog kind of effect that simulates translucency, sub surface scattering and fake AO effect.
    2. Second is simulating blend between two meshes (not terrain) using textures that start from lower party of mesh to edges or we can use Top down projection.

    You can see this other example of using height fog again and this time it even animates the blend color on top mesh for fun https://assetstore.unity.com/packages/vfx/shaders/height-fog-118960

    Height Fog.gif

    *The image is very low res actual effect is very smooth.

    Here are some variations, now maybe you understand the AO trick more clearly in the Variation 3 image. I am sure we can use that data for many things once we target that channel?
     

    Attached Files:

    Last edited: Aug 30, 2019
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    The number of ways we can write shaders is just countless. Depending on what's needed in a situation. You're asking me for a new feature to be added on the top of UBER. Even though it's simple to implement (surface property modification by Y axis), it's still a new feature. For shader programmer it's possible to tweak UBER shaders and add it in UBER. For non shader programmers - not reallysince UBER is not a surface shader.

    Snow works like snow - you can cover whole object or skip snow on slopes. I understand you'd like to have it the opposite - showing snow on sides only? You could try to force snow slope damp to be negative number and then see what happens, but it would be a hack.

    Blending between 2 objects is possible with RTP vs geom blend object. UBER introduces it's shader variant that can blend with RTP terrain (or RTP on mesh) object.
     
  4. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    565
    The snow is a hack your right and probably expensive. I will look into translucency and 2 layer version of Uber for now.

    I sent you more in the PM but I am glad you say that it's very simple implementation. Maybe in a future update one day if Uber cannot do it right now it's ok.

    As for blending between 2 meshes I will experiment with that at a later date because right now my goal is more per object effect.
     
  5. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    434
    So hdrp and urp is coming for uber right? It's the only reason I havent used it.
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    Yes, it is coming (sooner or later). Currently even Unity has not stabilised LWRP/HDRP yet. LWRP became URP. HDRP is still under developement. It's very unstable situation for shader developers. Any change Unity side and it breaks all efforts. That's why I'm not focusing on URP/HDRP implementations of my products. When it get stable - I'll definitely do. Be prepared for some really nice stuff. Meantime I'm working on "things that work", later I'll push it into SRPs.
     
    Last edited: Sep 25, 2019
    ftejada, tachyon-particle and hopeful like this.
  7. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    434
    Only problem I'm running into is about once a week I consider switching from uber because other assets i use are now using the srp. Only reason i havent is because i have always loved the asset but it is leading to me limiting myself and not being able to use everything
     
  8. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    169
    Hi, I bought UBER and immediately jumped into the "Examples" scene. I noticed a few graphical glitches however. Unity 2019.3.0b4.

    1) Weird rainbow effect
    upload_2019-9-29_21-53-53.png

    2) The light is extremely bright that sometimes it's almost impossible to see anything. That could be intended? I just want to be sure none of that sweet physical accuracy has been lost by the new Unity version changes :D
    upload_2019-9-29_21-54-46.png
    upload_2019-9-29_21-56-43.png

    3) Vertical lines sometimes appearing on object edges when perceived from specific angles
    upload_2019-9-29_21-59-26.png
     

    Attached Files:

  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    Do you have lighting for the project set to Linear (not Gamma)? In regards to the first 3 screenshots looks like there's something changed within U2019.3 in regards to built-in rendering pipelines (or attached old postFX goodies don't work). I'll take a look.

    Edge issue on the column is common artifact for this type of parallax occlusion mapping solver. Sorry - such behaviour is expected under some cirumstances because it's not much "real" geometry managed (like with tessellation displacement mapping) but kind of approximation solved within pixel shader. I'll probably rewrite some stuff here and there with next UBER update - maybe introducing shell mapping which should theoretically solve any kind of silhouette. Can't promise though - tessellation on mobile GPUs gets more and more popular so parallax effects are generaly being discontinued under real productions. Still - parallax effects have some advantages, it's only matter of how high we intend to push them as for some class of effects it's definitely better to use tessellation.

    Tom
     
    Last edited: Sep 30, 2019
    hopeful and Gooren like this.
  10. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    216
    Is this shader compatible with Kronnect's Volumetric Fog and Mist?
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    We can not tell until installing Kronnect's product. Treat UBER as extenstion for Unity Standard shader. So - if Unity's shader works I see no reason UBER wouldn't neither.
     
  12. Aidedecamp

    Aidedecamp

    Joined:
    Nov 22, 2012
    Posts:
    14
    Hi, I updated my project to Unity 2019.8f1 and now I don't have any transparency with the UBER Shader. The issue is the same with all Rendering Modes using transparency: Cutout, Fade or Transparent. The material looks then in the same way as if the Rendering Mode is set as "Opaque" If a switch to the Standard Shader in the material with the same texture & settings, the transparency is shown properly.
    The version of UBER is 1.2h and this effect didn't appear with Unity 2018.3 and same project settings (no HDRP or URP)
    Does anybody experience the same effect? Has anybody a solution to have again transparency with UBER & Unitiy 2019 ? Thanks in advance for any support
     
    Zyrathius likes this.
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    I expect you need to re-download and reinstall newest UBER within Unity 2019 where so called local keywords can break some features. Make sure "shader_feature_local" and "multi_compile_local" are being used in shaders - that would mean it's supposed to be fixed. Otherwise get back to me so we can inspect the problem further.
     
  14. Aidedecamp

    Aidedecamp

    Joined:
    Nov 22, 2012
    Posts:
    14
    Thanks for the fast response. I deleted UBER and reinstalled it as suggested, but I still have the same issue. When checking the local keywords of the shaders, both "shader_feature_local" and "multi_compile_local" are missing. What information do you need for a better understanding?
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    Missing local #pragma occurences in UBER shaders' code means you actually got not matching version. Google for "unity package cache location". Remove cache from your HD and redownload / reinstall newest UBER. It should give you most recent version. AssetStore sometimes give not matching pair (package vs. Unity verdions). After downloading check verinfo.txt file contents. Should be "UBER 1.2h (U2019.1.0f2 release)".
     
  16. Aidedecamp

    Aidedecamp

    Joined:
    Nov 22, 2012
    Posts:
    14
    verinfo.txt already showed version UBER 1.2h, but I tried anyway removing the cache & installing again as you indicated and now Cutout, Fade or Transparent works again properly :) Strange that verinfo.txt showed the right version, but some components inside seem to be wrong, even after reinstalling couple of times
    Thanks a lot for your support :)
     
  17. Zyrathius

    Zyrathius

    Joined:
    Dec 18, 2012
    Posts:
    19
    Thank you very much, this solved a problem for me also. I'd migrated my project over and didn't realize I needed to redownload 1.2h in 2019 when I had already done so in 2018!
     
    tomaszek likes this.
  18. LittleBlueDot

    LittleBlueDot

    Joined:
    May 15, 2019
    Posts:
    7
    @tomaszek
    I'm not really clear whether the Uber shader works on mobile platforms and in AR modes. Can you confirm? Thank you.
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    It should. For mobile it requires gles3 and gles3.1aep+ for tessellation. Surely - don't expect any reasonable performance on low/mid-range mobile hardware when using demanding features (parallax mapping, high tessellation factors, dynamic weather). Also beware HDR output on mobile is not ARGBHalf by default (it's rather RGB111110Float instead) - so it doesn't use .alpha channel required for deferred trnslucency effects. In forward it should work fine though.

    Tom
     
    LittleBlueDot likes this.
  20. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    EDIT: Never mind! I just had to upgrade UBER for Unity 2019....


    I'm trying to use UBER (for the Dynamic Snow > Enviro integration) with this wreath model, but it loses alpha when I switch from Standard shader to UBER -- any idea what's going on there or how to fix it? Thanks!

    wreath-standard shader.PNG

    wreath uber.PNG

    wreath uber settings.PNG
     
    Last edited: Dec 13, 2019
  21. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    399
    Does this asset supports 2019.2? i get all pink in build, in editor works fine
     
    amynox likes this.
  22. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    83
    Hi Tom,

    A new version of Uber with SRP support is much needed. Any hope or ETA of having it soon ?

    PS: how about an 'incremental' update starting with the core shader first...

    Thank you for your great work
     
  23. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    399
    They work in 2019.2 the problem seems build was too big i think, removed some parts and build is no pink no more
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    I'm moving it at the top of priority queue for the beginning of the new year then. Other stuff can wait as it will take more time anyway. Currently I'm focused on some custom project unfortunately, but yes - UBER with SRP support is what we need to have ASAP.

    Tom
     
    Bartolomeus755 and amynox like this.
  25. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    399
    Got the following error and get the ground materials black in build, in editor works fine. Anyone has experienced this?

    Shader error in 'UBER - Metallic Setup/ POM Extrusion Map': redefinition of '_DepthReductionDistance' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(126) (on d3d11)

    Compiling Vertex program with UNITY_PASS_SHADOWCASTER SHADOWS_DEPTH _WETNESS_NONE _PARALLAX_POM_SHADOWS
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    Sorry for delayed response. Can you check if you use newest UBER packager (check verinfo.txt file inside UBER folder)? What's the Unity version the error happens on?
     
  27. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,750
    @tomaszek Do you have an estimate on when we can expect URP compatibility?
     
    amynox likes this.
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    Next few weeks should be there.
     
    tavovallejo, amynox and magique like this.
  29. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,750
    Excellent. One more question. Will it be able to auto assign the existing textures? I noticed when using URP and the sample shaders that they are not able to assign the textures and they have to be assigned manually.
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,754
    It's good suggestion to get indtoruced. Do you refer to current UBER materials that will jest assign/work instantly after upgrade to HDRP, or HDRP standard shader when replaced with UBER to preserve as many params as possible?
     
    amynox likes this.
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,750
    Yes. So, I would like to set my materials up as UBER and then if I change the renderer to URP I should be able to go and change from UBER shader to URP UBER shader and have it convert automatically so I don't have to go back and re-assign texture maps manually. Currently, the provided URP alternatives to the standard shader retain no texture maps and they have to be re-assigned. For a big project with lots of materials that's a massive undertaking. Especially, since I would have to write down each texture map before switching to the URP shader because how do I know what textures are used by every single material in my project? You see?

    [EDIT]
    Actually, there is an editor option to auto update materials in the project to URP so I was wrong about the manual update. So any standard shaders update automatically. My mistake.
     
    Last edited: Feb 6, 2020
    amynox likes this.
unityunity