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,751
    Preset functionality is meant for quick sharing and reusing parameters, not to reduce material count. During rendering you need separate materials anyway if you need different behaviour on your rocks. The only thing that might look like "workaround" here would be usage of Unity's MaterialPropertyBlock functionality that allows some parameters for shading are stored not in material. Still we would need to have MaterialPropertyBlock functionality implemented via script. MaterialPropertyBlock object is coupled with renderer. Single prefab would represent single rock mesh with its renderer +material+materialpropertyblock. MaterialPropertyBlock parameters override these stored in material.

    To have separate variation of rock present in scene you need separate object in scene. That's unavoidable. More variations = more unique set of parameters that feed shader at rendering stage which means worse batching efficiency.

    I assume you'd like to keep your project clean and not overcrowded with viariations. Still - at scene you'll have a lot of object copies (no matter materials or materialpropertyblock assigned to rendrer). Simpliest way to copy material t scene level is to make such assignment at script level:

    aRenderer.sharedMaterial = aRenderer.material;

    Beause accessing .material property makes unique copy while sharedMaterial is reference (that for prefabs is material object stored in project). At scene you can store objects that are not assets (materials present in project folder) - they are saved with scene and such scene can reference them (cross scene references can't be saved scene files).

    Tom
     
    AlexanderElert likes this.
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Preset is functionality coupled with UBER inspector, not material - simply materials can't even store reference to objects other than textures. UBER creates hidden scene object that synchronizes it. Look at the response above. Presets are introduced to quickly copy group of parameters between materials (for example water/snow ones).

    How do you envision the way things should work to help you with developement then? If it would be possible to implement - why not. The problem is about storing more data in object that's not suited for this (material). We would need to introduce separate component for this that would communicate with UBER inspector GUI. This is also the reason I managed things like this - material is simply material.

    Tom
     
    AndyNeoman likes this.
  3. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Argh, so i'm misunderstanding the preset functionality. I thought it stored the settings for each material. So what i was doing is having a preset for rock, one for my animals and fruit etc.... but when i change one (to say gorilla) all the other rocks/fruits also changed to gorilla. I guess this is unavoidable.
     
  4. meena-shubham

    meena-shubham

    Joined:
    Jun 26, 2016
    Posts:
    2
    I'm noob
    How do i get full tutorial for uber standard shader ultra!!!
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    The way it works is like Unity standard shader. For details there is pdf doc available:

    http://www.stobierski.pl/unity/UBER.pdf

    Tom
     
  6. Enaver02

    Enaver02

    Joined:
    Dec 18, 2017
    Posts:
    15
    I'm massively struggling with how to get parallax working.

    I have imported the Albedo, Normal, Height and Occlusion maps from SP. When moving the sliders nothing happens, I have tried all combinations, at most the object goes invisible or completely grey. I've read the PDF.

    Even when disabling POM moving the height slider also doesn't seem to do anything.
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Are you sure your heightmap has alpha channel with hiehgt info? By default in Unity Standard Shader it's taken from g channel. In case you have opaque rgb texture as source use alpha from grayscale in importer and use Alpha8 as compression setting to not waste memory for unused RGB channels.

    Tom
     
  8. AlenH

    AlenH

    Joined:
    Jun 30, 2015
    Posts:
    42
    Unity 2017.3.0f3 on build i get this:
    Shader error in 'UBER - Specular Setup/2 Sided/ Core': 'length': no matching 1 parameter intrinsic function; Possible intrinsic functions are: length(floatM|halfM|min10floatM|min16floatM) at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)

    Shader error in 'UBER - Specular Setup/2 Sided/ Core': invalid subscript 'vec' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)


    UBER 1.2g (U2017.1f3 release, U2018.1b6 checked)

    Any help much appreciated!
    Alen
     
  9. Fortitude3D

    Fortitude3D

    Joined:
    Sep 7, 2017
    Posts:
    155
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Must be that you imported newest version but not reimported 2 included subpackages (01_importfirst, and 02_contents).
    After such installation your .cginc file that reportes bug should have such contents around the line 636:

    Code (csharp):
    1.  
    2. #ifdef UNITY_STANDARD_USE_SHADOW_OUTPUT_STRUCT
    3. half4 shadowOutputHelper(VertexOutputShadowCaster i, float rayLength) {
    4. #if defined(SHADOWS_CUBE) && !defined(SHADOWS_CUBE_IN_DEPTH_TEX)
    5.    // Rendering into point light (cubemap) shadows
    6.    return UnityEncodeCubeShadowDepth((length(i.vec) + rayLength + unity_LightShadowBias.x) * _LightPositionRange.w);
    7. #else
    8.    SHADOW_CASTER_FRAGMENT(i)
    9. #endif
    10. }
    11. #endif
    12.  
    Tom
     
  11. AlenH

    AlenH

    Joined:
    Jun 30, 2015
    Posts:
    42
    Yes, I didn´t import those two packages...all errors gone, thanks. Wasnt even aware of those :)

     
    hopeful likes this.
  12. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    118
    @tomaszek can you please tell me what is the name for your _MainTex2_ST? (the Secondary Map UV) I found _MainTex_ST in the source but not the secondary.

    As a matter of fact, searching for "uniform float4 _" in the entire source, it doesn't come up lol.

    I need to animate both the main albedo tiling and the secondary map albedo tiling from a c# script.

    [Edit] Oh, I think I may have found it "float4 _MainTex_ST, _DetailTex_ST;" :)
    [Edit] Oh no, that was from somehere else. It has to be "_DetailAlbedoMap_ST".
     
    Last edited: Feb 26, 2018
  13. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    172
    Hi,

    Any idea how to get this looking inside unity? its from marmoset
    I have the following textures, basecolor, normalmap, AO, height,metallic, roughness, fuzz, i tried tesselation, but very poor result :/

    000.png
     
  14. okba28mca

    okba28mca

    Joined:
    Aug 22, 2010
    Posts:
    85
    Hi Tom !
    I'm having errors thrown when I try to build the game :
    Shader error in 'UBER-Metallic Setup/Core' : invalid subscript 'vec' at Assets/UBER/Shaders/includes/UBER_StandardShadow_Tessellation_.cgnic(636) (on d3d11)
    It's strange because it WORKS before .
     
  15. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    150
    I'm getting build errors when trying to build for HTCVive with Viveport. I'm using unity 2017.2.0p2-MRTP5. I do have a copy of the Refraction shader that I have set to use exponential fog as one of my scenes uses exponential and the other uses exponential squared, but I haven't had problems building it till now.

    Shader error in 'UBER - Specular Setup/Refraction/Core': Too many output registers declared (12). When no output register has been declared with the semantic 'psize0', 11 o# registers are available. When an o# register has been declared with the semantic 'psize0' (same as 'psize'), 12 registers are available. at /Program Files/Unity 2017.2.0p2-MRTP5/Editor/Data/CGIncludes/UnityCG.cginc(778) (on d3d9)

    Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LOD_FADE_CROSSFADE _WETNESS_NONE
    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

    Shader error in 'UBER - Specular Setup/Refraction/Core': Too many output registers declared (12). When no output register has been declared with the semantic 'psize0', 11 o# registers are available. When an o# register has been declared with the semantic 'psize0' (same as 'psize'), 12 registers are available. at Assets/UBER/Shaders/Includes/UBER_StandardCore.cginc(1133) (on d3d9)

    Compiling Vertex program with DIRECTIONAL LOD_FADE_CROSSFADE _WETNESS_NONE
    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
     
  16. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    150
    I found the problem. When I changed the project to Windows Standalone from UWP Dx9 support was added to the graphics APIs and Dx9 dose not support as many output registers. Removing Dx9 from the graphics APIs fixed it.
     
    hopeful likes this.
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    To get such level of detail you would need to tessellate your mesh like crazy. Expect serious performance drop then due to ineffectie small triangles rasterization. Better to use POM cranked to higher level (more steps). Refer to my pdf doc for guidelines (performance wise). Heightmap needs to be stored in alpha channel. Import your heightmap (most probably B&W - RGB) with "transparency from grayscale" and use explicit ecoding "alpha8" to skip unused RGB channels. Mix basecolor with AO using texture channel mixer tool (available right from UBEr material inspector). Store mettalic in G channel (or reconfigure it in shader code - look at #define section below properties, you could look at UBER_StandardConfig.cginc file as well). Alpha channel of the same UBER input is meant to store smoothntess (it's inverted roughness like smoothness = 1-roguhness). You don't need to inveret roughness map though - you can flip min/max range in UBER inspector instead. Fuzz - it's used to map diffuse scattering. In UBER it's constant, so your moss can't be shaded different way. Some people worked this around using snow with green color to mimic moss - results were pretty convincing. Eventualy you could try to split rock/moss into 2 layers and use 2layers UBEr variant. It needs some creativity with blending (right heightmaps for 1st and 2nd layer) or apply moss using detail. It doesn't provide way to control diffuse scattering (fuzz) separately though.

    The error shows up only when you use pointlight shadows on transparent objects. Only in newer Unity and old UBER. Reimport newest UBER. Reimport 2 UBER subpackages (01_... then 02_...). The problem will be gone.

    Tom
     
  18. okba28mca

    okba28mca

    Joined:
    Aug 22, 2010
    Posts:
    85
    [
    The error shows up only when you use pointlight shadows on transparent objects. Only in newer Unity and old UBER. Reimport newest UBER. Reimport 2 UBER subpackages (01_... then 02_...). The problem will be gone.

    Tom[/QUOTE]

    Hi Tom!
    Actually the error was gone by deleting VRWorks from my project .
    I wasn't using any point lights in my scenes .
    Okba.
     
  19. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    87
    Hi Tom!
    And all other Uber users who will appreciate this.
    I am using some prefabs for the models and textures.
    Uber as the shader, and some post processing effects.
    Thank you! Continuing to appreciate Uber!
     
    Thoronnim_Crystalia and tomaszek like this.
  20. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    87


    Here is a tweaked version with the the tonemapper, motion blur and anti aliasing from the post processing stack. (With Uber as the shaders)
     
    Rowlan and hippocoder like this.
  21. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    719
    Any optimization for ios ?
     
  22. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    87
    Thank you for the kind words.
    However this isn't a game it's only an exercise for me in shaders and post processing. Eventually I will have a game out though and I am planning on mobile versions.
    However what your seeing is only for honing my skills.
    I wanted to give Uber credit as it is the shader that I am using.
     
    3d_Artist1987 likes this.
  23. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    150
    When moving the game I'm working on to Unity 2017.3 for HTC Vive and Oculus Rift I am getting errors in the UBER shader. When I try to build the game it fails to build and gives me these errors. I'm using UBER shader 1.2e and I had DirectX 11 as the only graphics API. (I plan to add DirectX 12 in the next version)

    In the game I have one scene using exponential fog and one using exponential squared fog. I have copies of the _UBERShader_Metallic_2Sided and _UBERShader_Specular_Refraction shaders that are pointing to a copy of UBER_ForwardFogType that has been set to exponential fog instead of exponential squared.

    Shader error in 'UBER - Specular Setup/Refraction/Core': 'length': no matching 1 parameter intrinsic function; Possible intrinsic functions are: length(floatM|halfM|min10floatM|min16floatM) at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)



    Compiling Vertex program with SHADOWS_CUBE _WETNESS_NONE

    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



    ----------



    Shader error in 'UBER - Specular Setup/Refraction/Core': invalid subscript 'vec' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)



    Compiling Vertex program with SHADOWS_CUBE _WETNESS_NONE

    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



    ----------



    Shader error in 'UBER - Metallic Setup/2 Sided/ Core': 'length': no matching 1 parameter intrinsic function; Possible intrinsic functions are: length(floatM|halfM|min10floatM|min16floatM) at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)



    Compiling Vertex program with SHADOWS_CUBE _ALPHATEST_ON _WETNESS_NONE

    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



    ----------



    Shader error in 'UBER - Metallic Setup/2 Sided/ Core': invalid subscript 'vec' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)



    Compiling Vertex program with SHADOWS_CUBE _ALPHATEST_ON _WETNESS_NONE

    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



    ----------



    Shader error in 'UBER - Metallic Setup/2 Sided/ Core_expFog': 'length': no matching 1 parameter intrinsic function; Possible intrinsic functions are: length(floatM|halfM|min10floatM|min16floatM) at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)



    Compiling Vertex program with SHADOWS_CUBE INSTANCING_ON _ALPHATEST_ON

    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



    ----------



    Shader error in 'UBER - Metallic Setup/2 Sided/ Core_expFog': invalid subscript 'vec' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)



    Compiling Vertex program with SHADOWS_CUBE INSTANCING_ON _ALPHATEST_ON

    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
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Reimport newest UBER that has fix for this. As you're at farther developement stage you coulod not overwrite all files but only core .cginc ones. (fog type doesn't apply).

    Tom
     
  25. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    150
    Does that mean that I won't need to have separate shaders for the two fog types in the new version?
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    It does mean you should be able to compile shaders w/o errors.

    Tom
     
    265lutab likes this.
  27. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    719
    Hi,
    In arkit uber shaders does not fully react with ARAmbient light.
    (Reflection value not change according to ARAmbient light)
     
  28. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    120
    Hi there, I have a question. Currently I'm on a very small indie team of 3 people and we are using Unity Collaborate. I'm thinking of buying and using the Uber shader but will that break our collab? Do I need one copy of it or do I need to buy 3 ? Thanks in advance.
     
  29. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Hi @tomaszek, Do you plan on making uber supprt instancing indirect in the future? Is it something you have looked at?
     
  30. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    719
    Hi,
    How to uber shader optimize for ios?
     
  31. JebAI

    JebAI

    Joined:
    Sep 7, 2016
    Posts:
    9
    Hi there,

    I just bought Uber due to the reviews recommendation, but don't know what am doing wrong. I set up the scene as should be and the project setting and yet I do not get the desired result especially depth. Any idea or suggestion what to do make this to work. thanks
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    UBER appears in AssetStore as per set lincese. So - if you all work with shaders/materials - then yes I'd say. But if you're the guy who setup materials, the other is for example programmer I guess it's not necessary to buy more copies. For example in team of 30 people where only 2-3 persons are responsible of environment setup it's not necessary to buy 30 licenses I'd say. If you share the project in collab UBEr comes as one of assets that need to be installed (UBER folder) for all users. It shouldn't break anything.

    Not sure what you mean "indirect" - using DrawMeshInstancedIndirect API call? UBER is already enabled for instancing (or you need to enable it by uncommenting #pragma multi_compile_instancing everywhere in selecte UBER shader). Enable instancing button is available at the bottom of UBER inspector as it is in Unity Standard Shader.

    Meant to be GLES3 and up so it should work on such hardware. You can't expect wonders comparing to PC or consoles (like fast tessellation or POM).

    Most common is heightmap needs data on its alpha channel. It's often overlooked. If you use B&W texture you need to enable "transparency from grayscale" in texture importer - then you can use Alpha8 encoding (RGB channels are not used). Otherwise heightmap is treat as "white" and no parallax effects work.

    Tom
     
  33. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
  34. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    780
    Hi there, I've got two error logs when I try to build the game:
    Shader error in 'UBER - Specular Setup/ Core': invalid subscript 'xyw' at Assets/_SuperTrampers/Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(657) (on d3d9)
    With windows 10, DX11 unity plus.
    Nvidia GT730 graphic card.
    Any suggestions?
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    DX9 is obsolete platform in Unity. Unless you really really need to deliver your game for it (which would cover like %1 of all players) you should remove it from build (look at Unity player settings).

    Tom
     
  36. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    780
    Hi Tom,
    Thanks for the reply, but I don't know how to remove DX9 in unity :(
    Looked into player settings but only found a fullscreen mode related to DX9:
    upload_2018-3-27_16-27-2.png
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Look at "other settings" tab( unfold it). Uncheck "Auto graphics API for windows", you'll see Direct3D9 on the list - remove it.

    Tom
     
  38. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    780
    Ah, it hides here!
    Thank you very much
     
  39. Gravitymama

    Gravitymama

    Joined:
    Mar 31, 2018
    Posts:
    2
    Hi,do you know what is _LightPositionRange.w for directional light?
     
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Not sure - you could check it in Unity includes. you can download Unity shader sources and find "_LightPositionRange.w" usage there. That's a hint I can give quick for now.

    Tom
     
  41. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    719
    Hey,
    Can uber support lightweight pipeline?
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    UBER is like Unity Standard shader - eighter forward or deferred rendering pipelines are available.

    Tom
     
  43. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    719
    Thanks for the reply.

    Unity modified Standard shader & provide with lightweight pipeline template.
     
  44. Go2ready

    Go2ready

    Joined:
    May 8, 2015
    Posts:
    29
    Hello Tom, I am a bit noob in the shader but I got you asset cause it looks amazing. Do you have a tutorial or someway to create cloth(t shirt) like material?
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Basically you would use it like Unity Standard shader. What's needed is set of correct PBR textures. You might google for such. Then add a little bit of diffuse scattering and tweak translucency if you need it. UBER itself doesn't offer anything special for t-shirts specifically ;).

    Tom
     
  46. Ash4DVW

    Ash4DVW

    Joined:
    Jul 6, 2017
    Posts:
    4
    Hi Tom,

    Not sure if this has been answered before or if this is even an UBER specific question. I am trying to create a material in runtime and assign the Uber Refractive Core shader for glass effect. But the parameters don't get applied until I open the inspector for that object and change a value (say the refraction float) and then the material updates itself to look the way it needs to look.

    What could I be doing wrong and how can I get the shader to apply itself or refresh the material through the scripts.

    Thanks
    Ash.
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Selecting material in inspector means that its script is called to setup not only material properties, but also some other stuff like keywords and rendering queue (it's not hardcoded because shader can act like opaque, transparent, etc.). Tak a look at Editor folder in UBEr inspatallation - there is inspector script used for UBER that makes things "happen".

    Tom
     
  48. Ash4DVW

    Ash4DVW

    Joined:
    Jul 6, 2017
    Posts:
    4
    Thanks for pointing me the right direction Tom. I got it working now. For anyone else that might chance upon this post, I ended up copying out the following functions from the editor inspector script.

    SetupMaterialWithBlendMode
    SetupMaterialWithShadowCullMode
    SetMaterialKeywords

    And a few associated enums and patched up the function calls to suit my needs.
     
  49. wkidwell

    wkidwell

    Joined:
    Jan 24, 2018
    Posts:
    11
    The Uber Shader looks awesome! Is the shader compatible with Unity 2017.30f3 or are earlier versions of Unity recommended? Thanks for any info on this.
     
  50. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    222
    Unity 5.6.0f1
    UBER 1.2g (U2017.1f3 release, U2018.1b6 checked)

    Unable to to use UBER in WEBGL..maybe it's not meant to be..any ideas? Wrong uber version?=Does not offer any other for download.

    Error:
    unrecognized identifier 'UNITY_POSITION'
    Compiling Vertex program with DIRECTIONAL _WETNESS_NONE
    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_COLORSPACE_GAMMA
     
unityunity