Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

► Advanced Dissolve ◄

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

  1. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    That is exactly what I did but I updated from 2019.3, I will forever work in 2019.4 from now on. I might even consider starting fresh to explore this as I forever hit this issue at end of projects... I'm loving your collection of shaders by the way. Starting to understand them much better, is it possible to mod your wireframe shader to use the Geo Cutout, or shall I say impossible before I try it?
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Wireframe shader supports Amplify Shade Editor and Unity ShaderGraph with just one node and all three dynamic masks with separate nodes each one. With those tools you can do any adjustments to the wireframe.



    Amazing Assets - YouTube Facebook Twitter
     
  3. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Thank you, I shall take a look. I'm stacked on shader keywords as im using Shader Forge which isn't idle.
     
  4. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Are there plans for an Amplify function for AD or way to implement it? It would be great if it could be neatly combined with WFS and DRM. Thanks again
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Advanced Dissolve can not be combined with ASE. It requires manual hand integration and due to its complexity, it is not supported and not planed.



    Amazing Assets - YouTube Facebook Twitter
     
  6. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Ok makes sense, and worked around it. It's a shame as it adds that extra amount of work but in all I have managed to make the effect I wanted anyway with some additional effort. Thanks
     
  7. remiC3D

    remiC3D

    Joined:
    Dec 15, 2017
    Posts:
    30
    Hello, I just bought your asset yesterday (version 2021.2), and I find it amazing ! I have 2 questions though :

    1) In the 1.Texture Cutout (Global Illumination).unity demo scene, why is this particular material animated :
    upload_2021-4-29_17-58-8.png

    Unlike the other exemples in the scene, this one doesn't have an "AnimateCutout" script attached, and yet its textures get animated...
    I tried to affect the same material to another objet in and empty scene and it still does move, however, if I recreate the same material from scratch, with the very same material properties, the copy si not animated... So I'm a bit lost...



    2) About dissolving a textmeshpro text, is the shader variant you're mentionning below still availlable ? I tried to search for a shader named as in your screenshot (but could'nt find one...)
    upload_2021-4-29_18-8-15.png


    Thanks in advance for your answers !
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    1. Texture is animated directly from material editor using Scroll parameter:
    upload_2021-4-29_21-21-31.png


    2. Import TextMeshPro shaders package from Advanced Dissolve\Shaders\TextMesh Pro folder.



    Amazing Assets - YouTube Facebook Twitter
     
  9. remiC3D

    remiC3D

    Joined:
    Dec 15, 2017
    Posts:
    30
    Alright, I deleted my previous post, because now I understand that this scroll property must be read in texture units per second. So a constant value of y=0.7 means in fact it will move 0.7 units per second. My bad.

    So thanks a lot for your answers !
     
  10. Leoss

    Leoss

    Joined:
    Apr 18, 2013
    Posts:
    9
    Hi, I'm having an issue this package...

    I have multiple identical cubes (with the same texture) placed next to each other, and I want to when you shoot a cube, it dissolves.

    However now, when I shoot just 1 cube, all of the cube will dissolve at the same time, since they all share the same material...

    How to do it so that it's only the cube that is shot that is dissolved?
     
  11. Plnda

    Plnda

    Joined:
    Nov 23, 2016
    Posts:
    14
    I have an issue using HDRP 10.4, the demo materials all work nicely with the simple cutout, but when i try to create my own material it won't actually dissolve. it will just add a color on top of the material @Arkhivrag do you know of a workaround?
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Create material duplicate (instantiate) for that cube only when you shoot it and animate dissolve parameter for that material. In this case other mesh's rendering will not be affected.

    Confirm problem with HDRP 10.4. Working on fix.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 4, 2021
    Plnda likes this.
  13. kunstlabdev

    kunstlabdev

    Joined:
    Feb 25, 2020
    Posts:
    6
    Hi, I am getting the same error.

    I am on 2021.2 and using URP, with Universal Advanced Dissolve installed. Is 2021 not supported?
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Unity 2021.2 will be supported after it is released. It's still alpha version.



    Amazing Assets - YouTube Facebook Twitter
     
  15. titoasty

    titoasty

    Joined:
    Dec 2, 2018
    Posts:
    25
    Hi!
    First amazing asset, it works wonderfully and it's very easy to setup.

    I've got a problem with the Standard Dissolve shader when exporting the app (on windows).
    I can see the mesh, so the material is probably compiled correctly (and not pink), but when I change the Clip property (via script) to modify the dissolve, it does strictly nothing.
    When I'm in the editor, everything works correctly.
    (FYI, I assign the dissolve shader via script by referencing the Standard dissolve shader as a public property of a game object)

    Thanks in advance for your help :)
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Looks like something prevents material property changing. May be another script? o_O
    If material uses keywords, make sure they all are included in the build.



    Amazing Assets - YouTube Facebook Twitter
     
  17. titoasty

    titoasty

    Joined:
    Dec 2, 2018
    Posts:
    25
    It didn't work when I added the material with dissolve in my script (instead of the shader).
    It only fully included the shader when I added an object to the scene with the dissolve material.
    Weird... but it worked ;)

    Thanks !
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    New update for Unity 2021.1.6 will be released next week (18 - 21 May).



    Amazing Assets - YouTube Facebook Twitter
     
  19. zalos1337

    zalos1337

    Joined:
    Dec 7, 2020
    Posts:
    6
    I am using the .material to change the instance of the material for the dissolve. This is inefficient and property block is much better. For the property block though, I was unable to change the clip using _AdvancedDissolveCutoutStandardClip. Is there a way to do change the clip using SetFloat and a property block?
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Shaders support SRP Batcher, but not GPU Instancing.



    Amazing Assets - YouTube Facebook Twitter
     
  21. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    179
    I am using the shader to mask an object. The object has transparency. Unfortunately in the masked area the shape of the object is affecting the fog, so you get an area cut out of the fog..
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    1. Unity version?
    2. Render pipeline?
    3. Color space?
    4. Shader name?
    5. Build target?
    6. Does camera use any post-processing filter?

    Screenshot of the problem will be helpful too.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Jun 20, 2021
  23. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    179
    1. Unity 2019.4.131f1
    2. Built in
    3. Gamma
    4. Standard Specular
    5. Windows
    6. I have Global Fog Preetham & Antialiasing FXAA3 Console. The problem is that I cannot replicate the issue. The screen shots come from users running DirectX 12 (which I am also using)


    upload_2021-6-21_13-14-7.png
    upload_2021-6-21_13-19-41.png
     
  24. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    179
    Here are the settings:
    upload_2021-6-21_13-22-58.png
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Unfortunately I was not able reconstruct that problem too. Tried multiple antialiasing, fog and various post processing filters combinations. Everything works without problems.

    [Edit]
    Test using Unity 2019.4.26.



    Amazing Assets - YouTube Facebook Twitter
     
  26. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    179
    Any ideas of how to progress this one?
    I am swapping from Fade to Opaque. Looks fine in Editor but in builds you get the fog issue. The problem is actually running in the Opaque mode. Is there anything in there that could conflict?

    Material material = m_renderer.sharedMaterial;

    if (! transparent)
    {
    material.SetOverrideTag("RenderType", "");
    material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
    material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
    material.SetInt("_ZWrite", 1);
    material.DisableKeyword("_ALPHABLEND_ON");
    material.renderQueue = -1;
    material.SetFloat("_Mode", 0.0f);
    }
    else
    {
    material.SetOverrideTag("RenderType", "Transparent");
    material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
    material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
    material.SetInt("_ZWrite", 0);
    material.EnableKeyword("_ALPHABLEND_ON");
    material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
    material.SetFloat("_Mode", 2.0f);
    }


    EDIT 2: Further to the advice given I created a dummy material with _ALPHABLEND_ON keyword and now everything works fine. You have to be careful with this as any runtime changes to materials persist obviously leading to different start up states when you build.
     
    Last edited: Jul 1, 2021
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    If you are changing shader keywords in runtime, you have to include them all in the build. For that you can create shader variants collection or just 'dummy' material with required settings and use in a scene, Unity builder automatically includes materials keywords used in a scene.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Jul 20, 2021
  28. SergOrc

    SergOrc

    Joined:
    Dec 13, 2018
    Posts:
    3
    Hi!
    Unity 2021.1.15ph
    urp 11
    Some standard dissolve shaders do not work.
    When generating own shader, the settings tab "Advanced Dissolve" is not displayed in the material.
    https://yadi.sk/i/A45Y20IPqCM3ZA
     
    Last edited: Jul 20, 2021
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Strange. No problems at my side.

    Are there any warnings printed in the Console Window after generating shader?

    You can manually check generated shader file's last lines, there should be defined CustomEditor:
    Code (CSharp):
    1. //CustomEditorForRenderPipeline "ShaderGraph.PBRMasterGUI" "UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset"
    2. CustomEditorForRenderPipeline "AmazingAssets.AdvancedDissolveEditor.ShaderGraph.DefaultShaderGraphGUI" "UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset"
    3. FallBack "Hidden/Shader Graph/FallbackError"
    Additionally try: Remove AD from project, clear Asset Store cache folder and re-download asset from the store. There are several AD packages for different Unity versions and based on the currently used Editor version will be downloaded proper version.



    Amazing Assets - YouTube Facebook Twitter
     
  30. SergOrc

    SergOrc

    Joined:
    Dec 13, 2018
    Posts:
    3
    At the end of the generated shader, there is no such line, I inserted it and everything started working. I created a completely new scene and tested it there. The same problem. I noticed that there is such a problem if generate from an unlit graph if render from a lit graph then there is no such problem. pinned the picture with the errors that I have in console
     

    Attached Files:

  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Fixed. Download new update v2021.5



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Jul 21, 2021
  32. LKH_Prime

    LKH_Prime

    Joined:
    Apr 18, 2019
    Posts:
    5
    It seems that Advanced Dissolve does not work with Unity 2021.2, I got a lot of error since I updated. (URP12)
    Could you please update it? URP12 (Unity 2021.2) is so cool.
     
    Last edited: Sep 2, 2021
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Unity 2021.2 will be supported after it is officially released.



    Amazing Assets - YouTube Facebook Twitter
     
  34. Maplefly

    Maplefly

    Joined:
    Sep 5, 2021
    Posts:
    1
    Hi!
    I wanna know Why didn't the third cube and fourth cube work ? They have exactly the same setup with first and second cube.
    Unity Version 2020.3
    Use Universal RP.
     

    Attached Files:

    Last edited: Sep 5, 2021
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Do Materials have appropriate keyword enabled?
    You can enable it for each material individually from their material editor, or using Keyword Controller script.



    Amazing Assets - YouTube Facebook Twitter
     
  36. FellowPlayer123

    FellowPlayer123

    Joined:
    Dec 23, 2016
    Posts:
    114
    [I am using Universal Render Pipeline - URP]
    1st question:
    Is there a way to activate this dissolve shader only on the mesh parts, for example, part of the belly, hand, or legs?
    2nd: Do you own Discord server?
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    1. If mesh parts are different sub-meshes, then yes. You just use different material for each one and control them independently. In the case of one mesh you can control dissolve visibility using mask textures.
    2. No



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Sep 13, 2021
    FellowPlayer123 likes this.
  38. villaman

    villaman

    Joined:
    Apr 21, 2021
    Posts:
    69
    Hello,
    I am considering buying Advanced Dissolve, but had a few questions.

    1. I am a little unclear on the limitation to 4 Geometry (say, Box) cutouts. If I have 20 objects in my scene can they be in 20 different states of dissolve? So, Object1 is (say) 10% dissolved, Object 2 is (say) 15% dissolved... Object17 is (say) 80% dissolved. etc. or can there only be 4 states of simultaneous (box) dissolves at a time?

    1a) Is it a global (scene) limitation of 4 (box) cutouts?
    1b) Is it a per-object limitation of 4 (box) cutouts?
    1c) Something else?
    1d) Does it have to do with simultaneous cutouts, or simultaneity does not play a role?

    2. Is it possible to mimic writing and erasing on a whiteboard. Assume that the whiteboard is a Plane object with a transparent PNG texture representing the thing being drawn or erased.

    2a) Basic: Just a general "erasing" and "writing" motion, sort of like this:

    https://www.storyblocks.com/video/stock/young-teacher-erasing-chalkboard-htmj-eocis5r4rgj

    Here precision is not critical, just a general sort of left-right diagonal erasing (Dissolving) or writing (undissolving) motion cutout.

    2b) Advanced "Stroke-based". Here the "writing" (undissolving) follows a particular stroke order like seen in typical "whiteboard animations".

    Something like:


    Although the strokes would be natively represented as a series of Vectors (with thickness), it would be easy to
    convert them to a series of "Stencil" textures "applied" sequentially if that made it easier to drive the cutout. I've tried to illustrate the concept below. Hopefully it is clear.

    Obviously, in #1, if there was no limit on the number of (box) cutouts per object, then even the strokes could be represented as (differently oriented) objects.

    thanks,

    Stroked Drawing.png
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Limitation of 4 dynamic cutout objects is per material, not per scene.

    If you have 20 objects and need each one to be rendered differently from each other, just use unique material for each one. Each material can be affected by maximum 4 dynamic cutout objects.
    One cutout object (cube in your case) can be used by multiple materials.

    As for writing and erasing on a whiteboard, this is not possible to achieved just only with a shader. Some script side or maybe secondary shader use may be need. So - no.

    Using of "infinity" dynamic mask objects is possible, using Dynamic Radial Masks asset inside Advanced Dissolve using ShaderGraph.



    Amazing Assets - YouTube Facebook Twitter
     
  40. villaman

    villaman

    Joined:
    Apr 21, 2021
    Posts:
    69
    thanks for your response.

    Got it.

    Yes, I was not expecting it to be done only through a shader. I was wondering whether the dissolve shader could take a "stencil texture" (i.e. the currently visible part of the whiteboard) as input from a Script and use that "stencil texture" as the current dissolve state. Then it would be the script's problem to provide the "stencil texture" in some animation loop.

    However, based on your description of having no limit on the number of "cube" cutouts it seems the following alternate Stroked Drawing 2.png approach work?


    Let's say my whiteboard end state has 5 "strokes" modeled as 5 (relatively straight) Game Objects. Each one "surrounded" by a "StrokeCube". The StrokeCube would be aligned "along" the game object.

    Then I would do the following in a script..

    Initial State

    StrokeCube1 - undissolved - Stroke1 Invisible
    StrokeCube2 - undissolved - Stroke2 Invisible
    Stroke3Cube - undissolved - Stroke3 Invisible
    Stroke4Cube - undissolved - Stroke4 Invisible
    Stroke5Cube - undissolved - Stroke5 Invisible

    Then I would animate StrokeCube1 to dissolve via a script... leading to

    StrokeCube1 - dissolving - Stroke1 Partially Visible
    StrokeCube2 - undissolved - Stroke2 Invisible
    Stroke3Cube - undissolved - Stroke3 Invisible
    Stroke4Cube - undissolved - Stroke4 Invisible
    Stroke5Cube - undissolved - Stroke5 Invisible

    then

    StrokeCube1 - fully dissolved - Stroke1 Visible
    StrokeCube2 - undissolved - Stroke2 Invisible
    Stroke3Cube - undissolved - Stroke3 Invisible
    Stroke4Cube - undissolved - Stroke4 Invisible
    Stroke5Cube - undissolved - Stroke5 Invisible

    then

    StrokeCube1 - fully dissolved - Stroke1 Visible
    StrokeCube2 - dissolving - Stroke2 Partially Visible
    Stroke3Cube - undissolved - Stroke3 Invisible
    Stroke4Cube - undissolved - Stroke4 Invisible
    Stroke5Cube - undissolved - Stroke5 Invisible

    etc.

    Maybe I'm missing something?

    ok, I'll look at this.

    thanks.
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    May be my understanding of a "stencil texture" is different, but if you have external texture manually updating from a script, it can be used without problem inside Advanced Dissolve.



    Amazing Assets - YouTube Facebook Twitter
     
  42. villaman

    villaman

    Joined:
    Apr 21, 2021
    Posts:
    69
  43. martinreimer

    martinreimer

    Joined:
    Feb 21, 2018
    Posts:
    16
    Are you planning to support raytraced materials in HDRP?
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
  45. CChong_at_Infinity

    CChong_at_Infinity

    Joined:
    Apr 7, 2020
    Posts:
    27
    Howdy,

    I'm using Advanced Dissolve v2021.4 on a Unity 2020.3.18f1 project and URP v10.6.0.

    The URP Simple Lit shader doesn't seem to be compile properly. It seems fine on initial shader import (and reimport), but the error only pops up when you assign a material to it.

    The URP Lit shader works fine, FYI.

    Is anyone else getting this on their end?

    Thanks,

    Chris

    upload_2021-9-27_18-25-49.png
     

    Attached Files:

  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Open AdvancedDissolveSimpleLitForwardPass.cginc file and change line 144:

    from
    Code (CSharp):
    1. ADVANCED_DISSOLVE_SETUP_CUTOUT_SOURCE_USING_WS(input, dissolveBase, input.positionWS.xyz, normalize(input.normalWS.xyz))
    to this
    Code (CSharp):
    1. ADVANCED_DISSOLVE_SETUP_CUTOUT_SOURCE_USING_WS(input, dissolveBase, input.posWS.xyz, normalize(input.normal.xyz))
    Fix will be included in the next update.



    Amazing Assets - YouTube Facebook Twitter
     
    CChong_at_Infinity likes this.
  47. CChong_at_Infinity

    CChong_at_Infinity

    Joined:
    Apr 7, 2020
    Posts:
    27
    Thanks for the swift reply
     
  48. Quintus374

    Quintus374

    Joined:
    Jan 22, 2018
    Posts:
    1
    Thank you so much for this shader. I was facing one problem however.
    I tried to open the example files in a new unity 2019.4.4f1 project and there was an error with the outputAlpha.

    Shader error in 'Amazing Assets/Advanced Dissolve/Universal Render Pipeline/Lit': undeclared identifier 'OutputAlpha' at Assets/Amazing Assets/Advanced Dissolve/Shaders/Universal/AdvancedDissolveLitForwardPass.hlsl(217) (on d3d11)
    this was the exact error.
    Compiling Vertex program
    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

    would you know what this could mean and how to fix it? Thanks in advance.
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Have you updated Universal RP from a package manager to be the latest one?



    Amazing Assets - YouTube Facebook Twitter
     
    VirtualDawn likes this.
  50. JeffG

    JeffG

    Joined:
    Oct 21, 2013
    Posts:
    84
    I am getting the following error after install.

    Shader error in 'Amazing Assets/Advanced Dissolve/Shader Graph/Lit (Opaque)': undeclared identifier '_DoubleSidedConstants' at /Unity/TestRig/TerrainCreator/Library/PackageCache/com.unity.render-pipelines.high-definition@10.6.0/Runtime/Material/Decal/DecalUtilities.hlsl(273) (on d3d11)



    Unity 2020.3.19f1 using HDRP 10.6 I assume I must be missing something.