Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UBER - Standard Shader Ultra

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

  1. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    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
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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.
     
  3. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    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.
     
  4. tredpro

    tredpro

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

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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
  6. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    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
     
  7. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    331
    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:

  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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.
  9. lo-94

    lo-94

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

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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.
     
  11. Aidedecamp

    Aidedecamp

    Joined:
    Nov 22, 2012
    Posts:
    32
    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.
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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.
     
  13. Aidedecamp

    Aidedecamp

    Joined:
    Nov 22, 2012
    Posts:
    32
    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?
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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)".
     
  15. Aidedecamp

    Aidedecamp

    Joined:
    Nov 22, 2012
    Posts:
    32
    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 :)
     
  16. Zyrathius

    Zyrathius

    Joined:
    Dec 18, 2012
    Posts:
    20
    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.
  17. LittleBlueDot

    LittleBlueDot

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

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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
     
    Meltdown and LittleBlueDot like this.
  19. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    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
  20. dienat

    dienat

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

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    177
    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
     
  22. dienat

    dienat

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

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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
     
  24. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    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
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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?
     
  26. magique

    magique

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

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Next few weeks should be there.
     
    Andresmonte, amynox and magique like this.
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    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.
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    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.
  30. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    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.
  31. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    35
    Quick question: I have a scene where I modeled a car. On the front side panels I have a light with an emission map, but when I place the emission map on the model it glows the whole thing not just the part that as any light on it. Why?

    upload_2020-2-25_10-4-13.png
     

    Attached Files:

  32. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    35
    Oh I am using: 2019.3.2f1
    Windows 10 64bit Pro
    Ryzen 9 3950x
    RTX 2080ti - EVGA Black Gaming Edition
     
  33. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    714
    Hi, we have trouble with Uber shaders running on Vulkan / Stadia.

    Refraction and snow accumulation shaders in particular.

    Any plan to make them work?
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Honestly - unless you have material keywords out of sync - I've got no clue. Try to reassign emission texture (remove/attach in inspector) to set right keyword in material. Emission should then output via your map which seems to be black with the only orange detail on the car side.

    In your case it probably has to do with messed material keywords (have you hit keyword limit of 256?). Maybe material inspector hasn't synced keywords. Anyway - set your inspector in debug mode to inspect problematic material keywords. There should be _EMISSION_TEXTURED set (or _EMISSION_ANIMATED in case you use panmask or pulsate checkboxes). In both cases UBER uses emission texture. When no emission related keyword is set UBER doesn't fetch emission texture thus making whole object emissive. In your case you have emission texture set but most probably keyword is missing.

    AFAIK Vulkan has no GrabPass support usen by UBER for refractions. For snow - it's something that I'd need to inspect maybe. I plan to go thru new testing scenarios after adopting UBER for SRPs next "big" update.

    Tom
     
    DragonmoN likes this.
  35. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I started using UBER in a new project recently, mostly for the dynamic snow, but a few days ago tried enabling Transparency as well. It didn't work, even after I added UBER_DeferredParams to the camera. But then I realized that transparency also requires a custom shader in Project Settings/Graphics. We're already using the ATG shader there, and it's probably possible to add the necessary code to that, but I decided I didn't really need transparency anyways, so disabled that on the object material. But now, UBER_DeferredParams is added automatically to the camera at runtime. How do I prevent that from happening? I'm not sure what I did to trigger that, and would like to untrigger it....

    thanks
    Dave
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    When we talk about UBER - UBER_DeferredParams.cs should be the only script that manage command buffer applied to the camera. So when you remove this script and remove UBER's command buffer from the camera it shouldn't get reattached. Meantime check whether RTP installed doesn't interfere (it can handle this CB used for POM self-shadowing in RTP). Basically this command buffer is not expensive nor harmful - makes a copy of target texture .a channel into rHalf one.
     
  37. amynox

    amynox

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

    Any news/progress about Uber SRP version ?

    Thank you
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hi, I know it looks like abandoned project, but it's not. Currently I need to focus on newest DRONE game update where I'm dealing with decal system. As soon it's ready I'll be back to UBER. As a bonus for you I'll also share decals together with new UBER where more changes are planned (not only "make it just working on URP).

    Tom
     
    amynox, hopeful, DragonmoN and 2 others like this.
  39. LittleBlueDot

    LittleBlueDot

    Joined:
    May 15, 2019
    Posts:
    16
    @tomaszek
    Hi, I'm having a bit of a problem with shiny materials using the UBER specular core shader on Unity version 2019.3.6f1.

    It's not shiny and not reflecting the skybox.
    Plastic Gloss UBER Specular Setup - Core.png

    The Standard specular shader worked ok with the exact same textures used for the material setup.
    Plastic Gloss Standard (Specular setup).png

    What am I missing in the settings? Thank you.
     
    Last edited: Mar 30, 2020
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hi, I can't reproduce the issue on my side. Just installed newest UBER on newest 2019 Unity (UBER 1.2h under Unity2019.3.7f1) and setup simple glossy material. Here are 2 screenshots for comparison, Standard shader, and UBER one:

    UBER_glossyTest1.jpg UBER_glossyTest2.jpg
    No issues with gloss. Can you give your material setup? Maybe something overrides it, for example detail, etc.?

    Tom
     
  41. LittleBlueDot

    LittleBlueDot

    Joined:
    May 15, 2019
    Posts:
    16
    Hi Tom,
    The textures I'm using are shared here, https://1drv.ms/u/s!AgV-09FtmfVCiY4QolpCUYduJzSr3w?e=BIo660
    I'm building for iOS target if that makes any difference. Thanks.
    Settings screenshot.png

    Ok, to follow up. I've managed to get a bit of gloss into the material by setting the Smooth Min value for the Specular map to 0.6. Doesn't that kind of defeat the point of the alpha setting in the specular map? Also doesn't explain why the same textures setup worked as expected for the Standard Specular shader.
     
    Last edited: Mar 31, 2020
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    iOS output can have impact I believe. Is this behaviour reproducible in Editor (Mac OS? openGL, metal, vulkan backend?) or in iOS build only? I have limited options to check platforms other than PC or emulated ones (so that I can force Win editor to run in openGL mode).

    Tom
     
  43. LittleBlueDot

    LittleBlueDot

    Joined:
    May 15, 2019
    Posts:
    16
    I can see the behaviour in the editor. Just created a new project, imported Uber, Created 2 materials + 2 spheres from the textures, one from UBER Specular setup and one from Standard Specular setup.
    As you can see the Standard material, on the right hand sphere, is more glossy.
    Uber shader test.png
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I've been testing it around here and everything seems to work like expected.

    Please, check two other things:
    1. Specular color (next to specular texture) have to be set to pure white together with alpha. Because input values from texture are always multiplied by this (rgb - spec, a - gloss), then ranged using min/max gloss.
    2. Unity Standard shader at some point introduced taking gloss from albedo .a channel while UBER hasn't such option as dropdown selector. You can check "Smoothness (A)" below albedo to get the same bahavior. It's always taken from spec textuer .a channel.

    Tom
     
    Last edited: Apr 1, 2020
  45. LittleBlueDot

    LittleBlueDot

    Joined:
    May 15, 2019
    Posts:
    16
    Thanks Tom, it was the specular color that was the problem.
     
    hopeful likes this.
  46. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    We don't really need a lot of the features your shader offers as much as we need high performance. I didn't see anything that indicated whether this would improve rendering performance if just using the basics the standard shader uses (albedo, spec, normal).
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    The idea behind UBER was always adding feature set to what exists in Standard Shader. It wasn't meant to beat Standard performance. So if you're after best performance I don't really believe we can't beat URP Lit shader either. I'm working on unifications. Coherent feature set for built-in, URP (HDRP to some extent). It will be rebranded (but still UBER users get favor of upgrading to new product).

    Which Standard features are so critical here? I realise people complain that URP misses for example detail mapping. It will be of course included feature.

    Tom
     
  48. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Hi Tom, most of our published titles are still on 2017 so we're just about to upgrade to 2019 and start looking at what URP & HDRP can do. We the next gen consoles releasing soon, we're going to be looking to move towards very high quality rendering but at the moment, we're just doing basic rendering with baked lighting on the Standard shaders so I don't think there are really any features that I would say are real important at this point. That may change when we get to HDRP though.

    Reggie
     
  49. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello, I have bought this and think that is really awesome and amazing what these Uber Shader can do and love very much all that is included in the demo scene.

    USE SUBSTANCE MATERIAL WITH DISPLACEMENT USING UBER SHADER?

    Please, I want to ask if it is possible to use Substance materials that use displacement tesselation that is not working correctly with default standard shaders as they do not support displacement as this Uber shaders does, because when I use any substance material directly on a mesh object the texture looks nearly flat and the normal maps work very little.

    What I mean is if I could use Substance material with these Uber Shaders and be able to use for example, this Substance train tracks material inside Unity and it could be shown in the same 3D way with the right height as shown on the images

    A example of 3D displacement is this Substance Challenge 16 | Train Track Material
    https://www.artstation.com/artwork/L65Ek

    As a test you can download these Substance Materials that are free and try it yourself and that include some displacement
    https://gumroad.com/l/kJSe

    Do I have to convert the Substance materials to the Uber Shader material manually ?
    Which Uber Shader should I use?

    I am using Unity 2019.2 NOT using HDRP or URP

    Thanks very much for your possible help
     
    Last edited: Apr 22, 2020
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Since Unity abandoned native support for substances there were problems with this allegorithimc plugin. But now, seems like newest substance to Unity plugin (released Apr 06th):

    https://assetstore.unity.com/packages/tools/utilities/substance-in-unity-110555

    Works fine now with UBER1.2h (tested on Unity 2019.2.17). Attached screenshot with tessellation triplanar variant (metallic setup).

    UBER_1_2h_tess_vs_substance.jpg
     
    SpaceRay, hopeful and Bartolomeus755 like this.