Search Unity

UBER - Standard Shader Ultra

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

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Using Unity's LOD system you can set LOD0 to use POM while next LODs to use ParallaxMapping. POM extrusion can be gradually removed with distance (refer to my docs) for LOD0 so transition can be smooth.

    If you take my selected UBER shader and change #pragma shader_feature "POM variants list" to #pragma multi_compile "POM variants list" or just include variants in your build you can change shader keyword runtime depending on situation, camera posision. I mean it's possible to turn-on/off POM runtime in your script if you really need.

    Tom
     
    Sir-Spunky likes this.
  2. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi,

    I was looking at the demos and both the web player and the Win 64 player crash if I try to press on the Right Arrow after the "amber" scene.

    Is the system I used for testing not compatible with the next scene in some way? Does the next scene require DX11? (I tried the demos on a DX10 gfx card)

    Which Shader do require DX11? Only the tessellation ones?

    Thanks for your time, looking forward to grab your uber shader :)
     
    Last edited: Aug 25, 2015
  3. _Seph

    _Seph

    Joined:
    Oct 29, 2014
    Posts:
    2
    Hi Tom your shader is amazing!

    One issue I have noticed is that the snow effect doesn't work when the object moves. For example I have a drawbridge that gets snow on it, but when the bridge is raised the snow all moves in a very unrealistic way because the surface has moved in global coordinates. Another example is in your demo when the statue rotates the surface moves.

    Do you have any plans or ideas on how to fix this?
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Refer to my pdf docs. For moveable objects you should not use global mapping checkbox in snow section of UBER material inspector.

    Tom
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Indeed after amber there is tessellation example (ear with phong smoothing), but it's supposed to go into fallback when it's not supported (for example on opengl which doesn't handle tessellation it works using fallback).

    So in the end I can't tell why it crashes. It's rather subject for Unity bug reporter maybe.

    Tom
     
  6. MalcolmWashington

    MalcolmWashington

    Joined:
    Jul 16, 2015
    Posts:
    12
    hi ! tomaszek

    how can I change this mask.

    I could not find it.
    can you explain with a picture or video.
     

    Attached Files:

    • mask.jpg
      mask.jpg
      File size:
      363.2 KB
      Views:
      1,361
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Controlled by vertex color R (configurable if you'd like another color channel - look into shader header definitions) ? I'm not sure but I believe I've mentioned this in my pdf documentation.

    Tom
     
  8. Tovrin

    Tovrin

    Joined:
    Jul 15, 2015
    Posts:
    70
    Hi Tomaszek

    I've just purchased UBER to supplement RTP3 and I have to say I'm very impressed. Top work again!

    I have a question/request. Prior to getting UBER, I've been using a cool triplanar shader pack that allows me to add three "levels" of textures delineated by facing ... which effectively means it has a main, bottom and top texture. To give you an example, I've been using them to add textures to caves where I have a main texture for the walls, but then I can put in a dirty rock for floors and twiggy rock for the roof (simulating tree roots protruding through the cave ceiling). Unfortunately, this shader pack doesn't have all that special stuff you do like POM, PM and blending. While these other shaders are great for what I need, looking at them side-by-side, UBER is ..... well kind of uber.

    Is it possible to achieve this bottom, main, top effect in UBER? If so how? Or do you need to work your special magic to get this to work in creating a new shader?
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Triplanar in UBER is special version called selective triplanar which uses the same texture set for all sides. It's not classical approach which in couple with PBR might lead to resource limits. (diffuse+normal+gloss+height) x 3 =12 textures which hit the limit because of unity textures needed as well for shadows, lighting.

    EDIT: if UBER is suplement to RTP you need to use RTP for this cave rendering then - it has triplanar with texture selection by world normal.

    Tom
     
    Last edited: Aug 28, 2015
  10. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    @tomaszek : First things first: This looks absolutely amazing!

    I have a question though.
    UT is in the process of rewriting their OpenGL rendering backend completely so that OGL4 will be supported at some point in the future. Do you plan on supporting OpenGL? What I what to know is whether you will guarantee that your shaders work with both, D3D and OGL. I don't want my screenshots to have to contain an asterisk and text along the lines of:
    *Some of the visual effects are only available on Windows. Sorry.

    That'd be a shame.
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    UBER works currently on openGL. However current implementation doesn't provide OGL4 features like tessellation. Unity says that when I run on windows with -force-glcore switch I can test openGL4 features on widows and tessellation works, but that's not true. Either my built in GPU and GT540M on my laptop makes Unity just crash when trying to use it. So, we just wait. To answer you - I never give any guarantee, because I'm not Unity author... What I can say is that I pulled my hair out the head once trying to make UBER openGL compatible (w/o DX11 features like tessellation). So - feel free to enjoy it :) ... and don't trust "glcore" features claims yet from Unity. In time I believe they will fix it hopefully.

    Tom
     
  12. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    When I talked about "guaranteeing" I meant that you're selling a product with certain features and wanted to know whether OGL compatibility is one of them.
    Given the quality of your work, I assume that you're having a certain level of professionality. This means that, if you ask people to pay for your product, you guarantee that it works in exchange.

    Anyway, the new OGL backend is due in Unity 5.3 in December. I will wait till then given the fact that they are rewriting the damn thing in its entirety. :D
    I really hope that UT delivers. I want to use Uber, but I don't want platform-specific downgrades.
     
  13. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Hallo. I have a question. I want to use alpha texture with 2 sided shader in transparent Rendering Mode.
    But something is wrong. I seem that reverse meshes penetrate other meshes .How to fix it?
    Please teach me .
     

    Attached Files:

  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yes, your hair strands intersect each other. The issue you've got is when objects are drawn in wrong order. This is behavior of transparent shaders, not related specificaly to UBER. If transparent object surfaces are not rendered in exactly back to front you have such glitches. Of course for some meshes it can't be resolved (they intersect each other so Unity can't order them telling which is closer to each other because it depends on the mesh part).

    Tom
     
  15. JeyDia

    JeyDia

    Joined:
    Feb 14, 2013
    Posts:
    100
    One of the best shader in the store, congrats Tomaszek ;)

    my current work :

    01.jpg 02.jpg 03.jpg 04.jpg
     
    FoxAlphaX, Malbers, chelnok and 10 others like this.
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hi everyone,

    (Surprisingly)
    UBER has been nominated for Unity2015 awards in new AssetStore cathegory

    If you think UBER deserve your vote, please vote for it :)

    This would not only mean prestige, but more awarness on my products helping further development.

    Kindest Regards, Tom

    P.S. @JeyDia - your artwork is astounding
     
    cg_destro and Rycons like this.
  17. JeyDia

    JeyDia

    Joined:
    Feb 14, 2013
    Posts:
    100
    Thanks @tomaszek and Good luck for the U2015 Awards you have my vote
     
  18. Rycons

    Rycons

    Joined:
    Nov 23, 2013
    Posts:
    31
    You have my vote mr tomaszek, Will showcase some of my work here when I can!
     
  19. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    voted, @tomaszek i remember you talked about a mobile version of the shader, but you might wait unity do something first, as the roadmap say:

    Graphics: PBR Mobile Optimizations

    Standard shader needs optimizations for low-end mobile/PC platforms. Some of these need to be GPU specific (for very popular GPU families)

    • Optimizations for Apple/PowerVR GPUs
    • Approximate/simplify for low-end GPUs like Mali-400
    • Automatic switching between "do math in shader" vs "texture lookup table" depending on GPU
    • Procedural Skybox shader optimizations
    • Shader data size / load time / memory improvements for large shaders
    people can also vote here:
    http://feedback.unity3d.com/suggestions/linear-space-lighting-support-on-mobile-platforms
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Some of them are introduced in U5.2 which is beta, but I saw them. They are still in production I believe. Anyway for UBER. There is problem with what should I focus on in terms of features ? Some of them just can not be introduced. POM shaders, advanced water or snow - they simply wont work or would work too slow.

    What can be done I believe introducing translucency + simplistic water/snow, 2 layer variants maybe. They might work on GLES2.

    Tom
     
  21. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    Thank you for making the core of it not mobile-designed - I'm pretty sure 90% of the stuff on the asset store is mobile-centric.. for small teams, the asset store is a tremendous boon to save valuable coding time to focus in on core gameplay and design elements, and for a high-end target there's not as many options.

    Besides, Unity's shaders tend to suck. Well, the Standard is not bad at all, but it doesn't come close to the functionality you provide here. Been a complete boon to providing really nice looking vegetation, especially - the translucency is amazing and so much more functional to use in a deferred context (how can people run dynamically lit scenes in forward, anyways?), along with the host of other features.. I was double-siding all my foliage, so the two-sided shader allowed me to cut vertex counts in half for all of them; dramatically speeding up my shadows in particular.
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Thanks, I tested 2 sided on some pretty basic foliage sets (with diffuse/normal maps only) and they can render pretty convicing using 2 sided in deferred.

    Mobile is always problem of what I'd like to do vs. what can be done. I realise the market is huge for mobile, but visual quality for GLES2 can't be pushed that far. So - first I want to provide AAA, then focus on what can be done for mobile. It's the topic not only for UBER, but also terrain rednering (RTP) and a few other ideas I've got here. GLES2 is not SM3, that's the problem (texture looksups in vertex shader, only 8 textures/interpolators available, low performance).

    Tom
     
  23. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Tomaszek I wouldn't worry about supporting any hardware any lower than GLES3. Even the cheapest new phones on the market can run opengles 3.1 now. I think the lowest quality of unity standard shaders doesn't use pbr because it isn't apropriate for low end mobile hardware. From what I understand all of your shaders are pbr so it wouldn't make sense to try and support hardware that low end.

    I would simply focus on making it at least work on GLES3 because that is what webgl is based on. By all means make your shaders as efficient as possible because it benefits everone. But in reality if people want to use your shaders on a low end mobile device they will simply need to lower the screen resolution to make use of them.

    If people are targeting very basic hardware then they shouldn't be trying to run complexed shaders it is as simple as that. They would be better served using a package tailor made for mobile or unity's built in shaders.

    The whole selling point of your shader package is that your shaders look better not that they are more efficient than unity's built in ones. Yes you could produce lower quality shaders that can run on opengles2 but it is something that unity already provides for free so would be pointless.
     
    Plutoman, tomaszek and hopeful like this.
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    That's why I only think of translucency which is rather cheap, basic wetness/snow for gles2. gles3 already should be able to run UBER shaders without problems. As I based on Unity Standard Shader template as base for my work it still has this keyword everywhere:

    #pragma exclude_renderers gles

    find it and simply comment out. On Unity5.2 you can test/run with forced gles2 or gles3 with force-clamped. So if UBER doesn't run on gles3 it simply mean above exclusion keyword makes it impossible or there is something special about gles compiler because it works on opengl. I wait till Unity will improve new glcore which means dx11 features on Macs. Currently it just crashes on both machines I've tested, but it's matter of time all UBER features can be compiled for DX11/opengl4/gles3.1. For mobile you just consider no aggresive POM setup and they should work fine. I mean - generally I don't need to rewrite UBER from scratch for mobile, it is teoreticaly mobile ready, but mid-high end mobile only (gles3, gles3.1 which both have sm3 capabilities)

    Meantime you can try to run U5.2 beta with -force-gles3 -force-clamped switch into android target platform even and see if it works. I hope such test is reliable enough to tell if UBER is gles3 ready already or not.

    Tom
     
  25. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    346
    Congratulations Tom! You got my vote! Good luck, UBER for the win!!!

    btw: your promotion video link is broken!!
     
  26. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Voted for in both categories. :)
     
  27. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Hi, I'm interested in purchasing UBER, but am trying to understand the secondary maps first.

    In the UBER docs, it is mentioned that the secondary maps work in 3 modes. Does this mean that if you are using the detail mask for color tinting (simple mode) that you can't also use it for detail maps at the same time? Or if you can have them at the same time, that the detail maps and color tinting would have to happen in the same parts only because they share the same mask?

    I like how Alloy has "Team Color" masks and detail masks as separate. Is that possible with UBER?
     
  28. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    wow, controlling tessellation displacement amount with vertex colors works very well. great for controlling it and matching UV seams, or connecting pieces. Will my shader edit to enable this be lost with each update to Uber? if so, can it be added as a switch option in the shaders?
    thanks!
    (voted and reviewed)
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Increasing switches with shader keywords will inevitably lead to RAM issues again (with exploding shader variant number). SOme switches I put as variables (they are constants so modern hardware actually doesn't pay for it in terms of performance). So - the answer is - yes, it can be done as a switch with some tweaks in shaders/GUI code, but currently I'm burried with work... Relax - I don't plan UBER update in near furutre :). Only U5.2 compatibility package (for new Unity reflections pipeline in deferred) but then you can simply skip importing shaders. As far as I remember they were not touched, only other files.

    Tom
     
    DrewMedina likes this.
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Short answer is - if you use detail colormap it will be tinted by constant color which is used when detail mask is present (simple mode). you probably mean - some parts you'd like to have tinted by constant color, and other by texture ? That's not posible.

    If your colormap detail is plain color (take into account blending - default is mulx2 mode - color x detail color x 2) it would work like in simple mode as far as your detail color texture is the same as tint (which is still available but then should be rather set to white so it doesn't count). If you then place some variants on some parts of your detail color texture it will be like you probably need.

    Tom
     
  31. JeyDia

    JeyDia

    Joined:
    Feb 14, 2013
    Posts:
    100
    New scene for testing the POM in WIP with UBER.
    All the scene is made of quad except cube for lighting on the ceiling.






     
    kshaja, elias_t, Fab4 and 4 others like this.
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Where are these gazzilions of polys used ? :)

    ATB, Tom

    P.S. I wish I could use a short video capture of your corridor with POM depth increasing. I'm in the middle of video making as UBER showcase required.
     
  33. JeyDia

    JeyDia

    Joined:
    Feb 14, 2013
    Posts:
    100
    Here is the video

     
    Last edited: Sep 6, 2015
    kshaja, nuverian, elias_t and 5 others like this.
  34. TaesikYoon

    TaesikYoon

    Joined:
    Apr 28, 2015
    Posts:
    6
    I have
    I have same issue :-(
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Update Unity to 5.1.1, 5.1.2 or 5.1.3. UBER doesn't handle 5.0 but Unity AssetStore doesn't constrain nor warn users.

    U5.2 version of UBER to handle new deferred reflections pipeline should be available very soon.

    Tom
     
    Rycons likes this.
  36. XaneFeather

    XaneFeather

    Joined:
    Sep 4, 2013
    Posts:
    97
    Is it possible to add a texture mask for translucency? I found a vertex mask preprocessor variable but I need a way to mask by pixel rather than vertex as this wouldn't work for billboard vegetation.
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Look at ear example. It is baked as one of the channels in occlusion texture (thickness + veins). You can configure which chanel it is in config .cginc file or in shader define preprocessor (when it's not defined in shader "global" selection is used basing on config file).

    Tom
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    At last. My showcase video is ready (as a finalist of Unity 2015 Awards it was a pitty to not have one :) )



    Tom
     
    Last edited: Sep 9, 2015
    Malbers, GoGoGadget, ksam2 and 5 others like this.
  39. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Congrats, for the nominations!
    Uber is a great piece of software :)
     
  40. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
  41. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Don't know why but translucency doesn't work for me at all on Unity 5.2
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    To be fair and honest - buy UBER when you need it. Making strong promises for the future is not possible.
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Dont' panic ☺. Uber1.04 for 5.2 is already submited. I will announce it hopefully soon.

    ATB, Tom

    P.S. transl. should still work in forawrd though.
     
    ksam2 and John-G like this.
  44. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Finally got this to work, I had too many shaders, deleted a ton and it works :-D.. and looks great! One thing it doesnt seem like the fog effects it, which is a shame.

    PS. voted!.
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In deferred you're supposed to used postFX fog. Forward rendered shaders in UBER (transparent) can handle fog, but you need to configure which fog model is used and recompile shaders. The reason I made it like this - it save a ton of shader variants produced (thus RAM, resources, compilation time, etc.). Just select fog model used in your project for forward shaders.

    I realise that transparent shaders doesn't write into depth so post FX fog won't affect them. That's why it might be desirable to use fog baked at shader level in such case.

    Tom
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    UBER 1.04 for U5.2 (only) is available on AssetStore:

    1) Unity 5.2 deferred reflections compatibility

    2) Translucency in deferred works in scene view (remove command buffers from existing cameras if you upgrade from previous UBER version in project)

    3) new variants - 2 sided / 2 layers with layer selected by side

    4) albedo tinting by vertex RGB color can be optionally masked by albedo texture (A) channel

    So - if you are not U5.2 user, this update is NOT for you (updating on lower Unity would have to effect).

    ATB, Tom
     
    ksam2 likes this.
  47. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    good work, I really like the look of these shaders, almost puts my other stuff to shame though :)
     
  48. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I will try but im worried other stuff will look weird, like suimono etc, I will let you know the results, thanks.
     
  49. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Now that the 5.2 version is out, just wanted to remind you that this bug is still present (UBER + RTP = translucent objects on screen splat weird random shadows on terrain)
     
    ksam2 likes this.
  50. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hi,
    Upgraded from RTPv3 to Uber. Been enjoying playing with it and have started integrating into game. Very pretty.

    Got a few oddities to report.

    First, UBER_MouseOrbit_DynamicDistance.cs has a tonne of null characters at the end of the last line which cause Visual Studio 2015 to show 208 errors! (it reports them as a little square but good old Vim shows the ^@). Deleting them fixes no problem but figured you'd want to tidy for a future release.

    Next, I've used to create a glacia wall and a rocky floor.
    The rocky floor is fine. The glacia wall has some odd artifacts:
    • Snow particles don't show (properly/if-at-all) in-front of it.
    • Typogenic text doesn't show (properly) in-front of it (in same camera). Screenshot 2015-09-15 11.01.18.png
    • Odd semi-reflection seen when screen effects enabled (see attachment 1). Screenshot 2015-09-15 11.02.47.png

    Glacia wall is "UBER - Specular Setup/Refaction/Core", largely similar to the lovely ice block demo but as a huge plane.

    By "properly", for typogenic text, see attachment 2. For the snow, it /might/ be rendering but is massively distorted if showing at all? (I see occasional smears across the ice walls. Otherwise they only appear in-front of the snowmen and floor.)

    I wondered if it could be something to do with depth buffer? Concluded the distortion part might be. Here's my reasoning:
    I have an ultra-low-performance mode where I disable all image effects and HDR (Camera reports it's not rendering extra stuff like depth or normal buffer). This removes the odd semi-reflection but other artifacts remain (attachment 3 is same as attachment 2 but taken before enabling standard TiltShift effect -- note the text moved once enabled!).

    Sorry if this wasn't very clear -- not much time right now. I'll clarify later if you don't immediately say "oh that, just do X!". Hope that's OK?

    Thanks.

    p.s. That lovely ice block -- how was it built? I'd love to be able to make some more!
     

    Attached Files: