Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. 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

► Dynamic Radial Masks ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Mar 6, 2020.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433


    This is support forum for Dynamic Radial Masks, shader extension for Unity for creating spherical projection masks inside shader.






    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 8, 2020
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Reserved.
     
    Last edited: Mar 6, 2020
  3. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    994
    Holy smokes...... I want this!!!
     
  4. Gordian

    Gordian

    Joined:
    Apr 1, 2015
    Posts:
    1
    Jaw, dropped. Wow.
     
  5. freshmeat911

    freshmeat911

    Joined:
    Nov 3, 2016
    Posts:
    77
    Very nice, good job (on my list now ;) )
     
  6. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,394
    Very interesting, very exciting. Does this work with Meadow Environment? Your demo scene kind of looks like it. Not sure how one would process the leaves, but instead of white having black - like coal - and burning down a forest might be an idea if doable :)
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Dynamic Radial Masks can be integrated into any shader, for Meadow Environment I just added simple lerp inside shader for blending Basemap color into White. Same as leaves shaders.
    As for fog and snow particles, Dynamic Radial Masks is used for transparency control in their shaders.



    Amazing Assets - YouTube Facebook Twitter
     
    Rowlan likes this.
  8. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    994
    What about using this with Advanced Dissolve to make villages disappear.
     
    Arkhivrag likes this.
  9. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    994
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Just a reminder that 1 free vouchers is still available:

    ASV-VLF3-YQJR-FKLP-9EGD-796H (redeemed)
    ASV-U74H-NLC7-3WXQ-VRNC-LA7K (redeemed)
    ASV-EYU4-XLAL-AQVA-3NAX-937M (redeemed)

    Note: One numeric symbol (not alphabet) is changed in each voucher.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 10, 2020
    Virtuadreamer likes this.
  11. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    994
    ASV-VLF3-YQJR-FKLP-9EGD-796H not working
     
  12. johaswe

    johaswe

    Joined:
    Sep 13, 2018
    Posts:
    24
    True - i did try that voucher aswell before and now.. still no working voucher sorry..
     
  13. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    994
    I tried all of the combos for that as well lol.
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Directly using ASV-VLF3-YQJR-FKLP-9EGD-796H code had no effect. One numeric number in each voucher was changed and you had to find correct one. For example it may be:
    ASV-VLF3-YQJR-FKLP-1EGD-796H or
    ASV-VLF3-YQJR-FKLP-5EGD-796H or
    ASV-VLF3-YQJR-FKLP-9EGD-791H or
    ASV-VLF3-YQJR-FKLP-9EGD-096H and so on.

    For now all 3 vouchers have been redeemed. Hope they will be used in amazing projects.



    Amazing Assets - YouTube Facebook Twitter
     
    Virtuadreamer likes this.
  15. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    184
    This looks great, and the the idea of more like these sounds very promising.
    Would you be considering releasing them as a bundle / single asset?
    Or you intend to release them only as single assets?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Will be released several single assets.
    And one bundle with all Dynamic Shader Extensions.



    Amazing Assets - YouTube Facebook Twitter
     
    rrahim likes this.
  17. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    184
    Awesome, I'm looking forward to that bundle. I'm always impressed with your work so I'm sure I'll use everything you add to that bundle.

    Also, I'm hoping to purchase this asset soon to be used with splines on a line renderer. I'm still unsure about how to set this up. Is there any demo in the asset which may help?
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Check help file in the very first comment.



    Amazing Assets - YouTube Facebook Twitter
     
    rrahim likes this.
  19. Penhoat

    Penhoat

    Joined:
    Mar 2, 2020
    Posts:
    88
    Hello! Just wanted to say I purchased this and I'll most likely be back here with loads of questions.
    Anyway, amazing stuff.
     
  20. Penhoat

    Penhoat

    Joined:
    Mar 2, 2020
    Posts:
    88
    @Arkhivrag
    Hoping you can help me out! I've followed the tuturial and fine.
    So I have my own water shader (Unity 2019.3, HDRP, Unity Shader Graph), I have your package.
    I would like to simply have your liquid effect like in the the demo scene (tested the scenes in a different project) added to my existing shader, how do I proceed?
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    There are several features inside Liquid shader example you have to pay attention to. It is hand written shader and from artistic point of view it has no limitations, and Shader Graphs have many limitations (+ bugs).
    Not everything that can be done inside hand written shaders is possible using Graph tools.

    But 2 main things you would be interested are 1) vertex displace and 2) normal transformation used in Liquid shader.

    1) Vertex displace you can do exactly the same way as you do with textures, but in this case just use DRM node's output value:
    upload_2020-3-19_21-31-26.png

    2) As for Normal transformation it may be difficult to do exactly the same math inside Graph, but you can try using Normal From Height node and use mask value from the same DRM node for it.
    upload_2020-3-19_21-51-46.png

    DRM.gif

    Note, liquid example shader also uses tessellation and it is not available in Shader Graph. If you need high detail vertex displace you have to use mesh with high vertex density (high poly mesh).



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Apr 8, 2020
    Rowlan and Penhoat like this.
  22. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    213
    That video is impressive.
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Lars-Steenhoff likes this.
  24. davitsedrakian

    davitsedrakian

    Joined:
    Jun 23, 2018
    Posts:
    20
    Heya! Is this working on iOS and Mac os, and also is performant for mobile devices?
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Dynamic Radial Masks works on all devices.
    As for performance - asset creates various shape and style masks, with user controllable options. And instruction count varies from 6 - 20 for different masks.
    DRM is calculated inside loop, and size of this loop is also user controllable. For example in Liquid example scene is used mask with 128 elements.
    Performance directly depends on this loop size. If on PC loop size of several hundred elements may not be problem, on mobile it really will be a problem. So it is up to the user how heavy or light final effect will be.



    Amazing Assets - YouTube Facebook Twitter
     
  26. novikooff

    novikooff

    Joined:
    Sep 24, 2018
    Posts:
    1
    Hello! Cool asset!
    Everything works, but I have a question:
    Can I use the coordinates of an animated object instead of the DRMOnMouseRaycast script, while preserving the animated parameters for liquid simulation (as if the mouse button was always pressed)?
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Sure.
    DRMOnMouseRaycast just generates DRMAnimatableObject on successful mouse click (raycast) and adds it the DRMAnimatableObjectsPool.

    You can generate DRMAnimatableObject from any event you like. Set its properties the way you like and do not forget to add it DRMAnimatableObjectsPool.



    Amazing Assets - YouTube Facebook Twitter
     
  28. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    51
    Hi, I just found this and I have some questions.

    I want to create a fake (no tessellation) hole/carved effect for bullet and ray impacts. Is something like this included in the examples or easy to make through Amplify?

    How much control is there in choosing what will receive the effect? Can I filter by layer or even by tags?

    Can you use other shapes than circles/spheres?

    What conditions must a mesh meet to work with this?

    Is it possible to use a lot of these effects in a scene? I want to be able to "draw" a carved line effect through a mesh and have it stay there permanently.

    Can I use this through Playmaker?
     
    Last edited: May 8, 2020
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Hole/Bullet effect demonstrated in the video is pure Alpha Cutout shader effect.

    Each hole position is calculated using simple Raycast method. Their position and radius data is collected in simple array and sent to the shader, that has DRM module inside expecting this data.

    Based on provided data DRM module calculates mask directly inside shader and it can be used in creating any desired effects. In this case creating Holes.

    DRM module has several parameters that are user controllable. One of this parameter is mask shape and DRM can create several variations of them but all are redial shape (that why it is called Dynamic Radial Masks).
    upload_2020-5-8_23-48-54.png

    Another parameter is mask count. This depends on target device. DRM module inside shader receives data in array format. How much elements your target GPU can send to the shader, same amount mask objects will be generated by DRM module. In the Liquid example scene there are used 128 elements.

    Inside shader you can mix various DRM modules and use their generated masks the way you want.

    As for Playmaker. DRM module is a shader "parameter" (not the script or some kind of plugin or tool). And this parameter is updated from script using Unity API Material.SetVectorArray. Package includes example scripts for collecting various data in array formats and sending them to the shader, but for that purpose you can use any tool or plugin, or write your custom script. Or use Playmaker.

    In the very first post of this thread is available DRM ReadMe file. Check it.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 8, 2020
  30. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    51
    So, that would be yes for most of those questions? :D I'm not that experienced to get all that, I just ask what's possible and learn as I go along.

    So if I got it right, to apply this effect, I need to add some code to the shader the object is using? I'm using 3rd party shaders like Toony Colors Pro and Amplify Shaders. I assume that it will work with those?
     
  31. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    448
    Is this HDRP compatible?
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    DRM supports Amplify Shader Editor using one node integration. As for custom shaders, basic shader programming is required to add DRM there. All steps are described in the documentation.

    All rendering pipelines are supported.



    Amazing Assets - YouTube Facebook Twitter
     
  33. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    85
    does this work with VR? if it does, does it work with Single Pass Instanced and/or Single Pass?
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    This asset is shader extension (not regular drag-and-drop shader) that you manually integrate into your shader.
    So VR compatibility depends on your target shader.



    Amazing Assets - YouTube Facebook Twitter
     
    peeka likes this.
  35. bunnybreaker

    bunnybreaker

    Joined:
    Dec 10, 2013
    Posts:
    5
    I'm really interested in this asset, but have some questions about performance.

    I've read the documentation, and it's great you talk about the instruction cost of certain operations. How do these costs factor in when using multiple objects and materials? Forgive my naive understanding, but does it mean that the mask data can be shared at no extra cost? For example, have a set of 8 masks that are used by multiple materials, how does that scale? Does batching or GPU instancing have any effect?

    Thanks for any light shed on these questions.
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    If you have two meshes with the same material that are batched - mask is calculated only once.
    If you have two meshes with different materials (not batched) - mask is calculated for each material separately.



    Amazing Assets - YouTube Facebook Twitter
     
  37. Game_DevKH

    Game_DevKH

    Joined:
    Jun 11, 2017
    Posts:
    22
    Arkhivrag, can I make rain effect like whether they are game objects, terrain, or player will get wet when it's rain while using any sky system like Enviro for example? Can I also make a character wet when walking into the water?
     
  38. Game_DevKH

    Game_DevKH

    Joined:
    Jun 11, 2017
    Posts:
    22
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    For such rain effect better use particle system.



    Amazing Assets - YouTube Facebook Twitter
     
  40. macube

    macube

    Joined:
    Jul 16, 2017
    Posts:
    10
    Hey,
    thank you for the asset, but can you update the example files to URP ? (All what i see is purple)
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    Yes, it is planned in near future.

    As written in ReadMe file for example scenes: Dynamic Radial Masks is compatible with all Unity render pipelines, but example scenes are built using default (standard) render pipeline as it is the most stable and bug free.

    You can check example scenes even in project using URP or HDRP, just disable (temporarily) SRP from Projects Graphics settings.
    upload_2020-7-17_13-29-5.png




    Amazing Assets - YouTube Facebook Twitter
     
  42. macube

    macube

    Joined:
    Jul 16, 2017
    Posts:
    10
    Okay thank you :)
     
  43. lumeneo

    lumeneo

    Joined:
    Mar 3, 2014
    Posts:
    52
    Please help me convert the shader you use for the Example_11_Script_Liquid to URP!
     
    Last edited: Jul 31, 2020 at 4:27 PM
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,433
    I have replied to the same question here #21. It will help you to reconstruct liquid example shader in URP.




    Amazing Assets - YouTube Facebook Twitter
     
unityunity