Search Unity

► Advanced Dissolve ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Feb 13, 2018.

  1. mrmcduck

    mrmcduck

    Joined:
    Nov 26, 2015
    Posts:
    26
    Thank you for the detailed answer. I replaced my file with your attached file, but sadly it didn't change anything - or at least the time increase is not noticeable. Thank you non the less!
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Just released update 2019.3
    LWRP shader will not be released as separate package and are included by default.



    VacuumShaders - Facebook Twitter YouTube
     
  3. NocSchecter

    NocSchecter

    Joined:
    Aug 19, 2015
    Posts:
    33
    Hi Arkhivrag,

    I have a problem when trying to add the standard shader to the compiled to be able to directly add the shader to a model in real time since when doing the compilation it takes days without creating any executable and it even freezes my pc. Do you know what can cause it?

    Note: if I add a simple shader to the compilation I create the executable and everything works perfectly except when I use the standard shader to make the cut
     
    Last edited: May 7, 2019
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Advanced Dissolve contains multiple shader keywords to achieve various effects:
    upload_2019-5-7_21-4-11.png

    By default Unity includes into a build only that keywords that are currently in use by material in editor.
    In your case it seems Unity just includes all of them and that increase build time. Do not know why it happens.
    Try create shader variants collection.

    Note: In run-time applications make sure required effects keyword is included into the build otherwise changes will not have effect.



    VacuumShaders - Facebook Twitter YouTube
     
  5. NocSchecter

    NocSchecter

    Joined:
    Aug 19, 2015
    Posts:
    33
    try to do what you said to the above partner, remove subshavers, remove some that is not required and use my cpu step from 100% to 20% but the use of ramse kept in 4 GB and the executable never creates. I will try to do what shaders variants collection


    Edit:

    At the moment of creating the shader, variant collection creates more than 330000 variants, which takes a long time to prepare the compiler of the shader and the use of my cpu and memory are high

     
    Last edited: May 7, 2019
  6. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    So in a previous post, I mentioned that I had altered some of the Advanced Dissolve shader code to allow me to add a separate alpha mask texture to fade out some geometry for floor planes in an AR project.

    This worked great for Forward rendering, but now I'd like to see if something else I added to the project will work better in Deferred rendering path. I tried making a similar modification in the fragDeferred function in UnityStandardCore.cginc, but it doesn't work as expected. I don't really understand the deferred rending path that well, so perhaps you could help advise on what I could change so that my alpha mask fades out the plane geometry the way it is doing in the Forward rendering path.

    Here is what I tired adding to the fragDeferred function:
    Code (CSharp):
    1. #ifdef AARON_HACK
    2.         float4 alpahMaskVal = tex2D( _AlphaMask, i.tex.zw );
    3.         alpha *= alpahMaskVal.r;
    4. #endif
    I tried doing this before AND after the DoDissolveClip(alpha); line, but it doesn't help either way.

    Thanks for your help!
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    May be I can add it as feature?
    Reading textures values not only from Alpha as it is now, but just give users choice?
    upload_2019-5-9_12-48-5.png



    VacuumShaders - Facebook Twitter YouTube
     
  8. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    That would be a great feature, but if you have a hack-y solution for me to try out deferred rendering, it'd be great. Only have a couple more days to make any changes for this particular project...
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Already updated. Download new version 2019.4



    VacuumShaders - Facebook Twitter YouTube
     
  10. vanacallegari

    vanacallegari

    Joined:
    Feb 26, 2018
    Posts:
    1
    Hi I'm really interested in getting this asset I have a question tho, is it possible to use it in ARCore and build it on a android?
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    It can be used. But not tested myself with ARCore.
    Note, it is Alpha Cutout shader.



    VacuumShaders - Facebook Twitter YouTube
     
  12. Elin42

    Elin42

    Joined:
    Oct 21, 2014
    Posts:
    22
    Can I use different masks in one scene?
    I want to fade in some object with a local XYZ Axis and others with a cone. But every time my game is running my XYZ Axis materials gets also set to cone.
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Multiple mask types can not be mixed :(



    VacuumShaders - Facebook Twitter YouTube
     
  14. Elin42

    Elin42

    Joined:
    Oct 21, 2014
    Posts:
    22
    Is there a way to set the mask type at run time?
    In my case i would never see a XYZ Axis mask and the cone mask at the same time.
    I don't want to mix the different masks. I just want to use different types on different objects
     
    Last edited: May 20, 2019
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    You can enable and disable any keywords in run-time.
    Just make sure all required keywords are included in build.

    Code (CSharp):
    1.             //Mask///////////////////////////////////////////////////////////////////////////
    2.             mat.DisableKeyword("_DISSOLVEMASK_XYZ_AXIS");
    3.             mat.DisableKeyword("_DISSOLVEMASK_PLANE");
    4.             mat.DisableKeyword("_DISSOLVEMASK_SPHERE");
    5.             mat.DisableKeyword("_DISSOLVEMASK_BOX");
    6.             mat.DisableKeyword("_DISSOLVEMASK_CYLINDER");
    7.             mat.DisableKeyword("_DISSOLVEMASK_CONE");
    8.    
    9.             mat.EnableKeyword("_DISSOLVEMASK_XYZ_AXIS");    //<- enable required keyword
    10.    
    11.    
    12.    
    13.             //Mask count/////////////////////////////////////////////////////////////////////
    14.             mat.DisableKeyword("_DISSOLVEMASKCOUNT_TWO");
    15.             mat.DisableKeyword("_DISSOLVEMASKCOUNT_THREE");
    16.             mat.DisableKeyword("_DISSOLVEMASKCOUNT_FOUR");
    17.    
    18.    
    19.    
    20.             //Alpha Cutout Source////////////////////////////////////////////////////////////
    21.             mat.DisableKeyword("_DISSOLVEALPHASOURCE_CUSTOM_MAP");
    22.             mat.DisableKeyword("_DISSOLVEALPHASOURCE_TWO_CUSTOM_MAPS");
    23.             mat.DisableKeyword("_DISSOLVEALPHASOURCE_THREE_CUSTOM_MAPS");
    24.    
    25.             mat.EnableKeyword("_DISSOLVEALPHASOURCE_TWO_CUSTOM_MAPS");  //<- enable required keyword
    26.    
    27.    
    28.    
    29.             //Alpha Cutout Source texture mapping type///////////////////////////////////////
    30.             mat.DisableKeyword("_DISSOLVEMAPPINGTYPE_TRIPLANAR");
    31.             mat.DisableKeyword("_DISSOLVEMAPPINGTYPE_SCREEN_SPACE");
    32.    
    33.    
    34.    
    35.             //Edge Texture Source////////////////////////////////////////////////////////////
    36.             mat.DisableKeyword("_DISSOLVEEDGETEXTURESOURCE_GRADIENT");
    37.             mat.DisableKeyword("_DISSOLVEEDGETEXTURESOURCE_MAIN_MAP");
    38.             mat.DisableKeyword("_DISSOLVEEDGETEXTURESOURCE_CUSTOM");
    39.    
    40.    
    41.    
    42.             //Global Control/////////////////////////////////////////////////////////////////
    43.             mat.DisableKeyword("_DISSOLVEGLOBALCONTROL_MASK_ONLY");
    44.             mat.DisableKeyword("_DISSOLVEGLOBALCONTROL_MASK_AND_EDGE");
    45.             mat.DisableKeyword("_DISSOLVEGLOBALCONTROL_ALL");
    46.  


    VacuumShaders - Facebook Twitter YouTube
     
  16. hkeychiu

    hkeychiu

    Joined:
    May 16, 2019
    Posts:
    1
    is it possible integrate this on the unitychan shader?
     
  17. Elin42

    Elin42

    Joined:
    Oct 21, 2014
    Posts:
    22
    Finally got some time to try switching mask modes.
    I'm using Bolt visual scripting for that. But I can't get it to work.
    Can you send me a little example how its done in c#?
    upload_2019-5-27_15-57-3.png
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Do not know how Bolt works, but here is c# example:

    Just for safety reasons, first disable all keywords and than enable only required one.
    Code (CSharp):
    1.  
    2. //Mask///////////////////////////////////////////////////////////////////////////
    3.             mat.DisableKeyword("_DISSOLVEMASK_XYZ_AXIS");
    4.             mat.DisableKeyword("_DISSOLVEMASK_PLANE");
    5.             mat.DisableKeyword("_DISSOLVEMASK_SPHERE");
    6.             mat.DisableKeyword("_DISSOLVEMASK_BOX");
    7.             mat.DisableKeyword("_DISSOLVEMASK_CYLINDER");
    8.             mat.DisableKeyword("_DISSOLVEMASK_CONE");
    9.  
    10.             mat.EnableKeyword("_DISSOLVEMASK_XYZ_AXIS");    //<- enable required keyword
    11.  
    12.  
    13.  
    14. //Mask count/////////////////////////////////////////////////////////////////////
    15.             mat.DisableKeyword("_DISSOLVEMASKCOUNT_TWO");
    16.             mat.DisableKeyword("_DISSOLVEMASKCOUNT_THREE");
    17.             mat.DisableKeyword("_DISSOLVEMASKCOUNT_FOUR");
    18.  
    19.  
    20.  
    21. //Alpha Cutout Source////////////////////////////////////////////////////////////
    22.             mat.DisableKeyword("_DISSOLVEALPHASOURCE_CUSTOM_MAP");
    23.             mat.DisableKeyword("_DISSOLVEALPHASOURCE_TWO_CUSTOM_MAPS");
    24.             mat.DisableKeyword("_DISSOLVEALPHASOURCE_THREE_CUSTOM_MAPS");
    25.  
    26.             mat.EnableKeyword("_DISSOLVEALPHASOURCE_TWO_CUSTOM_MAPS");  //<- enable required keyword
    27.  
    28.  
    29.  
    30. //Alpha Cutout Source texture mapping type///////////////////////////////////////
    31.             mat.DisableKeyword("_DISSOLVEMAPPINGTYPE_TRIPLANAR");
    32.             mat.DisableKeyword("_DISSOLVEMAPPINGTYPE_SCREEN_SPACE");
    33.  
    34.  
    35.  
    36. //Edge Texture Source////////////////////////////////////////////////////////////
    37.             mat.DisableKeyword("_DISSOLVEEDGETEXTURESOURCE_GRADIENT");
    38.             mat.DisableKeyword("_DISSOLVEEDGETEXTURESOURCE_MAIN_MAP");
    39.             mat.DisableKeyword("_DISSOLVEEDGETEXTURESOURCE_CUSTOM");
    40.  
    41.  
    42.  
    43. //Global Control/////////////////////////////////////////////////////////////////
    44.             mat.DisableKeyword("_DISSOLVEGLOBALCONTROL_MASK_ONLY");
    45.             mat.DisableKeyword("_DISSOLVEGLOBALCONTROL_MASK_AND_EDGE");
    46.             mat.DisableKeyword("_DISSOLVEGLOBALCONTROL_ALL");
     
  19. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    hello,

    i have imported it into unity 2019.3.0a2 and i got this error message:

    Assets\VacuumShaders\Advanced Dissolve\Editor\CustomEditors\TextMesh Pro\TMP_SDFShaderGUI.cs(333,56): error CS0117: 'ShaderUtilities' does not contain a definition for 'ID_Sharpness'
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    I can not support alpha and beta versions, only official releases.
    For temporary solution you can just delete that script file, it is Editor file for TextMesh Pro shader.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: May 30, 2019
  21. kyllian_unity

    kyllian_unity

    Joined:
    Sep 21, 2018
    Posts:
    3
    Hi! I bought your asset yesterday and I have a question. In the trailer, you are showing that the shader can illuminate the surrounding area, but haven't been able to this so far. Is there a way to do this or am I just missing something? So far I love it!
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    It is emissive dissolve color, effecting Unity's Global Illumination system.
    Package includes example scene 1. Show room (Global Illumination) for demonstration.
    Note, GI system works only in Standard render pipeline. Lightweight does not support it.

    To make object interact with GI:
    Mark it as static, bake GI from lightmap settings and use UpdateWorldPos script for dissolve objects to emit color.



    VacuumShaders - Facebook Twitter YouTube
     
  23. plmx

    plmx

    Joined:
    Sep 10, 2015
    Posts:
    308
    Hi,

    working with the Dissolve shaders right now (Standard Pipeline), and I've got a few questions.
    1. When I switch the shader from "Standard" to "Advanced Dissolve/Standard/Metallic", the backfaces of my models (which should be invisible) suddenly appear. There seems to be no option for this in the shader settings. Someone in this thread mentioned a "Cull Off" option, but it's not there. The documentation mentions a "Render Face" option, which is not there either.
    2. I can't seem to find the demo scene with the house and the 'helicopters' which is your main promo video. Where is it located in the asset? Or do I have to download it somewhere else?
    3. Is there a way to turn off all dissolve-related features in a) one particular material b) globally? The reason I ask is that I am "dissolving" many objects into view at the start of the scene; however, afterwards dissolve is no longer required until the end of the scene. For performance reasons it seems prudent to turn the effect off during that time.
    4. There seems to be an "injection" option for introducing the shader code to ShaderGraph shaders, but this is (obviously) only present in the LWRP version. Could something similar be done for general surface shaders (i.e. code) and/or Amplify shaders? A step-by-step instruction on how to include the dissolve shader code into another shader would be immensely helpful for this as well.
    Thanks!

    Philip
     
    Last edited: Jun 14, 2019
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    1) Download attached files and copy them to VacuumShaders\Advanced Dissolve\Editor\CustomEditors\Standard folder.
    2) Import Demo package from Advanced Dissolve\Example And Demo Scenes\Demo folder.
    3) You have to do it from a custom script and set material variables to the desired values. For performance reasons it is better to replace shader to non-dissolve equivalent, for example from Dissolve/Standard to Unity/Standard.
    4) "Injection" is possible only for ShaderGraph generated shaders as I know file structure and can modify it for my needs. For custom shaders it is not possible.



    VacuumShaders - Facebook Twitter YouTube
     

    Attached Files:

    plmx likes this.
  25. plmx

    plmx

    Joined:
    Sep 10, 2015
    Posts:
    308
    Hi,

    first of all, I appreciate the quick response!

    Thanks, that worked. So was this an oversight then? I.e., your next release will include that setting without patching? That would be great.

    Can't believe I missed that. Sorry. Thanks. Works.

    Okay cool, that sounds reasonable. I will create a custom frame-staggered switcher then. With "set material variables to the desired values" you mean copying all meaningful values to the equivalent non-dissolve shader material, right? (such as colors, tiling values etc.)

    I see. And I understand the problem.

    The reason I was asking is that without an "injection" feature, it is rather difficult to dissolve materials with a shader not directly supported by you, which in turn restricts the use of your package.

    It's just a thought/suggestion, but I was thinking there might be a way to "package" the dissolve functionality into a sort of .cginc file and have some instructions for people to (manually!) adapt custom shaders with specific functions calls at specific points in the shader code to integrate dissolve functionality. But as I said, just a thought. Probably a nightmare to support. :-(

    Again, I appreciate your answers!

    Philip
     
    Last edited: Jun 14, 2019
  26. StutterFoxStudios

    StutterFoxStudios

    Joined:
    Mar 5, 2014
    Posts:
    40
    Hi,

    Loving the asset but i'm struggling to animate the mask offset value via a script. Any advice here would be greatly appreciated.

    Cheers!
    -Todd

    upload_2019-6-16_23-46-11.png
     
  27. StutterFoxStudios

    StutterFoxStudios

    Joined:
    Mar 5, 2014
    Posts:
    40
    Never mind the issue with animating the mask offset. I got it working. One side query though is i can't seem to find a standard (roughness) shader to use? Only Specular and Metallic. I did read earlier on that there was a GUI bug but it looks as though it was fixed?

    Cheers,
    -Todd
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Standard roughness shader is available only with Unity 2018.2 and Unity 2019.1 versions of the asset.



    VacuumShaders - Facebook Twitter YouTube
     
  29. StutterFoxStudios

    StutterFoxStudios

    Joined:
    Mar 5, 2014
    Posts:
    40
    Ah.... no worries. Appreciate the quick response!

    Cheers,
    -Todd
     
  30. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    A few questions:

    1. Does the mask allow multiple gameobjects to be hidden at the same time? What I mean is if I have a sphere and expand it in the middle of 100 gameobjects, will the dissolve allow a uniform sphere of dissolve to be created? I'm just not sure if the video you show is 1 mesh or many.

    2. Is the does the shader support the Standard Shader metallic workflow?
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    1. Yes, one mask object can effect multiple objects.
    2. Yes.



    VacuumShaders - Facebook Twitter YouTube
     
  32. motioncapture

    motioncapture

    Joined:
    Jul 23, 2018
    Posts:
    2
    Hello,

    How Can I LWRP Package file?

    If you download the package for me, it will be downloaded as below.


    And my version is 2018.2.14f and LWRP 3.0.


    Please guide me for use in LWRP.

    Thanks.
     

    Attached Files:

    • how1.PNG
      how1.PNG
      File size:
      276.1 KB
      Views:
      579
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    LWRP is supported only in Unity 2019.1 and later versions.



    VacuumShaders - Facebook Twitter YouTube
     
  34. Amin-

    Amin-

    Joined:
    Sep 27, 2017
    Posts:
    26
    Hi @Arkhivrag ...
    We have thirty unique materials in our outdoor scene for example,
    all of them must be added in the "material" section one by one ?!
    Snap56.jpg
    Is there any faster solution?
    Thanks.
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Script from your screenshot updates Plane mask parameters for materials in that array.

    It is possible to update mask parameters globally for all dissolve materials and it does not need adding them into array:
    1) Inside material editor select what parameters you need to control globally.
    2) In mask controller script check Update Global option.
    If it is not the option for you, then you have to add required materials into array.



    VacuumShaders - Facebook Twitter YouTube
     
  36. ThatsComplicated

    ThatsComplicated

    Joined:
    Jun 3, 2019
    Posts:
    8
    Hi @Arkhivrag
    We are using your Standard/Roughness shader in our mobile game with assetbundles.
    The problem is that we need to add the shader to alwaysincludedshaders because of using assetbundles and it is impossible to build the project. Building bundles crash at first couple times and when they are finally builded and we start building the project it just freezes on compiling shader variants. We already changed fallback in shader to standard instead of vertexlit because we dont need it and we have shader variant collection where only roughness from your shaders with only directional variants.
    Maybe the problem is laying in the assetbundles itself that building them with shaders inside is bugged or something.
    I've read too that when you add shader to alwaysincluded it changes refenerences of this shader in assetbundles.
    But why its impossible to compile it all.. is it because of so many variants? or multiple graphics api platforms?
    I've created new empty project and even there i cant build android with your roughness shader in alwaysincludedshaders.
    Unity 2019.1.1

    best regards
     
    Last edited: Aug 2, 2019
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Included Standard/Roughness shader is exact copy of the original Unity's shader, but just with dissolve effect added.

    Problem may be in variants amount (they are 26).
    Code (CSharp):
    1. #pragma shader_feature _ _DISSOLVEGLOBALCONTROL_MASK_ONLY _DISSOLVEGLOBALCONTROL_MASK_AND_EDGE _DISSOLVEGLOBALCONTROL_ALL
    2.  
    3.  
    4. #pragma shader_feature _ _DISSOLVEMAPPINGTYPE_TRIPLANAR _DISSOLVEMAPPINGTYPE_SCREEN_SPACE
    5.  
    6.  
    7. #pragma shader_feature _ _DISSOLVEALPHASOURCE_CUSTOM_MAP _DISSOLVEALPHASOURCE_TWO_CUSTOM_MAPS _DISSOLVEALPHASOURCE_THREE_CUSTOM_MAPS
    8.  
    9.  
    10. #pragma shader_feature _ _DISSOLVEMASK_XYZ_AXIS _DISSOLVEMASK_PLANE _DISSOLVEMASK_SPHERE _DISSOLVEMASK_BOX _DISSOLVEMASK_CYLINDER _DISSOLVEMASK_CONE
    11.  
    12.  
    13. #pragma shader_feature _ _DISSOLVEEDGETEXTURESOURCE_GRADIENT _DISSOLVEEDGETEXTURESOURCE_MAIN_MAP _DISSOLVEEDGETEXTURESOURCE_CUSTOM
    14.  
    15.  
    16. #pragma shader_feature _ _DISSOLVEMASKCOUNT_TWO _DISSOLVEMASKCOUNT_THREE _DISSOLVEMASKCOUNT_FOUR[/FONT]

    Go through the .shader file and remove unwonted variants (defined in several place in the file).
    • You can completely delete entire row, for example if not using Global Controller for dissolve effect, remove all lines:
    Code (CSharp):
    1. #pragma shader_feature _ _DISSOLVEGLOBALCONTROL_MASK_ONLY _DISSOLVEGLOBALCONTROL_MASK_AND_EDGE _DISSOLVEGLOBALCONTROL_ALL

    • Or leave only required shader variant.
    For example, if using Sphere dynamic mask, delete all other variants, delete lines:
    Code (CSharp):
    1. #pragma shader_feature _ _DISSOLVEMASK_XYZ_AXIS _DISSOLVEMASK_PLANE _DISSOLVEMASK_SPHERE _DISSOLVEMASK_BOX _DISSOLVEMASK_CYLINDER _DISSOLVEMASK_CONE
    And replace it with:
    Code (CSharp):
    1. #define _DISSOLVEMASK_SPHERE
    Such way you can completely remove all unwanted shader variants (keywords).
    But compiler must handle all this automatically, without user need to change anything inside shader file, that's the idea of using shader_feature.



    VacuumShaders - Facebook Twitter YouTube
     
  38. Alexey1B

    Alexey1B

    Joined:
    May 15, 2017
    Posts:
    26
    Hello, just start play with dissolve, as i understand i have to set dissolve shader for each object, what i want to dissolve using mask. Is exists way to "invert" control, somthing like set special shader for object which used as mask and leave standart shaders for objects?
    And can i fill with color/texture dissolved region?
     
    Last edited: Aug 4, 2019
  39. ThatsComplicated

    ThatsComplicated

    Joined:
    Jun 3, 2019
    Posts:
    8
    @Arkhivrag
    After your solution it stopped crashing and started to compile over 4mln variants of roughness, is it normal?

    https://imgur.com/a/3hlftvA

    [Edit]
    After removing OpenGLES2, commenting several mult_compile lines and dissolve mask 2 3 4 we managed to get it down to 20k. Something is definitely wrong. Even on empty project after changes it compiles almost 20k variants

    [Edit2]
    It seems from 2019.1.1f to 2019.3.0a11, always included shaders function is not working correctly. Over 5milion variants to compile of 1 shader.
    Every possible variant is compiled. Shader_feature and multi_compile makes variants count increase expotentially.

    Is it possible to get your shader working on android when loaded from resources? It seems to work except for dissolve.

    [Edit3]
    Ok, its the always included shaders feature in unity bugged.
    For more info: https://forum.unity.com/threads/compiling-shader-variants-taking-ages.527724/page-4

    Thanks @Arkhivrag, awesome shader!

     
    Last edited: Aug 6, 2019
  40. StutterFoxStudios

    StutterFoxStudios

    Joined:
    Mar 5, 2014
    Posts:
    40
    Hi @Arkhivrag,

    I managed to update my project to 2018.4 after my previous post and your asset is working really well. i do have one more question regarding how I might achieve a desired effect. I'm currently using the asset for construction of objects within my game. As my objects are made up of multiple material sets as they are modular I decided to use the box mask controller to slowly reveal the unit or building. This works great and looks great but the problem is for example i start building the first unit and half way through i start building a second unit in another location. This then causes the first unit to stop revealing due the the 2nd units box mask taking over. Is there a way to use the box mask and only affect the local object or will it always effect all objects globally as it seems the most recent instantiated object controls the dissolve location of the box.

    I guess a more simply question is.... is it possible to have the same multiple objects with the same material to each have their own box mask and to start dissolving at different time frames without only the most recently generated object being revealed?

    Cheers,
    -Todd
     
  41. ThatsComplicated

    ThatsComplicated

    Joined:
    Jun 3, 2019
    Posts:
    8
    Yes, it is. Look for example for Controller_Mask_Box script. Just dont use options with "global" in name and u cant use the same instance of material on your objects.
     
  42. StutterFoxStudios

    StutterFoxStudios

    Joined:
    Mar 5, 2014
    Posts:
    40
    Hi @unity_2B8npYRjLbB2kg ,

    I got it to work. Thanks for your suggestion. I wasn't really wanting to have multiple instances of the same materials. Purely from a setup time frame but it works so I got over it quickly :).

    Cheers,
    -Todd
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Dissolved part does not render and thus there is no way to have two materials there on one mesh, for mask and unmasked parts.


    Mask parameters used by shader (and updated from script) are common parameters like: color, diffuse map, etc.
    You can not have one material with two different parameters, yes? Mask works the same way. If two you need two completely different parameters within the same material, there is only one solution: Use two materials, each one with its own parameters.
    You can update mask parameters for individual material using included Mask_Controller scripts, you can use as much script as you need.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Aug 6, 2019
  44. StutterFoxStudios

    StutterFoxStudios

    Joined:
    Mar 5, 2014
    Posts:
    40
    Hi @Arkhivrag,

    Thanks for your reply. Thank you for your explanation. It makes perfect sense. I've created a number of material sets that can be used if i need to reveal multiple objects of the same type at once.

    Cheers,

    -Todd
     
  45. Alexey1B

    Alexey1B

    Joined:
    May 15, 2017
    Posts:
    26
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Last edited: Aug 8, 2019
  47. Alexey1B

    Alexey1B

    Joined:
    May 15, 2017
    Posts:
    26
    True, posted just to show an effect
     
  48. Ilkhani

    Ilkhani

    Joined:
    Jan 20, 2015
    Posts:
    2
    @Arkhivrag does it support HDRPipeline and if not, any plans on supporting it in the future?
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    HDRP will not be supported until it is released as "production ready".



    VacuumShaders - Facebook Twitter YouTube
     
  50. Ilkhani

    Ilkhani

    Joined:
    Jan 20, 2015
    Posts:
    2
    @Arkhivrag That is perfectly understandable and I will definitely get this once that happens, keep up the good work and thanks for the reply.