Search Unity

UBER - Standard Shader Ultra

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

  1. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    260
    Hi there!
    I am trying to change details mask and detail normal via script, but applies only mask and color, normal applies only after click object in the editor.
    Here my code
    Code (CSharp):
    1.  
    2. obj.EnableKeyword("_NORMALMAP");
    3. obj.EnableKeyword("_DETAIL_LERP");
    4. obj.EnableKeyword("_DETAIL_MULX2");
    5. obj.EnableKeyword("_DETAIL_SIMPLE");
    6. obj.EnableKeyword("_DETAIL_TEXTURED");
    7. obj.EnableKeyword("_DETAIL_TEXTURED_WITH_SPEC_GLOSS");
    8.  
    9. obj.SetTexture("_DetailNormalMap",  texture);
    10. obj.SetFloat("_DetailNormalMapScale", 1);
    11.            
    12. obj.SetColor("_DetailColor", Color.green);
    13. obj.SetTexture("_DetailMask", texture2);
    What i'am doing wrong?
    Thanks
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    You should not set all possible keywords - they are mutualy exclusive. set either _DETAIL_SIMPLE or _DETAIL_TEXTURED. You can take a look at my inspector script that handles all UBER shaders. It will be easy to find a place inside where keywords are set - simply follow the same conditions when setting your variant manually. Take into account that it's more safe to have 2 materials in project - one with no detail and the other with detail. Use 2nd material in case you need detail and replace textures only. Keywords will be already set for you.

    The danger that comes along with your approach is that shader variant might be not available (esp. on build) when you require it runtime. Unity compiles and includes in build only shader variants that are currently used in scene/project.

    Tom
     
  3. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    732
    I'm interesting in possibly purchasing this asset. I just have a couple of questions, to make sure I understand it right.

    I see that is "builds" on top of the standard shader. Does that mean that it supports everything within Unity that is normally supported by the standard shader? For example, does it have any sort of fallbacks? Does it support the whole reflection probe system? How about Unity's shadow system? Finally, does it work with both forward and deferred rendering(I assume more likely deferred as this is more like AAA graphics, etc...). Basically I like the features it is adding on, but I don't want to lose anything if possible. As long as performance is acceptable generally(which I assume it is) I wouldn't want to lose something else that I need.
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    Simple answer is - expect everything that you have in Unity StandardShader + 1ton more :). Of course you need to consider it will work well in AAA scenario. Don't expect it work on gles2 mobiles.

    Tom
     
  5. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    732
    Yup, I already bought it. I was skimming thru the 14 previous pages and found someone talking about the deferred, among other things, so yup, I now own it!
     
  6. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    379
    Hi, I just bought your awesome and amazing shaders, and I want to ask if I can use them on mobiles phones or tablets that use gles3? (OpenGL ES 3.0)

    If yes, please, do you have any information on how is the performance on mobile?

    Of course I understand that it will depend obviously on the computing power of the mobile that you may use, but to have a rough idea to know if it can be a good or bad idea to use these Uber shaders on mobile

    RSP? (Relief shader Pack)

    If I already own this UBER that already have extrusion tool, what is the difference between UBER and your own RSP?

    thanks for your help and thanks for creating these awesome shaders
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    I have no tests chart available for mobiles. You neede to test UBER features on the GLES3 mobile hardware you consider as average for your project. Notice that tessellation from UBER might be available only for GPUs that are GLES3.1+AEP extension capable. Generally POM with self-shadowing is the most expensive feature.

    RSP is predecessor of UBER. It's Unity4 only and discontinued. I hold it on AssetStore to let RSP users to buy UBER for $1.

    Tom
     
  8. AntonBertelsen

    AntonBertelsen

    Joined:
    Oct 13, 2014
    Posts:
    37
    Hi there! I purchased UBER yesterday, and I just wanted to say that it is absolutely wonderful. I'm also impressed with the amount of support you provide on this forum.

    I do have a question though: I'm working on a game right now with a fairly large scene. I therefore use unity's in build LOD system to keep the performance good. Sometimes it is obvious LOD popping though. I know that unity has a dithering functionality for shaders build in, and I was wondering if it is planned to implement this into the shader, or if you could inform me about how I could do this my self.

    Thanks for your support and amazing Unity addons!
     
  9. Dave3of5

    Dave3of5

    Joined:
    Jan 20, 2015
    Posts:
    27
    This is amazing. I have to say a real thanks to Tom. I've bought RTP and this.

    I was wondering do you have video tutorials on this yet and is there any more detail on the 2 layer shader. What I'm looking is to add dirt and grim to an already existing asset.

    Thanks again for your fantastic contributions.

    David
     
  10. Editali

    Editali

    Joined:
    Mar 9, 2016
    Posts:
    16
    Hi, I'm new to Unity and so Uber. Recently I have bought a license of Uber, however I don't know how should I configure my project to take advantage of emission/glow effect. I have set camera's "Rendering Path" to "Deferred", and I also have set "Edit/Project Settings/Graphics/Builtin Shader settings/Deferred" to "Custom Shader/Internal-DeferredShading_UBER", all the same, it doesn't work. Here is a picture of this, as you see, there is no glow effect around emitting spots:
    dsdsfds.png
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    Glow on my showcase demo is done via postprocess effect - i.e. SE NaturalBloom, but you can try any fullscreen bloom effect...
     
  12. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Hey Tom,

    I'm definitely considering buying these set of shaders and since I use Substance Painter/Designer for my authoring, does UBER have shaders that allow me to see my model channels? And also does your shader set support the Metal/Roughness workflow?

    Thanks a bunch
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    Specular/Metal workflows are both handled. I'm not sure what you're refering to "model channels". Vertex colors ?

    Tom
     
  14. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    In Substance Painter, I can paint on the roughness channel, metallic, albedo, etc
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    And UBER shader can automaticaly react to this - as far as substance painter update textures realtime. Only you might need to customize which channels are taken for roughness, metal in UBER. Generally they are choosen the same as in Unity Standard Shader. It's per shader or globally in UBERStandardConfig.cginc.

    Tom
     
  16. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Still no skin shader?
     
  17. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    You can easily do this with the transmissive and diffuse scattering
     
  18. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    32
    Hello tomaszek
    (I posted a question on the wrong thread so I'll just continue the discusion here.
    I'm the one who just could'nt make translucency work in defered rendering. )

    I read the documentation and all like you asked me to then
    On my camera
    Set on defered rendering and HDR
    I add the script UBER_GlobalParams

    Then in Project setting /Graphic : on Defered: I use Custom shader : Internal-DeferredShading_UBER

    Then I try to modify Translucency setup in the camera but nothing seam to change:

    bugus.jpg


    I use unity version 5.3.3 p1 is it supposed to work or this version?
    Last update you did was submited using 5.3.2
     
  19. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,875
    But aren't you supposed to temporarily switch the camera to forward?

    (I don't understand this, but I'm curious as to how it works.)

     
  20. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    32
    I'm not sure how to temporarily switch the camera to forward :S
     
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,875
    I could be wrong, but my impression was that you just switch the main camera from deferred to forward - using the camera component in the inspector - while setting the material.
     
  22. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    32
    Ok... got it. It's a weird workflow but it does works.

    Thanks!
     
    hopeful likes this.
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    I know the workflow seems to be a bit odd, but I wanted to hide unused controls from UBER inspector. Simply I forgot user can still have transparent objects i the scene which have translucency praams controled per material. Camera needs to be also HDR. Sorry for the confusion. I will simply detect if material is ptransparent (thus rendered in forward - always) and adjust inspector. This will appear in the next UBER update.

    Tom
     
    hopeful likes this.
  24. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    85
    Hello, I'm really sorry for the noob question.
    I apologize in advace if this post offends any users or devs of any products mentioned therein.
    I am planning on making a sci fi level soon
    I started in the unreal engine 4 . This was the result.

    However Unreal seems very unweildy to me and I keep getting stuck and unable to progress with the project.
    So I decided to try unity again. It's much easier for me to work with and I can get more tasks finished faster.
    I'd like to replicate this in unity but the standard shader seems to not be up to the task.
    Would Uber be the right shader tool set to replicate the above result?
    I am considering getting alloy, but uber is much less expensive.
    Or should I simply pony up the cash for alloy.

    Another question is based on the results I would think that alloy would be the top shader suite for unity. (based on the lighting models in my case) But uber is.
    I haven't actually tried either. So I am asking why is Uber so popular?
    I know the support is amazing (Thomas is Awesome)
    I suspect there are factors that I simply don't know of.


    Also I am wondering I had seen this: 5. docs with info on how to enable GGX specularity model for version 1.3. Does that mean Uber will be able to use that model?




    Also I do plan on purchasing the scion effects suite as well. I suspect that one of the edges taht unreal has is in post processing effects.

    Any constructive help would be appreciated Thank you!
    --Joshua
     
  25. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    On the shader front, you can replicate this scene with either Alloy or Uber. I've been using Alloy (with scion) and the results are stellar, photorealistic at times. Though I've learned Alloy in terms of performance can be a little heavier, that is the price of beauty. You can use reflection probes to recreate your scene. And if you are doing characters, Alloy has a special shader set for human characters.

    For uber, I've heard it is well optimised and can do a lot of the effects here and more. I don't know what the shading model is but the results are definitely beautiful, especially the POM, and other details. It also has stuff like snow, wetness, to name a few.

    In the end, you can choose based on your preference. Hope this helps.
     
    jammer42777 likes this.
  26. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    85

    Thank you!
    It seems i might want to start with alloy and add uber later. As it looks as though Thomas has setup uber to work with it.

    Thank you much!
    --Joshua
     
  27. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    And from what I've seen, Uber is very straightforward and requires minimal setup. And I think any textures from Substance Painter will work right out the gate. Also with Alloy just drag the UBER Deferred Shading into the custom shading in Unity graphics options

    @tomaszek Does UBER use GGX?
     
    jammer42777 likes this.
  28. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    85
    This is what I can manage with my current skill level, the unity 5 standard shader and a free lut.

     
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Keep at it. Also make sure Unity is set to deferred and you're using linear rendering. And set the camera to HDR
     
  30. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    85
    I took your advice, I should've started with those settings. I'll definitely want to try this will alloy's core shading. Will want to use uber for all weather!
     
    KRGraphics likes this.
  31. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Are you also using reflection probes?
     
  32. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    85
    Yes sir, 3 of them one in the center of the room and front left and right.
     
  33. Editali

    Editali

    Joined:
    Mar 9, 2016
    Posts:
    16
    Which one have you used for your showcase?
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    Unity Standard Shader does since U5.3. UBER had it as an option, but now I turned it on as default - implementation was always present in StandardShader Lighting (which I simply reuse - that's why it "StandardShader" Ultra). It wasn't enabled by default though.

    Tom
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    Looks like cubemap projection for your reflection probes is not setup right (window reflections on the floor are not aligned to their frames above).

    Tom
     
  36. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    jammer42777 is asking general Unity 5 workflow questions. I don't think this fits this thread?
     
  37. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Looks good... also make sure to turn on Box Projection and check your smoothing groups. I hope you tried out the POM. :D
     
  38. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    85
    Sorry thomas, I seemed to have pulled the thread off track. But since I am here is there anything that Uber could do for the above image? (aside from the amazong POM)
     
  39. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    Will the uber shader instantly work with the upcoming unity 5.4 GPU Instancing?
    I read that they update their shaders and as UBER is based on them they should?
     
  40. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    85
    I decided to drop to one probe. seeming to work OK thus far.
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    You might try wetness if it's suitable for your room. It always looks good to have some reflectin puddles here and there :). Apart from POM, you could try adding objects that might benefit from other UBER goddies like refraction or translucency.

    Tom
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    I haven't followed guidelines for instancing yet. I read "shaders need only small tweaks to handle instancing" so - when U5.4 is out and guidelines with enough documentation are out I'll try to put it into UBER as well.

    Tom

    P.S. having 4 layers UBER variation with all textures would be also cool (using new to U5.4 texture arrays which will allow to not break 16 texture sample limits).
     
    Last edited: Mar 15, 2016
    Arganth likes this.
  43. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,488
    @tomaszek - Just giving you a heads up, with 5.4 beta 10 (haven't tried any other of the betas). But - your Shaders are broke with the 5.4b10.

    Not sure if all of 5.4 will be broken, that's why I mentioning it to you so you have a heads up bud.
     
  44. Umbrathic

    Umbrathic

    Joined:
    Nov 7, 2015
    Posts:
    1
    Yes, My project broke with 5.4b10 as well, materials with Uber on it are shown pink. I will wait for the update, I know it takes time, so while Uber is being updated I will be sticking with the standard shader.
     
  45. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    strangely i had not problem with unity 5.4
    but i havent changed much when i changed from standard to uber
     
  46. zundos

    zundos

    Joined:
    Mar 18, 2016
    Posts:
    1
    sorry , why i cant use this plugin.
    I click 01_uber_importFirst.unitypackage or 02 uber_contentsExamples.unitypackage.
    unity says , failed to import package with error: couldn't decompress package.
    my unity is 5.21
     
  47. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    usually has nothing to do with UBER itself
    check if enough space is available and if thats not the problem redownload UBER
    maybe the files are corrupt

    had that happen some times with different assets
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,728
    Does Unity give output on broken shader compilation ? Exceeded number of textures used for example ? Unity5.4 uses one more texture resource internally (and it can't be disabled that easily). I'm just about to install b10 and check latest UBER against it.

    Tom
     
  49. Snowey89

    Snowey89

    Joined:
    Apr 13, 2015
    Posts:
    8
    Hi,

    same for me, it's all pretty in pink :)
    Using the Specular Setup / Core shader. I'm getting this Error displayed in the Shader-View:

    undeclared identifier 'samplerunity_SpecCube1'
    Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF _WETNESS_NONE
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING

    Hope this helps ;)
     
  50. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    I would love a version of a triplanar shader that can use multiple layers (preferably 8+), and does not require texture atlasing (I assign textures at runtime, on the fly - generating the atlas is not an issue, but the memory cost of a unique atlas for every combination is). I've been debating about how to do that in a way that is optimal for a long while (since 72 texture samples is not exactly ideal, as well).

    Edit: Actually, that said, as much as I want one, my usage will still probably be so custom as to need modification anyways, so don't make anything like that for my case.