Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

► Advanced Dissolve ◄

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

  1. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    558
    I haven't opened it in my Unity yet. Right now I just have issues with the executable demo.
    Unity version 2018.2 and OS is Win7 64 Bit
     
    Last edited: Dec 4, 2018
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Sorry, I can not test demo on Windows 7 myself.



    VacuumShaders - Facebook Twitter YouTube
     
  3. nviverosb

    nviverosb

    Joined:
    Sep 9, 2017
    Posts:
    2
    Hi. So I bought this asset recently, and so far it has been awesome, but I have two problems tho.

    I'm Using Unity 2018.2.15f1. macOS Mojave, and building to Android min API 7.0. I'm using only VacuumShaders/Advanced Dissolve/Standard/Metallic.

    The first problem is that there's a line (line 222) in the Specular.Shader (which I'm not even using) that keeps throwing an error on compile in unity. This is the error:

    Code (CSharp):
    1. Shader error in 'VacuumShaders/Advanced Dissolve/Physically Based/Specular': '_LightCoord' :  no such field in structure at line 222 (on gles)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDADD SPOT _DISSOLVEALPHASOURCE_CUSTOM_MAP _DISSOLVEMASK_BOX
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    5.  
    The second one is that I'm trying t bring this into ARCore, and so far it works, but when I have many meshes (sharing one material) and the mask is showing only a little portion of them, the frame rate drops to about 10fps and it looks painfully slow. Is there any workaround for this.
     
    Last edited: Dec 6, 2018
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    I was able to reconstruct issue with Physically Based (Specular & Metallic) shaders. Working on fix.
    For now if you do not need those two shaders, just delete them.

    As for frame drop, it mostly seems to be mobile GPU problem and how it handles Cutout shaders. Problem is widely discussed here on Unity forum.



    VacuumShaders - Facebook Twitter YouTube
     
  5. nviverosb

    nviverosb

    Joined:
    Sep 9, 2017
    Posts:
    2
    Ok, I'm looking forward for the shaders fix.

    So basically, there's no 'quick fix' for the frame drop problem... Guess I'll have to start digging the forums for more info then.

    Thanl you for your response.
     
  6. whydoisay

    whydoisay

    Joined:
    Jun 18, 2017
    Posts:
    14
    Hi, I purchased your asset and have been trying to use it with Enviro - Sky & Weather and it seems to just wipe out the entire weather effect and make the sky gray. Is this incompatible or am I doing something wrong?
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    May be you imported Demo Scenes package and it overwrote some already existing files inside your project? Before importing it check ReadMe file in the same folder.
    Beside written above I do not think shader files can somehow "wipe out" anything in your project.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 10, 2018
  8. whydoisay

    whydoisay

    Joined:
    Jun 18, 2017
    Posts:
    14
    I will try again, but by "wipe out" I mean stop the effect from working.
     
  9. iain-nicholls

    iain-nicholls

    Joined:
    Nov 15, 2013
    Posts:
    5
    does this work with single pass VR or multipass ?
     
  10. tgentry

    tgentry

    Joined:
    Feb 11, 2013
    Posts:
    29
    I just bought the shader today and was running quickly through the demo projects. I decided to import a truck into the plane demo and watch the body disappear away leaving the interior. Got the shader changed over with no problem. But no animation when plane passes over. I read earlier that a controller script has to be used, but no where do I find what I add nor where the controller is added to. I also searched YouTube for use tutorials with nothing. The docs explain what each thing is but not how to use it. Any help would be appreciated. In other words how is the animation added to the shader when the plane passes over the shader.
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Check 3. Mask (Plane) example scene and Mask Controller object there. It has Controller_Mask_Plane script attached. All this script does - sending "plane' data to the shader.

    As Dissolve shader can work with 4 mask objects, using this script you can send 4 'plane' mask data to the shader.
    Which materials effect this script can be assigned inside Materials array.

    If different materials need different mask object data, just use as many mask_controller scripts in the scene as you need.

    If all scene materials use the same mask objects, it is better to check Global Controller inside all materials and mask controller script.
    Check 8. Global Controller example scene and Mask Controller object there with the same Controller_Mask_Plane script attached.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 19, 2018
  12. tgentry

    tgentry

    Joined:
    Feb 11, 2013
    Posts:
    29
    Thanks for the response. I am in the 3.Mask file because I thought that would be easier to start than the cubes and spheres. Here is the workflow I used. 1.)Open Mask scene. 2.)import truck. 3.)duplicate CactusPack shader to CactupPack1 and assign it to my truck body. 4.)remove textures from slots and change the color. The truck is now partially invisible with the green gradient half way through it. But as I drag the plane I can watch my truck and shader and nothing happens. What am I missing. My thought was that I use an existing shader that way I would not miss any settings and then I would try and create one from scratch.
    upload_2018-12-19_8-54-16.png

    As I move the body it will transition as it crosses the stationary green gradient. You can see the plane well ahead of the gradient.
    upload_2018-12-19_8-56-0.png

    upload_2018-12-19_8-56-46.png
    But the plane does not effect it.

    I would like the plane to control the animation like you meant it to happen. I am missing something.

    Thanks
     
  13. tgentry

    tgentry

    Joined:
    Feb 11, 2013
    Posts:
    29
    Ok I found it. I needed to add the shader to the Mask controller.

    upload_2018-12-19_9-24-0.png
    Now the plane is the control of the new CactusPack1

    Thanks
     

    Attached Files:

  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Yes, you just add materials to the Materials array and script will update them with required 'plane' mask objects data.
    All other controller scripts work exactly the same way.



    VacuumShaders - Facebook Twitter YouTube
     
  15. xibanya

    xibanya

    Joined:
    Nov 26, 2016
    Posts:
    10
    Hi! Just popping in to say thanks for this, I had the same problem and this was what solved it!
     
  16. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    10
    After importing demos in Unity 2018.3.0, there is an error message in Console:
    Assets\VacuumShaders\Advanced Dissolve\Example And Demo Scenes\Demo\Files\PostProcessing\Editor\PropertyDrawers\MinDrawer.cs(6,34): error CS0104: 'MinAttribute' is an ambiguous reference between 'UnityEngine.PostProcessing.MinAttribute' and 'UnityEngine.MinAttribute'
    Any idea, how to fix this?
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Shaders work with Single and Multipass rendering methods. Tested on Oculus Rift.


    Replace file with attached one.
    The only difference is changing MinAttribute to UnityEngine.PostProcessing.MinAttribute
    Or just delete that file. Will not effect Demo scenes.



    VacuumShaders - Facebook Twitter YouTube
     

    Attached Files:

  18. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    10
    Thanks a lot.
    Now the Demo scenes works without any problems.
     
  19. Cris_2013

    Cris_2013

    Joined:
    Nov 25, 2017
    Posts:
    13
    Hi,

    I've been using your shader for some time and everything has been working properly until today:

    I am making a scene where two meshes of similar size are overlapping, the one underneath has a normal unlit shader and the one on top uses the dissolve unlit shader. And then I have a cube that just moves left to right so it reveals what is inside the mesh.
    Everything is working fine here. However this entities are parented to the camera, and I've added a simple animation to the camera that makes it navigate and rotate around the scene.
    Once that is happening the shader starts to behave wrongly (I can see the edge of the shader popping in an out and sometimes the cutout is vertically instead of horizontally).
    Tracking the entities in real-time I cannot see any entity misbehaving, the "dissolve box" keeps moving correctly relative to the camera.

    I am using the code on the demo example, and I suspect something is not working properly in this line:
    Matrix4x4 trs = Matrix4x4.TRS(m_DockBlender.position, m_DockBlender.rotation, Vector3.one).inverse;

    Please could you advise on how to solve this issue.

    Many thanks for your help and merry Christmas n_n

    EDIT: I made a little demo using Unity 2018.2.3f1 (64-bit) in Windows 10. I shared the download link in a conversation with you. Alternatively please let me know how I can share it with you (bear in mind it includes your dissolve shader asset)
     
    Last edited: Dec 29, 2018
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Problem is not with
    Matrix4x4 trs = Matrix4x4.TRS(m_DockBlender.position, m_DockBlender.rotation, Vector3.one).inverse
    it sends objects world Position and Rotation to the shader (in your case m_DockBlender object). To make sure it works correctly disable your custom animation and manually rotate and change parent object position (even in Play mode) - see it works and Box mask data is correct.
    Problem begins when animation hits. How it overrides or effects child objects world Position and Rotation, and why they are not correct after animation, I can not say.



    VacuumShaders - Facebook Twitter YouTube
     
  21. Cris_2013

    Cris_2013

    Joined:
    Nov 25, 2017
    Posts:
    13
    Thanks a lot for your fast reply, your message help me figure it was a Unity issue and not from the shader.
    Just in case anyone has a similar issue I fixed by changing the Update Mode in the animator component to 'Animate Physics' (any other option has the wrong behavior on the shader)
     
    Arkhivrag likes this.
  22. DanZ91

    DanZ91

    Joined:
    Sep 29, 2016
    Posts:
    2
    local XYZ mask for material on particle system doesn't work.
    its work like world XYZ mask :(
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Particles are generated directly in world space by Unity, they do not have 'local' position.



    VacuumShaders - Facebook Twitter YouTube
     
  24. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    48
    Hey there and thanks for such a great asset
    But i think its not working at least on 2017.1.f1 when i import package it gives many errors (unknown shader channel count) and whenever i play a scene theres too many missing prefabs on my hierarchy
    Except the demo files from black smith they play nice but again the main reason for using this asset (dissolve effect ) is not working its only a wood house and some lights around it
    Check the attached file bellow
    Error.png
    Can anyone help please?
     
    Last edited: Jan 2, 2019
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Seems you are using Unity 5.6 version of the asset.
    Update Unity to 2017.4.10 (or later version) and re-download asset.



    VacuumShaders - Facebook Twitter YouTube
     
  26. medv007

    medv007

    Joined:
    Apr 10, 2013
    Posts:
    1
    Last edited: Jan 8, 2019
  27. sam-vidler96

    sam-vidler96

    Joined:
    Jan 9, 2019
    Posts:
    4
    Hey,

    I'm sure I'm just doing this wrong but I am running into a small issue to do with the Mask Count variable.

    I have a standard shader material (for example lets use standard metallic) with a masking type of box / plane / cylinder and a count of two/three/four. The material is assigned as a material on the respective mask controller object component for whatever type I am using. Whenever I enter play mode, the count will always reset to one. I can manually set the count both in the editor before playtime, and during playtime to be whatever I want and it behaves fine. It is only when entering playmode that the count is reset.

    I can remove the material from the mask controller object component, and the count will not be reset. I'm fairly sure I am stupid and doing something wrong here, but I just can't figure out what.

    I've attached a small gif to illustrate this. Any help would be appreciated.
     

    Attached Files:

  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Can not answer now, need to make some research.


    Seems some of the script you are using in the scene is resetting mask count inside material.
    Check which one sets _DissolveMaskCount to 1.



    VacuumShaders - Facebook Twitter YouTube
     
  29. BabouDev

    BabouDev

    Joined:
    Feb 3, 2015
    Posts:
    13
    Hello,
    I'm trying to get the asset working in LWRP but it won't compile. Sorry if I'm missing something trivial.


    Severity   Code   Description   Project   File   Line   Suppression State
    Error CS0246 The type or namespace name 'LightweightShaderGUI' could not be found (are you missing a using directive or an assembly reference?)


    And sometimes I get an error on this line.

    #include "LWRP/ShaderLibrary/InputSurfaceSimple.hlsl"


    Also may I know what the "VacuumShaders.dll" contains. I wish to use this as an opportunity to learn how to write complex shaders and was wondering if it contains implementation or if its not related to the dissolve shaders.

    Thank you very much for the active support!
     
  30. androidfejleszto

    androidfejleszto

    Joined:
    Dec 27, 2018
    Posts:
    4
    Very nice. Is it mobile friendly?
     
  31. sam-vidler96

    sam-vidler96

    Joined:
    Jan 9, 2019
    Posts:
    4
    Thanks for the reply. The only script in that scene in the gif is your Controller_Mask_Box script. It is attached to the MaskController game object, which is just an empty with no other components.

    All of the other game objects are just simple primitives with no scripts attached. I made that test scene to try and discern what was going on. It is as bare bones as possible.
     
  32. sam-vidler96

    sam-vidler96

    Joined:
    Jan 9, 2019
    Posts:
    4
    I should add as well, that if I remove the shader material (that is applied to those spheres) from the Mask_Controller_Box script, then the count does not get reset to 1 when entering playmode. That is the only place the material is referenced by any script within the scene, and when removing it from that reference, this issue does not occur.

    I've remade that scene and attached another gif to help. Is this a bug?
     

    Attached Files:

  33. sam-vidler96

    sam-vidler96

    Joined:
    Jan 9, 2019
    Posts:
    4
    Alright I've found the issue. Inside all of the Controller Scripts, the count is being set to 1 in void start by this line of code:
    Code (CSharp):
    1. UpdateMaskCountKeyword(1);
    As a band aid I've just commented these lines out for now. No more resetting of the count when entering playmode.

    I'm surprised that no one has brought up this issue before. It seems like it would be a fairly common thing people would be trying to do.
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Update for LWRP 4.0 and 4.6 will be available in several days. Working on it right now.



    VacuumShaders - Facebook Twitter YouTube
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Package includes mobile: Unlit, OneDirectional Light, VertexLit shaders.
    Performance also depends on used effects and there count. For example, shader with 4 dynamic box masks and triplanar noise mapping with enabled Global Illumination is more expensive than simple dissolve with one normal texture mapping.

    Example scene on old Huawei Y330 (scene runs fast (38fps))





    VacuumShaders - Facebook Twitter YouTube
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    My mistake, mask controller scripts are used in example scenes where mask count is controlled run-time from UI, and in Start() function I just set it to 1 (just for safety).



    VacuumShaders - Facebook Twitter YouTube
     
  37. Anti-Ded

    Anti-Ded

    Joined:
    Oct 21, 2017
    Posts:
    10
    I have about 300 materials and i cant remake all of them to dissolve materials. Impossibile to make two or more dissolve effects to object. Sent email week ago and still waiting answer. Want to refund =(

    But it is most beautifull and wonderfull dissolve effect of all!!!
     
  38. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    418
    Would it be problematic to use this shader effect combined with Curved World? Thx!
     
    Last edited: Jan 17, 2019
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Unfortunately I have not received any e-mails from you, or it may lost in spam. You can use Forum as well.

    "I have about 300 materials and i cant remake all of them to dissolve materials"
    - Advanced Dissolve is a shader collection. You have to replace shaders on your materials onto Advanced Dissolve shader.
    If by "remake" you mean integrating Advanced Dissolve effects in custom shader, then I do not advertise such thing here.

    "Impossible to make two or more dissolve effects to object"
    - Not sure I understand what you mean here, try to guess:
    1) If you need multiple dynamic mask objects to dissolve mesh, then with Advanced Dissolve you can use 4 objects simultaneously, main poster on the Asset Store is a proof.
    2) If you mean multiple various dynamic mask types together, like Box mask and Plane, then you are right. Various dynamic mask types can not be used. (will add it to a wish-list for the future updates).
    3) Beside dynamic mask you can use 3 textures (optionally) for dissolve effect and additionally dissolve from MainTexture.
    I tried to implement as much possible dissolve options as I could, but of course, there may be situations where even those options are not enough.



    VacuumShaders - Facebook Twitter YouTube
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    Working on Curved World integration right now.



    VacuumShaders - Facebook Twitter YouTube
     
    christougher likes this.
  41. Anti-Ded

    Anti-Ded

    Joined:
    Oct 21, 2017
    Posts:
    10
    Hello.
    1) I have a player ship. I want it possibile to use teleport shader on at start mission first, second is damage dissolve at some part of the ship, a third is invisibility. And fourth is death.
    2) i can add shader of your dissolve to much of materials, but all of them need to set parametres (

    Is it possibile to convert shader to script like this ?
     
    Last edited: Jan 17, 2019
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    If material needs to be updated in run-time, there is no other way than use script (may be animation) and set parameters from there.
    Check example scenes and controller scripts (Advanced Dissolve\Example And Demo Scenes\Example Scenes\Files\Scripts\Controllers) used there. They update all material parameters you may need.



    VacuumShaders - Facebook Twitter YouTube
     
  43. Anti-Ded

    Anti-Ded

    Joined:
    Oct 21, 2017
    Posts:
    10
    1) Is it possibile to convert shader to script like this without convert materials?
    2) Is it possibile to make several effects types (damage, teleport, invisibility, ...) to one object without lots of scripts?
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    1) There is no way for converting shader to script. It is not possible. Seems you misunderstood something.
    2) It all depends on what you mean in Damage, Teleport and Invisibility, what shader effects you need to have, how they will be updated and so on. Depending on that you may even avoid to use a single script or have lots of them.

    As I wrote above, if material is changed dynamically in run-time, there is only one way to update its parameters - using script.



    VacuumShaders - Facebook Twitter YouTube
     
  45. Anti-Ded

    Anti-Ded

    Joined:
    Oct 21, 2017
    Posts:
    10
    11_by_ginostratolat-d8p0y2f.jpg This is my ship
    AT start of mission i want to use "teleportation" effect on it SNAG-0066.png

    At battle i want to dissolve some objects to show damage on it SNAG-0067.png

    But if it will be destroyed, then i want it to disappear from game area by this SNAG-0068.png

    3 different effects on one object. Is it possibly?
    If it is destroyed, then two effects act on it simultaneously.
     
  46. hongwaixuexi

    hongwaixuexi

    Joined:
    Dec 11, 2017
    Posts:
    757
    Which property should I use in Plane mask controlled scene?
    I want to use material.GetFloat("which one") > =1, to check if the object is 100% invisible or 100% visible. Thanks.
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    This image shows using of dynamic Cone type mask,
    and this is Plane or Axis type mask.

    Only one dynamic mask type can be used at a time. So from those two effects you have to choose only one.


    This effect is achieved using texture blend, and it can be combined with any dynamic mask.



    VacuumShaders - Facebook Twitter YouTube
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,171
    You can not know whether mesh is visible or invisible, shader performs dissolve effect per-pixel on the screen.
    You have to write custom script for checking all mesh vertices to be behind a plane.



    VacuumShaders - Facebook Twitter YouTube
     
  49. Anti-Ded

    Anti-Ded

    Joined:
    Oct 21, 2017
    Posts:
    10
    Damn. Sorry but i want to refund =(
     
  50. hongwaixuexi

    hongwaixuexi

    Joined:
    Dec 11, 2017
    Posts:
    757
    OK. Thanks.