Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

► Advanced Dissolve ◄

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

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Purpose of those scripts are just updating materials with mask properties. They can be freely modified by your needs, same as changing their execution order.



    Amazing Assets - YouTube Facebook Twitter
     
    XANTOMEN likes this.
  2. Melloe

    Melloe

    Joined:
    Feb 22, 2015
    Posts:
    5
    You hero! Then I shall wait patiently. Good luck with the work load!
     
  3. fairchild670

    fairchild670

    Joined:
    Dec 3, 2012
    Posts:
    63
    Hello there! I absolutely love your asset and had a quick question...

    I'm using it in Unity 2019.3.7 URP and everything works great so far. The only custom thing I'm trying to do is to change all of the project Materials from a Mask Type of "None" to "Plane" and then back to "None" when stopping the game in the Editor.

    I tried just adding this bit of code to Controller_Mask_Plane to reset everything but it doesn't appear to work (even though the debug output looks like it did):

    Code (CSharp):
    1. private void OnApplicationQuit()
    2.         {
    3.             if (materials != null)
    4.             {
    5.                 for (int i = 0; i < materials.Length; i++)
    6.                 {
    7.                     if (materials[i] == null)
    8.                         continue;
    9.  
    10.                     //Enable proper keyword only
    11.                     materials[i].DisableKeyword("_DISSOLVEMASK_XYZ_AXIS");
    12.                     materials[i].DisableKeyword("_DISSOLVEMASK_SPHERE");
    13.                     materials[i].DisableKeyword("_DISSOLVEMASK_BOX");
    14.                     materials[i].DisableKeyword("_DISSOLVEMASK_CYLINDER");
    15.                     materials[i].DisableKeyword("_DISSOLVEMASK_CONE");
    16.                     materials[i].DisableKeyword("_DISSOLVEMASK_PLANE");
    17.  
    18.                     // Reset
    19.                     materials[i].SetFloat("_DissolveMask", 0);
    20.  
    21.                     Debug.Log(Time.time + " Controller_Mask_Plane: on quit _DissolveMask " + materials[i].GetFloat("_DissolveMask"));
    22.                 }
    23.             }
    24.         }
    Is there another way of achieving a way to reset the materials back to a default state?

    Much appreciated!
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    It looks correct.

    You can always check materials used keywords.
    Switch Inspector to Debug mode mode and check material editors Shader keywords filed:

    upload_2020-6-1_14-51-4.png

    upload_2020-6-1_14-51-43.png



    Amazing Assets - YouTube Facebook Twitter
     
  5. Fibonaccov

    Fibonaccov

    Joined:
    May 5, 2020
    Posts:
    19
    Hi,

    Sorry if this is has been brought up before but I could not find anything searching the web so posting here.

    I installed and I am running Advanced Dissolve successfully. I then tried to import the Post Processing Stack from Unity and I am getting conflicting GUIDs between Advanced Dissolve and the PPS. Any idea how to address this or are they just mutually exclusive for now until Unity addresses this? Dup GUIDs seems to be a know issue.

    See attachment. Thanks
     
    Last edited: Jun 6, 2020
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Demo scene uses Post Processing asset from the Asset Store, not from the Package Manager. You can remove it, it just a demo scene files.



    Amazing Assets - YouTube Facebook Twitter
     
  7. Fibonaccov

    Fibonaccov

    Joined:
    May 5, 2020
    Posts:
    19
    Thank you and yes this is what I will do once done with them
     
  8. idontcareabouthis

    idontcareabouthis

    Joined:
    Jan 27, 2018
    Posts:
    2
    Hi, thanks for this asset. I'm getting the following error when enabling GPU instancing on the speedtree 8 shader:


    Shader error in 'VacuumShaders/Advanced Dissolve/Universal Render Pipeline/Nature/SpeedTree8': Non system-generated input signature parameter (TEXCOORD) cannot appear after a system generated value. at Assets/VacuumShaders/Advanced Dissolve/Shaders/Nature/SpeedTree8Passes.hlsl(323) (on d3d11)
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Unity version?
    URP version?



    Amazing Assets - YouTube Facebook Twitter
     
  10. idontcareabouthis

    idontcareabouthis

    Joined:
    Jan 27, 2018
    Posts:
    2
    Oh sorry I'm using unity 2019.4.0f1 and urp 7.3.1
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Fixed. Download new update v2020.5



    Amazing Assets - YouTube Facebook Twitter
     
    idontcareabouthis likes this.
  12. ProdigyGamesEntertainment

    ProdigyGamesEntertainment

    Joined:
    Feb 9, 2020
    Posts:
    2
    Hello,
    our project is made in HDRP and we would love to use your asset if you will release a support for it.
    Best regards
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Shader Graph for Unity 2020.1 is promised to have custom material editor support. It will help me to integrate Advanced Dissolve with HDRP, and the whole SRP better.



    Amazing Assets - YouTube Facebook Twitter
     
    Whatever560 likes this.
  14. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    789
    Anyone solved the pink problem ? When adding the shader graph dissolve to the game edit graphics settings the whole scene get pink. upgrade/update not helping and changing each material asset shader type will take hours. I can make the dissolve effect to work greate on a project where there is only my mixamo character but when I'm trying to do it in my game project the whole scene get pink.

    and all I wanted is to make one of the npc's character to have the dissolve effect.
     
  15. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    54
    I'm on 2019.4.1f1 LTS trying to download, and getting the below error:

    upload_2020-7-3_0-39-40.png

    Any assistance is appreciated.
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Just tested with 2019.4 and at my side no problems found.
    In your case some tree prefab will be missing in example scenes, not a big problem as it does not effect working of the shader at all.



    Amazing Assets - YouTube Facebook Twitter
     
    NathanielAH likes this.
  17. fairchild670

    fairchild670

    Joined:
    Dec 3, 2012
    Posts:
    63
    Hi there! I had a question about the performance of Advanced Dissolve on Mac. I've been trying it out on an iMac with Catalina using Unity URP 2019.4.2f1 (also with 2019.3.7f1) and noticed that updating all of the materials in the scene (which has 100 objects currently) the performance drops significantly, from 100fps to 3fps. Even in the Scene view when the objects are in view the Editor becomes very unresponsive. Is there a way to potentially improve this?

    Much appreciated!

    Larry
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Advanced Dissolve is a common Alpha Cutout shader. In basic configuration it has about the same performance as all other Alpha Cutout shaders.

    Here are settings for the basic configuration:
    upload_2020-7-4_2-0-50.png

    After that, enabling various option will add instruction cost to the shader. Some of them are cheap, some expensive.
    For example Normal Mapping is cheaper than Screen Space Mapping, and 3 times cheaper than Triplanar Mapping.
    Using Main Map Alpha for Source is almost free, but using Two or Three custom maps, of course is more expensive.
    Using Texture for the Edge color adds more instruction cost and so on.
    Adding dynamic masks requires calculation too. Using one Spherical mask is much cheaper than 4 Boxes.

    All features and effects added to the basic configuration makes final effect more heave.
    And there really is nothing from my side in this shader to optimize. All improvements and optimizations are already done: all features, their quality and quantity are optional and user controllable.

    Needs to mention that not all devices work with Alpha Cutout shaders the same way. You can search for performance of Alpha Cutout shaders on various devices.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Jul 4, 2020
  19. CCHMC-burke

    CCHMC-burke

    Joined:
    Oct 29, 2019
    Posts:
    4
    Shader works fantastic, but it is NOT playing well with asset bundles for some reason.

    My pipeline is the following:
    1. Spawn Model
    2. Assign the Shader via a game manager
    3. Assign materials to the correct scripts and lists

    Works 100% in editor but in build it just wont work unless the object was already there at the start.

    I had to also included the shader in resources since I could not set it to always include shader in graphics settings, but still nothing. I know it's a classic case of "works in editor" but if anyone else has run into this issue and has a solution I would be VERY grateful!
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Do not forget that some effects are activated using keywords. In editor it is done automatically by material editor, in runtime you have to enable/disable them manually. Check ReadMe file for available keywords.



    Amazing Assets - YouTube Facebook Twitter
     
  21. CCHMC-burke

    CCHMC-burke

    Joined:
    Oct 29, 2019
    Posts:
    4
    So ideally something like


    Code (CSharp):
    1.         objMat.EnableKeyword("_DISSOLVEMASK_SPHERE");
    2.         objMat.EnableKeyword("_DISSOLVEALPHASOURCE_MAIN_MAP_ALPHA");
    3.         objMat.EnableKeyword("_DISSOLVEMAPPINGTYPE_NORMAL");
    4.         objMat.EnableKeyword("_DISSOLVEMASKCOUNT_ONE");
    Should work after I assign the shader? I am just confused why it will work for an object that is already in the scene during build but not a spawned in asset bundle object.
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    That's how keywords work in Unity.
    If shader uses several keywords, not all of them are included in build, but only those that are enabled in scene or are used by materials included with build.
    Unity does not know what manipulations are done with keywords from script.
    To make sure all required shader keywords are included in build, you have to create shader variants collection or just dummy materials with all required keywords and include them in build.



    Amazing Assets - YouTube Facebook Twitter
     
  23. dominik1995

    dominik1995

    Joined:
    Aug 24, 2019
    Posts:
    3
    Good evening, I have such a problem, I bought an asset yesterday and uploaded it to the project, but I have 55 errors and almost all of the same character
    Assets\VacuumShaders\Advanced Dissolve\Editor\CustomEditors\Basic\BakedLitShader.cs(7,53): error CS0246: The type or namespace name 'BaseShaderGUI' could not be found (are you missing a using directive or an assembly reference?)
    Assets\VacuumShaders\Advanced Dissolve\Editor\CustomEditors\Particle\ParticlesLitShader.cs(27,30): error CS0115: 'AdvancedDisolve_ParticlesLitShader.MaterialChanged(Material)': no suitable method found to override
    Assets\VacuumShaders\Advanced Dissolve\Editor\CustomEditors\Particle\ParticlesLitShader.cs(27,30): error CS0115: 'AdvancedDisolve_ParticlesLitShader.MaterialChanged(Material)': no suitable method found to override
    i use hdrp
    what to do, how to fix it?
     
    Last edited: Jul 12, 2020
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Check your render pipeline, and based on it use appropriate asset package.
    In your case it seems you are using Universal package with Standard render pipeline.



    Amazing Assets - YouTube Facebook Twitter
     
  25. dominik1995

    dominik1995

    Joined:
    Aug 24, 2019
    Posts:
    3
    Now warning
     

    Attached Files:

  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Show Room (Global Illumination) example scene is available only in package for Standard render pipeline. But you are using Universal render pipeline.
    Completely remove asset from the package and as I wrote above, import appropriate package based on your use render pipeline. In your case package with name - RenderPipeline - Universal.unitypackage
    upload_2020-7-13_17-39-11.png




    Amazing Assets - YouTube Facebook Twitter
     
  27. ledbetterman

    ledbetterman

    Joined:
    May 5, 2015
    Posts:
    81
    I love this asset! Any updates on a node for Amplify Shader?
     
  28. mjl3bd

    mjl3bd

    Joined:
    Oct 22, 2019
    Posts:
    1
    I have been successfully using Advanced Dissolve for more than a year.
    I just upgraded unity to 2019.4 and the game plays fine when launched in the editor.
    When I build the game, the build succeeds.
    But I run the build, it crashes immediately.

    The game would build without a problem in 2019.2.
    In 2019.4, when I remove the Advanced Dissolve shaders from every material in the scene that uses them, it builds and runs fine.
    Put them back in, the build crashes on execution.
    I created an empty scene with a single object in it. Works great with the Standard shader, but with Advanced Dissolve it still works in the editor and the build succeeds, but the build crashes.

    The log from the crash is:

    0x00007FFE92FAB5D9 (UnityPlayer) UnityMain
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFE92CBDAC9)
    0x00007FFE92CBDAC9 (UnityPlayer) (function-name not available)
    0x00007FFE931420B7 (UnityPlayer) UnityMain
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFE92EF13F3)
    0x00007FFE92EF13F3 (UnityPlayer) (function-name not available)
    0x00007FFE92EF528B (UnityPlayer) UnityMain
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF65F8211F2)
    0x00007FF65F8211F2 (Thunderballs) (function-name not available)

    And the crash.dmp error is:
    The thread tried to read from or write to a virtual address for which it does not have the appropriate access

    Any idea what is going on? Has the shader been tested with 2019.4?
    Thanks.
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    I will begin working on updates and new features from September. Definitely will add HDRP support and one node integration (if possible) for Shader Graph. As for Amplify Shader Editor node - currently not sure.

    Currently very busy with some other assets update, that's why September.


    Works without problem in Unity 2019.4
    In errors you have provided is nothing related to the Advanced Dissolve, with only that info problem (if it exist in this asset) can not be identified. If still think it is asset related, you can try remove almost everything from Advanced Dissolve folder except used shaders.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Jul 16, 2020
  30. ledbetterman

    ledbetterman

    Joined:
    May 5, 2015
    Posts:
    81
    No rush! I ask about Amplify because my project is stuck in Built-In and I have another asset with Amplify support (Vegetation Engine) that I'd like to integrate with Advanced Dissolve. Thanks for all of your efforts!
     
  31. halagame

    halagame

    Joined:
    Jan 14, 2020
    Posts:
    6
    Hi there, a great asset. I need some general guides for apply the dissolve effects to testMeshPro, anywhere I can be look for? thanks
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Just use included Advanced Dissolve shaders for TextMesh Pro. Controllers, effects, material editor are same.



    Amazing Assets - YouTube Facebook Twitter
     
  33. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    530
    Looking at Curved World 2020 compatibility similar to OG Curved World integration?
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    OG? what is it?



    Amazing Assets - YouTube Facebook Twitter
     
  35. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    530
    The original
    Sorry for the slang!
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Definitely. Somewhere in September will be new update.



    Amazing Assets - YouTube Facebook Twitter
     
    christougher likes this.
  37. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,248
    I have just added Advanced Dissolve to a new project in Unity 2019.4.7, Legacy Render Pipeline. It's currently not even used in the scene I'm building - but I'm getting two and a half hours of shader compilation (on a very fast machine), and the PS4 build went from 90MB to 1.3GB in size. With an Android build, all I can say is that Internal-DepthNormalsTexture apparently generates 96000 variants (IIRC, it was about 60K for the PS4 build, maybe 40K, either way: many) ... I cancelled the build, so I don't know what the resulting size would be but I'd imagine huge.

    I compared that shader with the one in another project where I'm using an older version of Advanced Dissolve, and one difference is that now it's using local shader keywords. I haven't compared the exact shader keywords being used.

    I have tried adding one mesh with a simple Advanced Dissolve material. That didn't make a difference. Removing most of the shader_keyword_local statements and replacing them with specific #defines seems to solve the issue (this takes the number of variants down to 54, which seems much more reasonable). Build time is now back to less than a minute (this is a simple test-project), and build size looks reasonable as well.

    I haven't double-checked if the shader still works properly after my changes.
     
  38. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    530
    When you build for android and have the option "optimize mesh data" in the player build settings it forces unity to compile every possible variant for every shader. I just barely learned this and now can run a build in less then 10 minutes as opposed to an hour or two. Try unchecking that if that's the case.

     
  39. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,248
    Ah, thank you. That is very useful information!

    It's kind of ridiculous that an option that is meant to remove unused mesh data would do this ... have you filed a bug report with Unity about this? It's almost definitely unexpected behavior.

    In our main project, we do have some mechanisms that reduce the variants but that's a bit of overhead I'm not putting into every test project. In general, I think being able to explicitly enable / disable shader options and then greying out the disabled shader options is a really good way to approach this (Beautify does this very nicely). Relying on Unity to do its job often creates problems ...
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Internal-DepthNormalsTexture shader is used for post processing, image effects and shader replacement effects for calculating correct vertex Normal. It is a collection of all possible RenderTypes with all variations. If you do not need that shader file, you can delete it or manually modify and leave only those RenderTypes that are used in your project.
    For the next update I'll try to add editor tool to make modifying Internal-DepthNormalsTexture file easier.


    Thanks, did not know.



    Amazing Assets - YouTube Facebook Twitter
     
    caesuric, jashan and christougher like this.
  41. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,248
    Ok, cool - I might just try if I'm getting any noticeable artifacts without it.



    Awesome! I can see that creating that kind of editor tool for all the shaders will probably be a lot of work but it would be tremendously helpful. In our case, I can probably also change the shaders to only use the configuration that I need but having the material editor show which options are actually currently available would be super-helpful.

    Ideally, Internal-DepthNormalsTexture would then just have those options included that are included in any of the material-shaders.
     
  42. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    530
    Is there any steps you need to do to get Advanced Dissolve shaders to work with Curved World?
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Compatibility with Curved World 2020 will be added in the next week update.



    Amazing Assets - YouTube Facebook Twitter
     
  44. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    530
    Yes, but in the meantime I'm playing with the older versions. Do the Advanced Dissolve shaders need to be edited for Curved World?
     
    Last edited: Sep 2, 2020
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Check Integration_CurvedWorld.cginc file inside Advanced Dissolve\Shaders\cginc folder. Here are explained all required steps.



    Amazing Assets - YouTube Facebook Twitter
     
    christougher likes this.
  46. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    158
    Hi Arkhivrag,
    Thanks you for this awesome asset which our game heavily relies on. We'd like to test switching to HDRP soon enough,
    I know everyone is already asking this yet I wanted to show our eagerness and support for this update. We'd be pleased to know when we can schedule our work, should it be end of September or later. Thank you very much for sharing any advancement or dates.

    Good luck & Best regards
     
  47. ArtR

    ArtR

    Joined:
    Sep 27, 2011
    Posts:
    48
    Love the asset, Waiting eagerly for the HDRP update ;)
     
    ProjectMakers likes this.
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Experimenting with it right now. I'd like to fit everything just in one node for Shader Graph.



    Amazing Assets - YouTube Facebook Twitter
     
    Whatever560 likes this.
  49. ProjectMakers

    ProjectMakers

    Joined:
    May 6, 2015
    Posts:
    9
    I would love to use it in our new project, but I'm still waiting for the HDRP support.
    Is there already a time line for this?
    Can we perhaps support you in this?
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,472
    Though it would be easy to integrate Advanced Dissolve in ShaderGraph as a node, but experiment successfully failed. For HDRP I have to make similar integration as for URP, it will need some time.
    Currently updating Wireframe shader and Terrain To Mesh plugin. Then comes Advanced Dissolve.



    Amazing Assets - YouTube Facebook Twitter
     
    jashan likes this.
unityunity