Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

UBER - Standard Shader Ultra

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

  1. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    424
    Thanks very much for showing and image test to see how it should be configured and what shader to use. I have found the same shader you are using on Substance Share, and I may be missing something as have it exactly the same, but it does not work in the same way as your screenshot as you can see on my own screenshot. Will make more tests

    Thanks. Best regards

    Uber_Substance_Sand_MacOS.jpg
     
    Last edited: Apr 28, 2020
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    From your attachment I can see the sphere is being displaced (small amount, but they are) as we can see carved outlines. Increasing displacement strength doesn't help?

    Also - can you check Unity's tessellation examples:

    https://docs.unity3d.com/Manual/SL-SurfaceShaderTessellation.html

    Whether they produce working output on Metal? We would need to be sure Unity can give correct tessellation shader code for metal. Although I can take compiled shader output on PC for Metal and it shows no compilation errors on UBER tess triplanar core variant, I have no target hardware to actually test it.
     
    SpaceRay likes this.
  3. anton88pro

    anton88pro

    Joined:
    Jul 20, 2017
    Posts:
    52
    Hello,

    I was hoping to use parallax to make fake windows more realistic and popping out, but Uber doesn't like my height maps so parallax doesn't do anything at all(no matter what I adjust in parallax settings or which Uber shader is used). However, when I use height maps from Uber examples, then it's all fine and works. And every other map could be my own, but the moment I replace example's height map with my own - it breaks.
    I even tried to adjust height map in photoshop to make heights more clear, but no luck. Please, could you tell me what's wrong with my height maps? I could understand if parallax was working wrongly, but it doesn't react at all.
    I've attached two images of height maps (first one, created by Surforge asset and another one photoshoped).
    I'm using Unity 2019.3.10f1
    home_mat1__HeightMap.png 222home_mat1__HeightMap.png
     
  4. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    424
    I have deleted the part of the DIrect X11 and Metal in my previous post, because this is not the problem and is not true as the uber shaders work right on mac too on Metal

    Thanks for your answer and sorry if I thought that it was something related to this

    Increasing displacement strength doesn't help?

    When I read this, I was wondering, where is this ? and now I have discovered that there is another part of the shader at the bottom (that is not appearing in the screenshots) where this displacement slider appears, and I did not know.

    Yes, increasing the displacement amount it increases the relief and 3D effect.


    Now I have to make more tests and see more how it works depending on the material that may be used

    Thanks very much

     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Your heightmap used for parallax needs .a channel. Produce it from grayscale in texture importer if it hasn't. You should use single channel format as well to not waste storage/bandwidth for rgb channels that are not used by shader.

    But the question is, what exactly do you excpect to see thru windows using such heightmap? Black parts in windows hightmap will get extruded some, but will not fake room interiors seen thru windows.
     
  6. anton88pro

    anton88pro

    Joined:
    Jul 20, 2017
    Posts:
    52
    It's fixed! Like you said, I just needed to produce it from grayscale. Thank you so much!
    But I don't need fake room interiors, just wanted to make stylised windows more 3Dish and not flat, as I've done today using Uber(screenshot attached).
    btw I don't think the windows could be improved using Uber any better, but if you got ideas, let me know!
    And thanks again for the help and sorry for my terrible English :D
    Снимок экрана (1102).png
     
    tomaszek likes this.
  7. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    128
    As far as I'm concerned, I will be more than happy with "make it just working on URP".

    The wait is so long....
     
    Last edited: Jun 30, 2020
  8. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    This looks really impressive, I want to use it for Unity Unity 2017.1.0f3, does it work? Also, does it work with screen space effects like SSAO, SEGI and SSGI?
    Like this: https://github.com/cdrinmatane/SSRT
    I once made a snow shader in Amplify also tried out your pack in the past and I noticed the rock meshes turn transparent when using screen space ray tracing and gi techniques for some reason. I don't remember the specifics but it was happening on the snow like shaders. Anyway, I'm interested in a possible purchase of the latest version now. Could I get confirmation it works with those? I wouldn't change my mind once I purchased it I would figure out any personal issues on my own.
     
    Last edited: May 25, 2020
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    I'll install SSRT and check it against UBER, but I believe it shouldn't give any troubles as far as Unity Standard Shader wouldn't either. UBER gives regular output on both Forward and Deferred path, just spicy up surface look. I can't think about switching my shaders into transparent unless some rendering solution makes it like this intentionally somehow. The only deeper difference between Unity Standard Shader and UBER is when you try to use translucency and POm self-shadowing in deferred - then my shaders writes in .a channel of gbuffer3 (which is camera target 16 bit HDR texture) then applies these effects under lighting stage. Theat's the only possible point of potential conflict here. I'll get back to you as soon as I check it with SSRT.

    Edit: test done. I can't think about possible problems with SSRT as it's rendered as after opaque image effect.
    UBER_vs_SSRT.jpg
     
    Last edited: May 25, 2020
    florianalexandru05 likes this.
  10. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    Gorgeous, thanks for going through the trouble! :) Just wanted to make sure it doesn't do anything weird when applying these effects.
     
  11. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    232
    Our focus is mainly on the PS4/PS5 and PC markets. Do you know if this is compatible on the PS4 or PS5?

    If not, it might be an option for our PC builds but wondered what we would need to see an increase in quality. I'm not familiar with a lot of the rendering techniques mentioned so my question is do we need special texture maps to really get the most from this? The majority of our models have a base, metallic, and normal textures and some have AO maps. Is this enough to see an improvement with Uber?

    Lastly, just thought I would make sure this was VR compatible as we're pretty much a VR studio.

    Thanks,
    Reggie
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Although I'm not PS developer so I can't make sure testing it on rea hardware, I believe UBER is compatible. To get most out of it you could deliver heightmaps. If not available I'd recommend using tools that can derive heightmaps from normalmaps (personally use Knald). Knals might be able to deliver estimated depthmaps for translucency as well. Such maps are taken as inversed AO computed to inside direction of model.
     
  13. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    232
    Ok thanks. If there are any issues on the PS4/5 side, would you be able to work with us to resolve or do you only support PC?

    The big question is whether this is compatible with VR though.

    Thanks,
    Reggie
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    I basically haven't touched VR related code of Unity Standard Shader. UBER adds on the top of it and I do believe people checked this already in VR (parallax extruded objects look great as they said). If you experience problems - sure I'll try to help as much as I can.
     
  15. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    232
    Ok thanks. The PS4/5 is highly desirable but not critical. If it doesn't work in VR though, it wouldn't be any use to us. If you would offer a refund if we can't get it working on the PC in VR, then we'll be happy to pick it up and give it a try.
     
  16. DragonmoN

    DragonmoN

    Joined:
    Nov 27, 2016
    Posts:
    14
    Any Updates regarding HDRP Support... need a proprer parallax solution^^
    And UBER is on Sale btw.
     
    amynox likes this.
  17. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    128
    URP support ?
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    I'm now more on managing URP version. It takes time because I've decided to not simply "make it work", but do general maintenance. I simply don't like to re-push 2015' asset, but rather rethink it, improve where possible and then release. HDRP more or less covers most of shading applications so for now I can see no reason to reinvent the wheel, like for example with approximated translucency while Unity's super-scientific approach is there already. For URP I'm waiting a bit for Unity tech to come up with URP deferred. It will make my new releases more complete. And as URP and HDRP are still under quite active developement it slows me down because I can't really know "what's the base to build stuff on". It was the case for UBER as extension for complemeted Standrd Shader in Unity 5. Now pretty much everything in the rendering anathomy is subject for change. I know that it makes also other developers life quite hard (esp. when talking about shaders , rendering or postprocessing).
     
    hopeful likes this.
  19. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    373
    @tomaszek I've deleted the UBER folder in a project as we don't use it, but I'm still seeing this when building:

    upload_2020-7-10_0-58-48.png

    How do I remove it completely?
     
    Last edited: Jul 14, 2020
  20. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,104
    Hi, I've been using Dynamic Snow on UBER for awhile, works great, except that I can't figure out how to make the snow less bright during nighttime, so it matches other snow (like in MicroSplat) better. See screenshot -- I've tried tweaking all the sliders/values, but can't get it to just be less white-bright at night. Any suggestions?

    thx
    Dave
    uber snow.JPG
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Sorry for delays in answer (somehow I missed notification)

    Dave, could you compare what's being output for lighting? I mean - when in deferred we can check in scene view debug mode whether albedo is the same as for the other snow. Notice that diffuse scattering effect in UBER affects albedo. The other reasons for not matching - SH ambient lighting applied different way or reflections (when in forward). I'll also make a test scene with white surface using regular standard shader, use the same albedo and put UBEr snow next to it then compare with different lighting conditions.

    The shader you're refering to is Unity post FX shader used as "final" merge pass for Postprocessing v2 stack. It's not related to my UBER shaders.

    ATB, Tom
     
  22. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,104
    Thanks for the tips, no worries about the delay.

    Here are some screenshots showing what it looks like, in regular deferred view, then each debug mod.

    Re: snow diffuse scattering: I thought I'd tweaked everything in the dynamic snow module, but that was set to pure white, and I find if I adjust it to, say, 222/222/222, it matches the terrain snow much better. And still looks good in daylight. Is that what you'd suggest doing?

    Also: We're using the UBER-Enviro integration script, which has worked fine, but recently something changed and now the UBER dynamic snow melts within a few seconds after the Enviro snow stops. Looking at the inspector for that script, I can see the snow amount slider drop down to zero. We've set a fairly slow melt speed in Enviro, and even if I change it to zero, the snow melts within a few seconds. So it seems like it's something with UBER, not Enviro. Is there something I can check about that?

    snow-deferred.JPG snow-albedo.JPG snow-smoothness.JPG snow-specular.JPG

    thanks!
    Dave
     
  23. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    373
    Oh ok, good to know, thank you!
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Yes, for snow matching color that's it. For melting time. Hard to say as I don't know how it's done script side in this asset. Basically I literally changed nothing in UBER in regards to weather/snow management since 2015 so I believe we need to find the reason in cross integration. My weather script controls snow levels and state basing on given temperature over time. Maybe UBER and Enviro sum up their impact on snow state simultaneously. Try to use my weather script alone and you'll see, otherwise don't use it at all maybe when Enviro does it. But then - it's Enviro side where snow params are controlled in.
     
  25. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,104
    Ah, it's the temperature. If I set that in Enviro to zero or negative, then the snow doesn't melt on UBER objects. But if I set it to any positive value, even 0.001, then it melts within a few seconds. I can't figure out how to set a temperate that will make it melt over a few minutes instead of seconds....is there one?
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    If temperature value (in my weather script) is the only parameter influenced by Enviro then you'd [probably need to take a look at what happens internally on UBER side. I believe I adjusted melt parameters (which is how fast global snow value decreases) so that it happens over "realistic" time. Otherwise it might be related to timing which could be measured wrong way. Hard to say. Anyway - I'd recommend looking into my weather script - it's pretty basic and check which parameters (time, melt speed - which is hardcoded) makes it behaving not like intended.
     
  27. john_mike

    john_mike

    Joined:
    Jun 19, 2017
    Posts:
    6
    I just recently migrated from Unity 2017 LTS to 2019 LTS (sticking to legacy rendering) and updated UBER. Many of my UBER materials with non-white albedo colour now look pale and bland (on right in the attached image). The left sphere in the image shows the original appearance when I switch the material to use the standard shader. Can I fix this without manually redefining a new colour for each material?
     

    Attached Files:

  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    What was the UBER version before you updated? (I assume you're using the newest now). Would need to take a look on differences of stored material properties to check which one actually are represented different way. As you checked it already - adjusting albedo color of given material after migration can fix the issue? I'd suspect it might be some gamma vs. linear color representation. Is your project in 2019 set to the same color space?

    If this is linear/gamma issue and cant be fixed automatically (introducing single change in shader or shader GUI code) I believe it could be relatively easy to batch process all project UBER materials via some dedicated script. We'll see.
     
  29. john_mike

    john_mike

    Joined:
    Jun 19, 2017
    Posts:
    6
    Thanks for the response. I had used 1.2g earlier and updated to 1.2h. The project used and still uses linear colour space.

    Anyway I managed to reproduce the problem with a clean project:

    * Start a brand new Unity 2019.4.6f1 3D project
    * Change colour space to linear
    * Create two cubes
    * Create two standard materials with albedo #783738 and assign to cubes
    * Import Uber 1.2h
    * Change the other material to use Uber metallic core => the cube changes colour immediately (I'd expect it to stay the same)

    Changing the colour space to gamma seems to make them identical. Changing back to linear makes the Uber material pale again The same happens with the older version of Uber (1.2g)
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    A simple way to reinterpret albedo value to be gamma from shader property - right away using already present Unity functionality.

    For given UBER shader change 2 first properties from this:

    Code (csharp):
    1. [HDR] _Color("Color", Color) = (1,1,1,1)
    2. [HDR] _Color2("Color2", Color) = (1,1,1,1)
    to this:

    Code (csharp):
    1. [Gamma][HDR] _Color("Color", Color) = (1,1,1,1)
    2. [Gamma][HDR] _Color2("Color2", Color) = (1,1,1,1)
    Should do the job.

    Tom
     
  31. john_mike

    john_mike

    Joined:
    Jun 19, 2017
    Posts:
    6
    That works, thank you! Is this a fix specific to my case or will these be released as an update?
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    To be honest - I simply overlooked testing this case. I'll introduce it for next UBER update, but it's not critical and easy user-side fixable, so I'll wait until some more fixes come to accumulate them before submitting.
     
  33. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,042
    When I use Uber metallic with Substance materials it looks black albedo become totally black
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Could you clarify a bit? I'm comparing Unity Standard shader with metallic setup against UBER and it behaves exactly the same. When surface is fully metalic (as value=1 taken from metalic map multiplied by ranging 0..1 slider) it damps albedo output to zero and moves source albedo to be "specular" color (as you can check in debug scene view when camera is in deferred mode). If your source albedo was black resultant output would be 100% black metal. It's not much common in real world. Anyway output would be like files attached.

    I used this free substance for tests: https://share.substance3d.com/libraries/2647

    substance_metallic_UBER_blackAlbedo.jpg substance_metallic_Unity_blackAlbedo.jpg substance_metallic_UBER.jpg substance_metallic_Unity.jpg
     
  35. kaniballo

    kaniballo

    Joined:
    Sep 2, 2013
    Posts:
    5
    hi, one small question(i hope)... about animated emission - Pulsate and Pan Mask,... they don't have standard behavior.
    for example - pulsating emissive box, don't pulsate light on environment objects walls and floor. I think something must be add in given shader or UBER_StandardConfig.cginc - but don't understand shader code well, especialy emissive part,... Tnx in advance.
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Can you post a compare (UBER vs. Standard) here? Basically emissive materials don't affect anything around unless you use dynamic lightmaps (enlighten). I'm not sure whether refresh rate of enlighten would catch fast emissive pulses. Otherwise UBER emissive materials are supposed to affect environment via dynamic lightmaps.
     
  37. kaniballo

    kaniballo

    Joined:
    Sep 2, 2013
    Posts:
    5
    hi tnx for response,.. i don't use Enligthen - but try with voxel GI SEGI - i can emulate panning and pulsating with scripting HDRI Intensity slider over time,... just when i test UBER i saw emissive pan and pulsate section don't corespondate on environment - it's not problem at all for me - but may be for someone else,...
     
  38. Farlandsky

    Farlandsky

    Joined:
    Feb 15, 2015
    Posts:
    1
    Hello. Would like to know if there is an available preset library for Uber metal surfaces?
    We can't do decent metal surfaces. Some kind of plastic comes out :( Perhaps we do not understand how to use channels in metal tuning ... But there is very little information in the manual about the metal tuning itself :(
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    UBER maps metallic values taken from texture (metallic/gloss texture) the same way as Unity Standard shader. Can you check using Unity Standard shader with metallic workflow? If there are problems where UBER works not the same way as Unity's Standard let me know.
     
  40. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    763
    What's up with all the UV edges on triplanar materials? Isn't triplanar mapping supposed to fix that? Tessellation displacement also seems weird, more like POM with the perspective shifting as I move the camera. And black artifacts if the camera is further away.
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Could you give a screenshot to clarify the issues? Give exact shader variant and features used so I could try to reproduce it.
     
  42. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    763
    The artifacts were due to my shadow settings.

    Here's a screenshot of the issues I'm having with the triplanar shader:
    upload_2020-9-27_11-14-59.png
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Check normals in the first place - I select mapping plane basing on vertex mesh normals, not real geometry normals. If sides where streching occurs have correct normals please send me your mesh (can be just part of it) so I can test.
     
  44. PaavoHapponen

    PaavoHapponen

    Joined:
    Sep 10, 2014
    Posts:
    4
    Hi.
    It appears there is a subtle bug that mostly manifests in VR (because of constant micromovements) with the snow shader.
    There's bright flicker in sharp concave corners of objects.

    It appears this is because the i_tangentToWorldAndParallax2 (later worldNormal) is not normalized.
    This can be fixed by adding on line 195 of UBER_StandardCore.cginc (in SetupUBER())
    i_tangentToWorldAndParallax2=normalize(i_tangentToWorldAndParallax2);

    Naturally this very slightly adjusts the snow level as is to be expected when the .y value changes on normalization.
    This can also be fixed by applying it to worldNormal later if the unnormalized i_tangentToWorldAndParallax2 is actually needed somewhere.
    Or in the actual call itself on line 556 of UBER_StandardCore.cginc (in FragmentSetup())
    _snow_val_nobump = saturate( _snow_val - (1-normalize(i_normalWorld).y)*_SnowSlopeDamp );

    Here is the fix toggling on and off with _Time.y;


    (since gfycat quality is terrible even in HD, here's an .mp4 )

    This is with version
    UBER 1.2h (U2018.3.2f1 release)
    on Unity 2018.4.27f1
     
    Last edited: Oct 2, 2020
    tomaszek likes this.
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    Don't normalize input tangents - it's unnormalized for a reason (I use lengths for another feature). The other approach to fix is fine. This is very good find and you probably already spent quite some time analyzing the code to find the reason/solution. Thanks.

    Tom
     
  46. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    208
    here is the problem, i have assigned textures but still its rendering clay. using unity 2019.4.10, default renderer.
     

    Attached Files:

  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,817
    This is expected behaviour - for specular setup shader completely dicards albedo data as soon as it's treat as pure metal. Pure metal means - specular color is high - in your case it's white. As you don't provide any specular color map turn down spec color multiplier to usable dielectric level (like 0.1-0.2 for example). Also - when you don't provide specular texture, you need to take care of smoothness data. For no spec texture it can be optionally taken from albedo alpha channel (you need to have such texture mix prepared - it's typical workflow used for example on Unity terrain). Even if you do have such PBR texture data in your albedo texture you have "Smoothnes (A)" from albedo unchecked by now.

    So to summarize - reduce spec color to dark grey. Walls should look more correct (non-clay). Still if you care about going towards realistic PBR output deliver smoothness info (either alpha channel of albedo texture or alpha of specular texture). To prepare mixed texture (albedo RGB+A for smoothness) you can use "texture channel mixer" tool available at UBER inspector button (at the top). Refer to my pdf doc maybe first to save time on further confusion.

    Best Regards, Tom
     
unityunity