Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

► Advanced Dissolve ◄

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

  1. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Hello,
    I have come across a peculiar feature while using AD: a cutout (standard cutout, present in a standard shader) does not work as expected while metallic source is set to "albedo alpha".
    To reproduce:
    *open an example scene with pine
    *select pine material, move the "alpha cutout" slider. Everything's working as expected.
    *change metallic source to "albedo alpha". Move the cutout slider again. Now leaves are either full-texture without any cutout whatsoever or completely invisible.

    Unity 2022.3
    BIRP
     
    Last edited: Jan 21, 2024
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    Does the Unity's built-in Standard shader has the same behavior?
    Does the Albedo map has the correct alpha channel?
     
  3. Spinehair

    Spinehair

    Joined:
    Mar 16, 2017
    Posts:
    12
    Hello! Love the asset but I am having one slight problem.

    I have objects in my game that you can burn, and when you do advanced dissolve handles the disintegration effect, Firewood for example. But when i burn one object, all of the objects with this material across the whole scene also disintegrate.
    Is there something I need to activate on the shader to allow it to make instances of my dissolving material? GPU instancing flag on the material doesn't seem to do the trick either.
    upload_2024-3-4_16-33-21.png
     
  4. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    546
    Access your material through .material(s) and not .sharedMaterial(s) within unity scripts, it will clone this specific instance for you. GPU instancing is for the rendering stage, not the shader data stage. So it's not related.
    Another thing is it might depend on the method you use, like do you use the Keyword / Dissolve Controllers? Check the list of materials there and update them with the instanced materials.
     
    Spinehair likes this.
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    Dissolve properties are common shader proprietress like BaseColor, BaseMap and so on. If several objects use one material, they all will be rendered the same way, of course.
    If you need objects to be rendered with different set of material properties, just create material duplicates manually inside editor for each object, or instantiate them using script.
     
    Last edited: Apr 25, 2024
  6. Tabularas

    Tabularas

    Joined:
    Jul 7, 2020
    Posts:
    4
    Hello, when are you supporting Unity 2023? Currently I have big issues getting it to Run on 2023 with HDRP
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    All asset supported Unity versions are in the description on the Store page.
     
  8. Cuku_

    Cuku_

    Joined:
    Sep 2, 2012
    Posts:
    11
    Hi @Arkhivrag is there a way to integrate Advanced Dissolve in custom shaders, more specifically, I want to cutout terrain, vegetation, roads, etc. created with MicroVerse and MicroSplat.
    I saw that it should be possible to integrate with Shader Graph, but probably not possible with MicroSplat and other shaders?
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    It is be difficult to manually integrate AD into hand-written shaders. Only if they are made using ShaderGraph.
     
  10. Grzzld

    Grzzld

    Joined:
    Aug 4, 2014
    Posts:
    12
    Greetings. Getting an error on a brand new project using 2022.3.12f1, no other assets installed. Can someone point me in the right direction? Thanks in advance!
    Edit - I am using the built in RP.

    Assets\Amazing Assets\Advanced Dissolve\Example Scenes\Demo Scenes\Files\Scripts\MaterialCollector.cs(54,44): error CS0029: Cannot implicitly convert type 'UnityEngine.Material[]' to 'System.Collections.Generic.List<UnityEngine.Material>'
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    Change line 54 from
    keywordsController.materials = mats.ToArray();
    to
    keywordsController.materials = mats.ToList();
     
    Grzzld likes this.
  12. Grzzld

    Grzzld

    Joined:
    Aug 4, 2014
    Posts:
    12
    Outstanding! Apologies if it was asked before, I could not find it. Thanks for the support!
     
  13. connygy

    connygy

    Joined:
    Oct 27, 2021
    Posts:
    15
    Hi, I am new to use this package, it is really powerful. But I can not figure out, how to let an object smoothly transition to transparent?

    I am very confused, I saw there is and edge option, but I have to give a color of the edge, so the transition looks very ugly. Can I set the edge to be transparent?

    In this picture, I have an earth, I want it disappear smoothly without the green edge, how can I do it? 2024-04-28_00-42-52.jpeg
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    1) Addition Color → Source → Base Color: in this case edge color is read from the materials MainTex.
    2) Base → Color: set it white, in this case color is multiplied with MainTex.
    3) Base → Color → Transparency slider: effects multiplied color transparency.
    4) Base → Intensity: emission strength of the calculated edge color.
    upload_2024-4-28_11-29-19.png


    Note, dissolve has no transparency, as it is Alpha Cutout shader effect.
     
  15. connygy

    connygy

    Joined:
    Oct 27, 2021
    Posts:
    15
    Hi, @Arkhivrag, I tried your method, but the result is the same as showed in your picture, the edge is still hard, like be cuttered by a knife. Is it possible to let the edge, the transition part, become softer, so that it looks more nature?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    That's how Alpha Cutout shaders work. They do not have smooth transition. Pixel is rendered, or not!

    You can enable addition texture cutout feature and set Clip value to 0:
    upload_2024-4-29_13-15-19.png


    And now from dissolve controller script Noise property can be used to add more randomness to the cutout edges:
    upload_2024-4-29_13-16-18.png
     
  17. natteo

    natteo

    Joined:
    Nov 10, 2013
    Posts:
    7
    Is there a way to update the provided shaders (URP), like the Lit.shader to a newer version? I've tried copying the contents of the new Lit.shader from the URP 17 package and used "Generate Shader" from the menu onto the provided Lit.shader from this asset, but that is causing an error "Unknown Shader Pass: Forward Lit / Universal2D". I want to get the lighting information from the new APV in Unity 6, and it works if I use shadergraph to generate a new shader, but it is without the standard lit properties you'd normally have.
     
  18. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,060
    Hi there, we're getting a problem while trying to build for Xbox (GameCore_Scarlett).

    Please see below:
    upload_2024-5-10_17-20-1.png

    Thanks for your time and advice.

    Best,
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    It looks like you are using an asset version designed for Unity 2020.3 with Unity 2021.3.
    They are several packages on the store designed for different Unity versions and you have to download proper version, as they are not compatible with each other.

    Solution: Completely remove asset folder from the project, clear Asset Store cache folder (Amazing Assets subfolder) and after that re-download asset using Unity 2021.3 (the latest LTS version) Package Manager.
     
  20. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,060
    Hi there, the version we have in the project is v2023.3, which seems to be correct compared to what is available via package manager. We upgraded the project in March 2024 to v2021 and your asset was one we had to upgrade due to it not working after the upgrade...
    "
    public const string assetVersion = "2023.3";
    "
    This is what the AssetInfo.cs says...
     

    Attached Files:

  21. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,060
    Just to clarify, commenting out the offending code helped. And it looks like no functionalities were lost.
     
  22. MateJunky

    MateJunky

    Joined:
    Jul 6, 2020
    Posts:
    1
    Hi,
    is this shader compatible with the Metal API? I develop in an MBP with an M2 Max and would love to use these shaders.

    Best wishes
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    All platforms are supported, but try free version for yourself too.
     
  24. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    944
    i have a problem.

    when running it through the editor, everything is working well and i can see the light cone coming out from the spotlight.
    but when u build the game and running the build file the light cone is not show or not exist.

    here is two images showing the problem.



    and



    i tried to generate the lights in the editor, it took about 30-40 minutes but it didn't help either.

    I'm using unity3d version 2022.3.24f1 using unity personal.
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,998
    Render pipeline?
    It looks like volumetric light shader is missing keywords in your build or it just is not supported by your device. Cannot say it from the screenshot.
     
    Last edited: May 29, 2024 at 11:36 AM