Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

► Advanced Dissolve ◄

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

  1. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    So i found the Problem, i have a Raycast from my Camera to a Wall, when the Raycast hit the Wall i make Advanced Dissolve Keywords Controller ( State = enabeld) when the raycast not more hit the wall i make Advanced Dissolve Keywords Controller ( State = disabeld), for a test i have set off the raycast function the Advanced Dissolve Keywords Controller ( State = enabeld) all time then i became no flickering and it works fine. How i can set it up right?
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    If problem appears only in build, it means that some shader keyword (affecting lighting calculation or shadows/lightmaps) is not included in the build.
    Create shader variants collection with all required keywords and include it in the build.



    Amazing Assets - YouTube Facebook Twitter
     
  3. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    thank you for your answer i have create a fresh new Unity project in Unity 2020.3.30f1 i have create a scene with only 2 walls, a camera and light. i have in the project your asset and playmaker, i have from my camera a smooth cone to a end point behind the wall, on the camera is a littel fsm(playmaker) in that i have mouse button down then make state disabeld and mouse button down again state enabeld. have the same flickering after in the build version, sry i dont now how i can set up that Create shader variants collection with all required keywords and include it in the build, can you help me ?
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Info is here: https://docs.unity3d.com/Manual/shader-variant-collections.html
    Add AD shader from your material here and begin adding keywords.
    AD keywords inside shader have prefix "_ad_". Keyword "_ad_state_enabled" is mandatory. Go through keywords list there and choose all keywords that you think you need in build.

    Note, when building project, Unity automatically creates shaders variants collection, but it includes only that keywords that are currently used in the scenes materials. All other keywords are not included, even if they are manipulated from scripts. That's why you have to manually create SVC asset.



    Amazing Assets - YouTube Facebook Twitter
     
  5. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    Thank you that works for me. For other peopel with the same Problem take a look here : http://www.mypandur.com/NewShaderVariants.shadervariants
     
  6. V-Rangers-Support

    V-Rangers-Support

    Joined:
    Feb 6, 2018
    Posts:
    10
    Hello, thank you for your asset !
    I had an issue right after I installed the URP package, it says "Assets\Amazing Assets\Advanced Dissolve\Editor\Universal Shader Editors\Universal\LitShader.cs(17,71): error CS0103: The name 'headerStateKey' does not exist in the current context".
    I'm using the Unity version 2021.2.11, the asset might not be up to this version yet. Is there any solution ?
     
    romainbayer105 likes this.
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Asset description on the store page contains info about supported Unity versions. Check it if you have missed it.



    Amazing Assets - YouTube Facebook Twitter
     
  8. theepicmixer

    theepicmixer

    Joined:
    Jan 18, 2015
    Posts:
    7
    Hi!
    I want advanced dissolve to dissolve a roof on the building. It works outside of Play Mode, but when I click play and I move the cube by script (using dotween), the dissolve works on the roof elements but not on the actual building.
    When the cube moves to the desired position it switched the material into (Instance)
    upload_2022-3-30_17-7-54.png
    And because the instance is not in the controller materials script it will not dissolve. What's interesting is that the other objects are dissolving without creating material instance.
    Before entering the trigger:
    upload_2022-3-30_17-9-20.png
    After entering the trigger:
    upload_2022-3-30_17-9-42.png
    I checked the settings and their appear the same both for dissolving object and objects which are not dissolving.
    Here is the script i use. It's a simple on trigger enter.
    Code (CSharp):
    1.  
    2. public class TopdownDissolve : MonoBehaviour
    3. {
    4.     public Transform DissolveBox;
    5.     public Vector3 TargetScale;
    6.     public Vector3 OffPos;
    7.  
    8. public void FadeOn()
    9. {
    10.     DissolveBox.position = OffPos;
    11.     DissolveBox.localScale = TargetScale;
    12.     DissolveBox.DOMove(OnPos, 0.5f);
    13. }
    14.  
    15. public void FadeOff()
    16. {
    17.     DissolveBox.position = OnPos;
    18.     DissolveBox.localScale = TargetScale;
    19.  
    20.     DissolveBox.DOMove(OffPos, 0.5f);
    21. }
    22.     private void OnTriggerEnter(Collider other)
    23.     {
    24.         if (!other.CompareTag("Player")) return;
    25.         FadeOn();
    26.     }
    27.  
    28.     private void OnTriggerExit(Collider other)
    29.     {
    30.         if (!other.CompareTag("Player")) return;
    31.         FadeOff();
    32.     }
    33. }
    34.  
    Here are the settings for advanced dissolve controller
    upload_2022-3-30_17-13-37.png
    Here are the settings for the mesh that is not dissolving:
    upload_2022-3-30_17-14-34.png

    Thanks in advance
     
  9. tkslan

    tkslan

    Joined:
    Sep 30, 2016
    Posts:
    28
    Hi, @Arkhivrag , Does Advanced Dissolve HDRP has a support for DXR, we have some problems here: upload_2022-3-31_10-58-39.png
    upload_2022-3-31_10-58-57.png
    Black reflections where Advanced Dissolve is applied.
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Controller script is just the ‘extension’ of the material editor, displaying shader properties that cannot be rendered by material editor (for example objects transformation matrixes).

    Controller script updates only those materials that are inside its Materials array. If you have instantiated material and it needs to be update using controller script, add that material to the Materials array too. Otherwise it will inherit property values that it had before instantiating but will not receive any updates for them.

    Controller script itself does not instantiate anything, it just updates Materials with properties that you provide.


    What Unity version are you using?



    Amazing Assets - YouTube Facebook Twitter
     
  11. tkslan

    tkslan

    Joined:
    Sep 30, 2016
    Posts:
    28
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Unity 2021.2 is not supported yet as it is 'tech release'.
    Asset will be updated for Unity 2021.2 after it is released as LTS version.
    All asset supported Unity versions are in the description on the Asset Store page.



    Amazing Assets - YouTube Facebook Twitter
     
  13. inod_clement

    inod_clement

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

    Do you have a solution or tips to quickly add keywords to shadervariants ?
    With unity editor it's horrible...
    I modify dissolve material with keywords by script and all keywords it's not include after build....
     
    Last edited: Apr 6, 2022
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    The easiest would be just creating simple mesh inside a scene (lie quad, never visible to a camera) with required material setup. During project building, Unity will include all its material keywords too.



    Amazing Assets - YouTube Facebook Twitter
     
    inod_clement likes this.
  15. mrabisch

    mrabisch

    Joined:
    Dec 13, 2019
    Posts:
    6
    Hi,

    I am Using Unity 2020.3.32 in HDRP with linear color space and get these errors:

    Shader error in 'Amazing Assets/Advanced Dissolve/Shader Graph/Metallic (Cutout)': invalid subscript 'vtPackedFeedback' at line 7657 (on d3d11)

    Shader error in 'Amazing Assets/Advanced Dissolve/Shader Graph/Metallic': invalid subscript 'vtPackedFeedback' at line 7561 (on d3d11)

    What I am doing wrong?
     
  16. inod_clement

    inod_clement

    Joined:
    Nov 9, 2016
    Posts:
    17
    Ok thanks.

    Another question i've different aspect between unity speedtree shader and you're speedtree shader.
    Here is a link with short video :
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Update for Unity 2020.3.32 is coming tomorrow.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Apr 7, 2022
  18. inod_clement

    inod_clement

    Joined:
    Nov 9, 2016
    Posts:
    17
  19. jeremedia

    jeremedia

    Joined:
    Apr 21, 2015
    Posts:
    65
    https://blog.unity.com/news/introducing-unity-2021-lts

    Looking forward to the Advanced Dissolve 2021 update! Thanks in advance.
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    jeremedia likes this.
  21. eduard94_unity

    eduard94_unity

    Joined:
    Jul 30, 2021
    Posts:
    1
    where did u get the blue wisp flying around i need those there sick
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Check free demo version. Link on the store page.



    Amazing Assets - YouTube Facebook Twitter
     
  23. LaytonDrake

    LaytonDrake

    Joined:
    May 11, 2016
    Posts:
    10
    Hi,
    I wanted to test out the Box Mask effect (where objects are only visible inside the invisible box) to see if it works well with the project I'm making, is it in the free demo or only the full version?
    Thanks
     
  24. mrabisch

    mrabisch

    Joined:
    Dec 13, 2019
    Posts:
    6
    Hi, I have some problems in unity 2020.2.7. I have multiple items and three cubes. Some objects should use the cube 1 some cube 2 and some cube 3 and cube 2. How to achieve this?

    I just started with two cubes, created two controller setups with id one and id two and gave some objekts mat with id one and some id 2. But teh material collector collects all. in controller with id one they also collect materials with id 2. So is that not the correct way to do this?

    I really hope you can help me because I have to be finished at the end of the week.
     
  25. mrabisch

    mrabisch

    Joined:
    Dec 13, 2019
    Posts:
    6
    upload_2022-5-10_9-12-58.png

    Ok maybe another question. I have two controlers with different IDs (ONE and TWO) and this material with a specific ID Two. Why is this material updated by multiple controller scripts ((ONE and TWO) when I use the correct ids? How can I say Material 1 just use controller ONE material 2 just use controller TWO? Or is the way I do it wrong?
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Think about controller script as a material editor extension.

    As default material editor cannot display properties required for geometric cutouts (for example transformation matrices) controller script helps here. They are used to send data from script to the materials. Which materials they update is up to you and you manage it by putting required material inside Materials array property in that script.

    Use only one controller scrip to update materials that have same AD settings.
    AD materials using One and Two cutouts are different materials, and thus two controller scripts must be used.

    Warning messages on the screenshot inform you that material is being updated by multiple scripts and rendering result may be incorrect.
    Update material cutout properties using only one controller script.




    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 10, 2022
  27. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,064
    Hi, jsut got the Advanced Dissolve pack. I installed it inside a unity URP 2020.3.34f1. Not sure why but the shaders properties in the demo scene are not displayed. when I expend the material with the little arrow i get a red flag error in the console:
    ArgumentNullException: Value cannot be null.
    Parameter name: path1
    System.IO.Path.Combine (System.String path1, System.String path2, System.String path3, System.String path4) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    AmazingAssets.AdvancedDissolveEditor.MaterialEditor.Init (UnityEditor.MaterialProperty[] props) (at Assets/3rdParty/Shaders/Advanced Dissolve/Editor/Material Editors/AdvancedDissolveMaterialEditor.cs:243)
    UnityEditor.Rendering.Universal.ShaderGUI.AdvancedDissolve_LitShader.FindProperties (UnityEditor.MaterialProperty[] properties) (at Assets/3rdParty/Shaders/Advanced Dissolve/Editor/Material Editors/Universal/LitShader.cs:40)
    UnityEditor.Rendering.Universal.ShaderGUI.AdvancedDissolve_LitShader.OnGUI (UnityEditor.MaterialEditor materialEditorIn, UnityEditor.MaterialProperty[] properties) (at Assets/3rdParty/Shaders/Advanced Dissolve/Editor/Material Editors/Universal/LitShader.cs:168)
    UnityEditor.MaterialEditor.PropertiesGUI () (at <a5bc71bb4d98498aba1f868b89d20d47>:0)
    UnityEditor.MaterialEditor.OnInspectorGUI () (at <a5bc71bb4d98498aba1f868b89d20d47>:0)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <a2e8177b4fa7415e9fa7912e7cd20e7d>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    upload_2022-5-14_13-44-27.png upload_2022-5-14_13-44-27.png


    Just FYI i moved the folder inside another one. Could that be it? Thanks for letting me know.

    Cheers!
     
  28. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,064
    Looks like that was because of the folder structure. I reinstalled the asset and the default location works as expected. Do you happen to know if there is a way to move the folders around without having this issue. For tidiness purposes I would really appreciate to plate it inside another folder. Thanks
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    You can change installation location, but don't rename Amazing Assets folder.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 16, 2022
  30. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,064
  31. Ceciaman

    Ceciaman

    Joined:
    Jul 30, 2013
    Posts:
    52
    Hi,
    When a plane intersects an object, is it possible that the remaining surface of the object remains solid?
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Plane mathematically is infinite, it cuts everything in front of it. To limit dissolve parts, use box mask.



    Amazing Assets - YouTube Facebook Twitter
     
  33. chakkale

    chakkale

    Joined:
    May 26, 2021
    Posts:
    1
    Hi everyone, did anyone try using Advanced Dissolve shaders on an M1 Mac with Apple Silicon version of Unity? Because i'm getting loads of shader related errors on console when importing the pack for URP... Unity Version is 2022.2.11f1 but also tried 2021.3.3F1 LTS but still the same errors. Any help is appreciated. Thanks

    Screen Shot 2022-05-26 at 13.27.29.png
     
  34. AFriendlyUnityDeveloper

    AFriendlyUnityDeveloper

    Joined:
    Dec 26, 2018
    Posts:
    33
    This asset works well for me when running in the editor but fails when I run in a build. I am using geometic cutouts, I apply the material to the mesh and then nothing happens when I do this. No dissolve or anything, works perfectly in editor.

    It also has a weird effect of being much brighter and more reflective than it is in the editor. (its as though the values were suddenly set to a metallic of 1.0 and a smoothness of .5)

    The only idea I had was that it might be due to keywords not being included as others have experienced on this thread. So I tried adding a material with all keywords to a quad in the scene to force preloading, but that didn't change anything.

    What could be causing this to be different in editor than in build?
     
    Last edited: Jun 15, 2022
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    There may be several reasons why some shader effects don’t work in the build:
    1. Required keyword is not included in the build.
    2. Target device can’t compile main shader and it’s fallback variant is not included in the build.
    3. If effect is controlled using script, this script is not working properly.
    Above reason is common not only for the Advanced Dissolve, but for all Unity shaders.
    Try build simple scene with just one mesh and AD shader but without any scripts. If required effect is not working correctly there, check included material keywords and fallback shader. After problems are fixed, begin adding script controllers. This steps should help you find out what is missing in your main scene.
     
  36. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    hi there @Arkhivrag
    first of all many thanks for all the amazing collection of shaders
    here is a simple question
    how to integrate advanced dissolve with Boxophobic vegetation engine
    i recently contacted with the creator of TVE and he told me he tried but had no chance because his shaders wrotten in ASE while your function is in Shader graph!
    i will appreciate if you take a little time and investigate on how to have a nice integration between these two monster plugins
    many thanks again
    have a nice time!
     
  37. ShizofMalkavian

    ShizofMalkavian

    Joined:
    Mar 29, 2015
    Posts:
    17

    I downloaded the asset and extracted Universal package. I'm using URP. Getting these errors.

    I tried on an empty project and these errors are gone. This error is left only:

    Same as this thread.

    Regarding the huge stack of errors in my current project, since I'm using Assembly Definition in my project, I'm guessing it is because of a missing definition that's required. I tried to add a few missing definitions to it, but none of it helped. Do you know which assembly includes those required classes?

    Or do I need to add something somewhere else in the project?
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    It looks like you are importing incorrect AD version in your project. There are several packages of it on the Asset Store server and based on the used Unity Editor version appropriate package should be downloaded.
    I'd suggest to use the latest Unity LTS version and re-download asset using Package Manager.

    If still have problems, contact me using support email (support@amazingassets.world with included invoice) and I can send required package directly.
     
  39. ShizofMalkavian

    ShizofMalkavian

    Joined:
    Mar 29, 2015
    Posts:
    17
    Ok, I looked at Package Manager, and I can't find where the different packages of the same assets are held:
    Is there a specific place they are shown in, or a specific setting that makes them shown?
     
  40. ShizofMalkavian

    ShizofMalkavian

    Joined:
    Mar 29, 2015
    Posts:
    17
    Nevermind, it was because of the reason I thought it was. Missing Assembly definitions. I added all the Unity.Renderpipelines.* definitions to my assembly definition file and the errors went away. Leaving this here in case someone else have the same issue.

    Might have been better if the asset included an Assembly Definition Asset to add these automatically as well.
     
    Last edited: Jul 26, 2022
  41. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    352
    Today was my first time trying to use Advanced Dissolve.
    I updated my game object from standard shader to "Amazing Assets/Advanced Dissolve/Standard/Metallic" but then my mesh disappears. I have tried messing with all the settings and read the manual but it is still invisible.
    What could be the problem?
    upload_2022-9-2_13-0-48.png
    upload_2022-9-2_13-1-9.png

    Changing state to disabled shows the mesh again but then it wont work of course.
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Material editor displays what the problem is and how to fix it.
    Click on the Create button in both cases, to control dissolve settings from the scripts.
     
  43. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    352
    Thanks. That solved that problem.
    Is there anyway to keep the shadows when the mesh is dissolved?
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    As shader dissolves (cuts) mesh fragments, shadows are also cut.
    If you need to keep shadows, disable them on the main mesh and create its duplicate with "non dissolve" shader and inside MeshRenderer select option to render Only Shadows for it.
     
  45. FreedLOW

    FreedLOW

    Joined:
    Dec 7, 2019
    Posts:
    15
    Hi try import package into project and get stack this errors:
    upload_2022-9-9_12-32-41.png

    using Unity 2020.3.35f1 LTS with URP, AD v2022.5
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    It may happen if manually importing downloaded package, that may be not compatible with that Unity version.
    Solution: Remove asset folder from project, clear Asset Store cache folder and re-download asset using package manager. Based on the currently used Unity version, appropriate package will be downloaded.
     
  47. XuDark

    XuDark

    Joined:
    Jul 26, 2021
    Posts:
    4
    hi,does this shader support single pass instance?
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    No problems found, so far.
     
  49. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    131
    Unity 2021.3, Built-In.

    Is there no Shadergraph support? I can use ShaderGraph OK with the built-in render pipeline but I can't find Advanced Dissolve subnodes.

    They're there on my other project with URP, though.

    So I assume ShaderGraph support is for URP and HDRP only?

    How do we add AD support for Built-In shaders?
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    3,008
    Shader Graph currently is supported only by URP and HDRP.
     
    Creiz likes this.