Search Unity

► Advanced Dissolve ◄

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

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Follow ReadMe file. Mask Controller is needed only if using dynamic mask objects.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  2. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    Not anymore! Would love to know if you have some kind of estimated timeline. I've got a project just starting up that I'd love to be able to rely on it for! :D
     
    Last edited: Jan 28, 2020
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    The highest priority for update has Curved World asset, then then comes Advanced Dissolve.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
    daviddebeule likes this.
  4. daviddebeule

    daviddebeule

    Joined:
    Oct 2, 2018
    Posts:
    16
    And how is the upgrade to URP for Curved World going? Any chance you will be able to start soon on Advanced Dissolve?
     
  5. SkareMedia

    SkareMedia

    Joined:
    Jan 8, 2019
    Posts:
    6
    Heya, I have a problem where the mask count keeps defaulting back to one after playing my game, and the effect is reversed/inverted in game. Any diea what the issue might be?
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Mask type is a Shader Keyword. Inside editor keyword is set through a material editor. In run-time using Unity API Material.EnableKeyword and Material.DisableKeyword methods.
    If material keyword is reset in build 1) make sure that keyword is included in the build and 2) it is enabled/disable only by one script (to avoid confusion).

    Check included mask controller scripts and how they enable/disable various keywords in example scenes.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  7. borkbork

    borkbork

    Joined:
    Jul 5, 2014
    Posts:
    64
    HDRP is production ready, just wanted to check-in that you're planning to build this on that pipeline?
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Currently shaders with with standard render pipeline. Coming update will include support for URP/HDRP and integration with shader graphs: Unity and Amplify.

    Currently working on similar update for Curved World, next comes Advanced Dissolve.




    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  9. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    Any way to reduce the global keyword count without breaking this? Very hard to use this with other shader assets
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Already updated. Download v2019.6



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  11. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    @Arkhivrag

    hi,
    does LWRP version working with Android glES 3.x?
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    If Unity's LWRP works with Android glES 3.x, then Advanced Dissolve also will work.



    Amazing Assets - YouTube Facebook Twitter
     
  13. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    Hello.

    When I import the assets in my project it does not matter what package do I use, the sample scenes appear as if the shaders were not working, my project is done with the Universal Render Pipeline and in Unity 2019.3.1f1, the latest stable release.

    Some ideas?

    Thanks!

    EDIT: I tried also creating the sphere example, and the shader appears pink, as if it were not working :S
     
    Last edited: Mar 4, 2020
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Advanced Dissolve supports only Lightweight and Standard render pipelines.
    URP and HDRP support is in development.



    Amazing Assets - YouTube Facebook Twitter
     
  15. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    Argh! thanks.

    Is there a time frame for the release of the URP support?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Currently working on the similar update for Curved World, next comes Advanced Dissolve.
    Can not say exact release date.



    Amazing Assets - YouTube Facebook Twitter
     
  17. AugmentedSpaceAgency

    AugmentedSpaceAgency

    Joined:
    May 11, 2017
    Posts:
    12
    For URP support you can simply use the LWRP to URP upgrade guide for custom shaders. It's a matter of a few minutes of "Find & Replace" to update Lightweight RP references to Universal RP, URP being just an updated LWRP with a different name.
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    If it is a "matter of a few minutes", I'll check.



    Amazing Assets - YouTube Facebook Twitter
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Download new version (v2019.7) supporting Universal render pipeline.
    This is quick update and does not include all planed upgrades like HDRP, shader graph integration and so on. All this will be added in v2020.1 update.



    Amazing Assets - YouTube Facebook Twitter
     
  20. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    OK, I'm finding a problem.

    I'm using a sphere as mask, when I'm not in runtime I can move the sphere and the mask works, I can create an animation clip and it works, but at runtime if I programatically move the mask or if I use an animation clip the shader does not update, nothing happens.
    I've been all the evening trying to figure this out with no outcome at all, I'm a bit desperate.

    Some ideas on what may be happening?

    I'm using the latest version of the shader, in the Standard mode, in Unity 2019.3.1f1
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Runtime inside editor or in build?
    Example scenes use multiple animated mask objects, do those example scenes have the same problem?



    Amazing Assets - YouTube Facebook Twitter
     
  22. daviddebeule

    daviddebeule

    Joined:
    Oct 2, 2018
    Posts:
    16
    I have a question about URP and shader graph:

    I have the lastest version of Advanced Dissolve with URP support and a project using URP and a shader made with shader graph, following the guidelines from the readme doc (so with a _MainTex Texture2D parameter)
    I have copied the code of that shader to a new unlit shader and then I added the 'advanced dissolve' to that shader with the context menu option.

    The advanced dissolve features on that shader are not working.
    Am I doing something wrong is or a shader graph shader in URP with advanced dissolve not yet supported?
     
  23. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    I tested it, the example scene for the sphere mask and the cactus works, and I meant runtime in the editor, I have not tested a build, but the example scene works in runtime in the editor too, so I'm puzzled, no scripts errors, but the mask is not working :p
     
  24. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    @Juang3d I had the same problem but it started working after I played with Material settings a bit. Especially Cutout and Global sections
     
  25. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    Ok, I found the problem, everything was correctly configured (thanks @Srokaaa :) )

    The problem is that I have a script that touches the emission color of the material, and it seems that's not allowed for some reason.
    Is there a way for me to play with the material properties at runtime but allow the shader to work? I assume that it is because to work with the material Unity does an instance of that material, and probably that's not the instance in the control script :S

    Some ideas?

    Thanks!
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Confirm, shader integration does not work with the latest URP.
    Working on fix.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 18, 2020
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Fixed. Download new version v2019.8
    Integration steps have been changed, check ReadMe file.



    Amazing Assets - YouTube Facebook Twitter
     
    daviddebeule likes this.
  28. daviddebeule

    daviddebeule

    Joined:
    Oct 2, 2018
    Posts:
    16
    I am now using version v2019.8 and I am able to add Advanced Dissolve features to my shadergraph shaders => Very nice! :)

    However, there is one part of my shadergraphs that seems to give problems when combined with advanced dissolve: Normal Maps.

    This is a simplified example that reproduces the problem:
    upload_2020-3-20_16-7-42.png

    When you add advanced dissolve features to this shader, you will get a compilation error:
    Shader error in 'Shader Graphs\shd_test (dissolve)': variable 'inputData' used without having been completely initialized at Dissolve/Shaders/URP/PBRForwardPass.hlsl(22) (on d3d11)

    When you remove the Normal input in the PBR master, it works fine.

    Is there a way to fix this?

    Thanks in advance!
    David
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Unity version?
    Universal RP version?

    Inside console window message is print as error or just warning?



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 20, 2020
  30. daviddebeule

    daviddebeule

    Joined:
    Oct 2, 2018
    Posts:
    16

    Unity: 2019.3.0f6
    URP: 7.1.8

    it is printed as an error, shader cannot be used afterwards upload_2020-3-20_17-15-39.png upload_2020-3-20_17-15-39.png
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
  32. daviddebeule

    daviddebeule

    Joined:
    Oct 2, 2018
    Posts:
    16
    that works, thanks!
     
  33. AlexRain

    AlexRain

    Joined:
    Nov 24, 2017
    Posts:
    1
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
  35. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    Hi Arkhivrag,

    I just bought your asset , and I'm currently wondering how would you add this dissolve effect to a custom shader? What part of the source would I need to look into?

    thanks!
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    You can integrate Advanced Dissolve only in shaders created by ShaderGraph (check ReadMe file page:16).

    As for custom hand written shaders, there is no such solution, unless you manually check included shaders and copy or required Advanced Dissolve shader code yourself into your shader.
    The easiest shader you can check is Unlit shader.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 27, 2020
    mk7gwc likes this.
  37. inod_clement

    inod_clement

    Joined:
    Nov 9, 2016
    Posts:
    17
    Hi Arkhivrag,

    I've a mistake with transparent material.
    I've a test scene for my problem, just two buttons for enable or disable Dissolve Shader

    Code (CSharp):
    1. public void EnableDissolveShader()
    2.     {
    3.         foreach (Renderer r in go.GetComponentsInChildren<Renderer>())
    4.         {
    5.             foreach (Material m in r.materials)
    6.             {
    7.                 m.shader = Shader.Find("VacuumShaders/Advanced Dissolve/Standard/Specular");
    8.             }
    9.         }
    10.     }
    11.     public void DisableDissolveShader()
    12.     {
    13.         foreach (Renderer r in go.GetComponentsInChildren<Renderer>())
    14.         {
    15.             foreach (Material m in r.materials)
    16.             {
    17.                 m.shader = Shader.Find("Diffuse");
    18.             }
    19.         }
    20.     }
    When i click to "Enable" my material is completely transparent with dissolve shader and when i click on the editor tab material it appear correctly...
    Watch video :


    Thank you. (You're plugin is very very good and simple !!!)
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    From video it is difficult to understand what may be a problem.
    Mostly it may be due to using incorrect shader keywords.

    You can try: Inside code use foreach (Material m in r.sharedMaterial) instead of foreach (Material m in r.materials).
    And make sure you are switching shaders between one group, in your case use "StandardSpecular" instead of "Diffuse".



    Amazing Assets - YouTube Facebook Twitter
     
    inod_clement likes this.
  39. inod_clement

    inod_clement

    Joined:
    Nov 9, 2016
    Posts:
    17
    No change with your suggestion... I use just the code above. The problem is resolved when i click on material editor and is just with transparent material
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Also make sure you have correct shader keywords enabled/disabled when swapping shader in runtime.

    Code (CSharp):
    1. public void EnableDissolveShader()
    2.     {
    3.         foreach (Renderer r in gameObject.GetComponentsInChildren<Renderer>())
    4.         {
    5.             foreach (Material m in r.sharedMaterials)
    6.             {
    7.                 m.shader = Shader.Find("VacuumShaders/Advanced Dissolve/Standard/Specular");
    8.  
    9.                 m.EnableKeyword("_ALPHAPREMULTIPLY_ON");
    10.             }
    11.         }
    12.     }
    In run-time you have to take care about all shader keywords. Just assigning different shader mostly will not have effect you desire.
    Inside editor material editor manages all keywors, in run-time you have to deal with it yourself.



    Amazing Assets - YouTube Facebook Twitter
     
    inod_clement likes this.
  41. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27

    thanks Arkhivrag

    I'll try it!
     
  42. Sir_patrickl

    Sir_patrickl

    Joined:
    Jun 24, 2013
    Posts:
    62
    Hi,

    This looks great and am thinking of buying but just have a couple questions.

    Is it possible to have a smooth alpha transition without the glowing effect? Also can I control the size of the transition?

    Thanks
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Dissolve edge size, color, emission and its transparency are controllable.



    Amazing Assets - YouTube Facebook Twitter
     
  44. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    187
    Hey, it looks absolutely fantastic! One question tho: does the asset contain example scenes or assets?
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Yes, example and demo scene is included.
    upload_2020-4-1_12-43-9.png



    Amazing Assets - YouTube Facebook Twitter
     
    slimshader likes this.
  46. inod_clement

    inod_clement

    Joined:
    Nov 9, 2016
    Posts:
    17
    Hi Arkhivrag !

    Thanks it's good ! Indeed i forgot to add keywords...
    For others if you need an example :

    Code (CSharp):
    1. foreach (Renderer r in go.GetComponentsInChildren<Renderer>())
    2.         {
    3.             foreach (Material m in r.materials)
    4.             {
    5.              m.shader = Shader.Find("VacuumShaders/Advanced Dissolve/Standard/Specular");
    6.                 if(m.color.a < 1.0f)
    7.                 {    
    8.                      m.SetOverrideTag("RenderType", "Transparent");
    9.                      m.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
    10.                      m.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
    11.                      m.SetInt("_ZWrite", 0);
    12.                      m.DisableKeyword("_ALPHATEST_ON");
    13.                      m.DisableKeyword("_ALPHABLEND_ON");
    14.                      m.EnableKeyword("_ALPHAPREMULTIPLY_ON");
    15.                      m.renderQueue = 3000;
    16.                      m.SetFloat("_Metallic", 0f);
    17.                      m.SetFloat("_Glossiness", 0f);
    18.                }
    19.             }
    20.         }
    Best regards.
     
  47. Polaaa

    Polaaa

    Joined:
    Sep 29, 2017
    Posts:
    18
    I got Shader GUI error on Unity2020.1b with URP 9.0



    Could not create a custom UI for the shader 'VacuumShaders/Advanced Dissolve/Universal Render Pipeline/Unlit'. The shader has the following: 'CustomEditor = UnityEditor.Rendering.Universal.ShaderGUI.AdvancedDisolve_UnlitShader'. Does the custom editor specified include its namespace? And does the class either derive from ShaderGUI or MaterialEditor?
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)


    and could you add Hybrid Instanced support?
    https://docs.unity3d.com/Packages/com.unity.rendering.hybrid@0.4/manual/index.html
     
    Srokaaa likes this.
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Alpha and Beta versions of Unity can not be supported. Waiting for official release.



    Amazing Assets - YouTube Facebook Twitter
     
  49. Deleted User

    Deleted User

    Guest

    Hi ! Superb asset; i like it very much !
    I'm now trying to use it and have the Dissolve parameter in a Particle System so i can fade alpha over time.
    But i can't see the parameter; is it even possible ? If it is, can you explain how ?

    Thank you !!
    (Sorry i don't speak Shaders).

    Capture d’écran 2020-04-15 à 17.02.34.png Capture d’écran 2020-04-15 à 17.02.42.png
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Open Advanced Dissolve tab inside material editor.

    upload_2020-4-16_12-58-50.png



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Apr 16, 2020