Search Unity

Instant Mask: smooth Mask image with semi-transparent [RELEASED]

Discussion in 'Assets and Asset Store' started by myouji, May 8, 2015.

  1. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    title_InstasntMask.png
    [ Instant Mask ]

    Instant Mask is smooth mask!
    It is mask an image on MeshRenderer and SpriteRenderer, UnityGUI, Particle.
    Mask Image(s) cut or made hole shape of other one image.
    It can express a smoothly semi-transparent mask such as anti-aliase and gradation!


    ss02_InstantMask.jpg

    Features :
    • Smooth Mask with Alpha or Grayscale texture
    • Can each adjustable such as Position, Rotation, Size, degree of Masking etc.
    • Up to three mask images apply to one base image in same time
    • Dynamically create a masking image, or can also export masked image file
    • Not increase the excess load, Batches and SetPass(DrawCalls) always in 1 at one object
    • Easy setup and easy use
    • Written in C# and comes as full source code for you





    If you like Instant Mask, can buy from the Asset Store page >>


    If you have questions or want to say an opinion, you can reply to this thread!*
    Of course you may ask a question and assess before you buy!


    For more information after got, please visit the explanation page.

    ご購入後の日本語での詳しい解説ページはこちら


    * 書き込みは日本語で書いてくださっても大丈夫です。

    IMask110a.png

    IMask110b.png

    IMask110c.png


    And then after got, please review in Asset Store page.
    Your praise or point out will be a source of my motivation!
     
    Last edited: Jul 18, 2017
  2. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Last edited: May 20, 2015
  3. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    Next update Version.1.02, you can view the image that using mask shape in a scene.
    You will be easier to understand what state.

    imask102.png

    I think it takes about a week to store examination, I notify here at that time.
    I hope you enjoy it!
     
  4. centralpixel

    centralpixel

    Joined:
    Apr 8, 2015
    Posts:
    7
    Hi,

    when I'm trying to mask image of dimensions 1024x1024 there is huge frame drop (~10FPS). I've also tried this in demo scene from package and there is the same problem. I'm trying to create puzzle game where each puzzle element is masking whole image.
     

    Attached Files:

  5. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, centralpixel.
    Thank you for your writing, I have been able to realize a bug.
    In Version.1.03, this will be fixed. I want you to wait a little.
    In the attached image, it show the FPS in the same conditions in Version.1.03.

    * It is inevitable that process is heavy if you change some value with 'InstantTextureMask'.
    A power is required to generate a big image.
    If the weight of the process prevents the game progress, you can solve by 'InstantShaderMask' with UnityGUI.
     

    Attached Files:

    Last edited: May 22, 2015
  6. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi,there.
    Version.1.02 is Out.
    You can view the image that using mask shape in a scene.

    However, when applied rotation, the image that using mask shape is not appropriate size changed and distorted.
    This bug is fixed Version.1.03.

    kind regards,
     
  7. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi,there.
    Version.1.03 is Out.
    In this version, it has fixed some bugs that has been mentioned in this forum so far.

    In this connection, please tell me if you noticed something or found a bug.
    I will do the best as much as possible.

    I hope you enjoy it!
     
  8. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    Next Version 1.10 should be coming soon.
    In this virsion, with shader and particle, it will be able to apply some masks on one image objegt
    at the same time.

    IMask110a.png

    IMask110b.png

    It is possible to make more expression things that masking image dynamically.
    At that time, I notice here again.

    kind regards,
     
    Last edited: Jun 25, 2015
  9. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    Version1.10 is OUT.

    What changes, please look at the above article.
    And subtlety details, please look at the under image.
    Simply say, you can apply some masks on one base image,
    and do not worry about can not express.



    IMask110c.png

    IMask110d.png


    The explanation page will be updated in a few days about this version.

    I hope you enjoy it!
     
  10. Sir_Starshine

    Sir_Starshine

    Joined:
    Jul 23, 2015
    Posts:
    1
    Hi, I'm having trouble importing new images for either the base or mask. Importing masks is the most bothersome problem right now. Choosing them directly through the Inspector doesn't do anything, and I can't find the part in the code to allow new images.
     
    Last edited: Jul 23, 2015
  11. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, Sir_Starshine.
    Anyway, please check 'Reasd/Write Enabled' in image settings.
    In addition, there is a possibility that can be solved if you look here.

    Sorry, it is difficult for me to identify that cause because your information is rough.
    It seems you reach an impasse in use of Unity basically for now.
    It is necessary more detailed description if this asset not work well.
     
  12. Etienne-L

    Etienne-L

    Joined:
    Apr 24, 2013
    Posts:
    5
    Hi, myouji
    I have a plane I use as floor to my game.
    On this plane Im using a seamless texture repeating this tile texture 3 times on X and Y covering the entire floor with 9 copies of this seamless texture.
    For my project I need to put roles in two places on this floor. Is that possible to do that by using your Instant Mask?
     
  13. heybudgames

    heybudgames

    Joined:
    Jan 28, 2014
    Posts:
    1
    Hi, can you use animated sequence or animation clips using animator for mask?
     
  14. TripleType

    TripleType

    Joined:
    Jan 17, 2015
    Posts:
    7
    please see the attached file.
    load asset and run...
    why black?

    Unity 5.1.2.p1
    Instant Mask 1.10e
     

    Attached Files:

  15. kbm

    kbm

    Joined:
    Aug 7, 2014
    Posts:
    84
    Hi, would it be possible to create a "scratch card" or "eraser" effect with this Asset? I have a source image (a sprite) and I want to "scratch" away parts of it when I click.

    Is it possible to apply multiple "cut out" masks to one object?
    Also, would it be possible to apply a mask with e.g. 50% opacity and then apply another one with 50% and it would add up to 100% opacity (see image)?

    Basically, I need an effect like in the image below:



    If this is possible, is there a demo or a video or something so I could see the effect in action? I would really appreciate it! Thanks!
     
    Last edited: Aug 12, 2015
  16. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    Sorry, reply is a little late because it is long vacation week now in my country.
    I did not notice even 24hour Sale of my asset!

    I am going to reply in turn, please wait a little more.
     
  17. inas

    inas

    Joined:
    Aug 2, 2013
    Posts:
    47
    Hi, i got similar result with @TripleType

    On sample scene, shader mask doesnt work at all. I am on Unity 5.1.1 with Android target
     
  18. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, Etienne L.
    You want to be like the under image?
    It's possible using mask with shader.
    The position of the masks are determined with Tiling and Offset it is same as a texture on shader basically,
    so it is need some calculation for adjustment of the exact position of masks.
    (The calculation is also same as a texture on shader basically.)

    imss04.png
     
  19. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, heybudgames.
    It is possible, but it need a little knack.
    You split the sprite in a regular grid for animation,
    and you set the Tiling and Offset of mask with shader just overlap in each of the grid.
    So It is in a state that the same shape masks apply in each frame of animation.
    However, if you change the part of mask state such rotation, the mask position is displaced from grid.
    In that case, there is a need to write a script like a mask shift to next grid every frame.
    (It might be good to add the script in this asset if some requests comes.)
     
  20. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, TripleType.
    Seemingly shader is not working properly.
    Basic things, import this asset to a new project once more and check again.
    If it will be no good, please try check the package that is attached in under.
    (write after day: the package was already deleted)
    If you will look images properly in that package, I may find the cause by it.
     
    Last edited: Aug 27, 2015
  21. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, inas.
    Please try contents of article just above, you too.
    This asset has just been made recently, so it is not yet enough information of different with my environment.
    I am sorry for troubling you but thanks for your consideration.
     
  22. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, kbm.
    Sorry to have delayed reply, I examine properly and reply in a few days.
    Thank you for your waiting.
     
  23. kbm

    kbm

    Joined:
    Aug 7, 2014
    Posts:
    84
    Hi myouji, thanks for your reply. It's no problem, I solved the problem already, no help needed.
     
  24. TripleType

    TripleType

    Joined:
    Jan 17, 2015
    Posts:
    7
    Thank you for care...
    your attached file.. download and run..
    the same as before.
     

    Attached Files:

  25. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, kbm.
    OK. Because of your quick reply, I will bigin next work.
     
    Last edited: Aug 20, 2015
  26. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, Triple type.
    Thank you for your cooperate.
    I modified the suspicious points and submitted a new version.
    It will be displayed Version1.11 of this asset in the asset store about a week or so.
    Please wait a little and try use that new version.
    And I appreciate if you will tell me it works properly or not.
     
  27. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Version1.11 is OUT.
    From this version, shader is not displayed the setting items in Inspector window.
    They are changed from the inspector window of script.
    (Or change the variable by writing script)

    For Triple type, inas
    Please check the problem has been fixed in this version.
     
  28. TripleType

    TripleType

    Joined:
    Jan 17, 2015
    Posts:
    7
    i'm sorry... the bad news.

    Instant Mask 1.11d
    Unity 5.1.2.p1
    Windows 8.1
    AMD Radeon R9 270X DC2 TOP D5
     

    Attached Files:

  29. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    For TripleType
    Fmm... It seems the shader is not still working properly.
    If there is a definite bug in the shader, Unity should output an error log.
    What is output on the console window when you play the scene?

    And sorry again, please try the under package is displayed properly or not.
    (write after day: the package was already deleted)
     
    Last edited: Aug 27, 2015
  30. TripleType

    TripleType

    Joined:
    Jan 17, 2015
    Posts:
    7
    no message on console window
     

    Attached Files:

  31. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    For TripleType
    There is no clue on my side where is wrong point now, so it is the only way to look for clues
    I have you try some of the files that the stepwise changed in your environment.
    I hope to support you individually by exchanged email because the files include source code.
    If you are okay, send an email to the following address.
    myoujing4@gmail.com
     
  32. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    It will be released Version1.11e of this asset in the asset store about a week or so.
    This version fixed that the shader did not work well depending on some environment.
    If this asset have not been drawing the part of demo in your environment until now,
    please try this virsion.

    I hope you enjoy it!
     
  33. TripleType

    TripleType

    Joined:
    Jan 17, 2015
    Posts:
    7
    ver 1.11e

    very good.
    no problem.
    thank you.
     
  34. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, TripleType.
    That's good, and thank you for your reporting.
    I hope this asset help you make a good game!
     
  35. Webjema

    Webjema

    Joined:
    Aug 8, 2012
    Posts:
    13
    Hello!
    Is Unity UI Image supported for masking and invert masking (make holes in sprites)?
    Also could you provide list of supported platforms?
    Thank you.
     
  36. mc-shimada

    mc-shimada

    Joined:
    Mar 17, 2016
    Posts:
    1
    はじめまして。
    早速ですが質問です。
    scroll view のマスクを instant mask を利用して リストの端と端を徐々に消えていくといった事は出来ますでしょうか?
    お手数ですがご返答お願いします。
     
  37. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, Webjema.
    Sorry, I have busied in near a few months, so I was late to reply to you.

    This asset can work in UnityUI with Image or RawImage component
    (such as Button and ScrollBar are made of Image component so those are can be masked)
    and can make holes in sprite.
    But caution point in sprite animation.
    Sprite animation is made the various pieces of one picture, and this mask works to that base picture.

    About platform, this asset is made by using the standard behavior of Unity,
    so it should work on any platform of Unity supported.
     
    Last edited: Mar 23, 2016
  38. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    mc-shimadaさん、こんにちは。
    Unity標準のMaskコンポーネントのように、設置以下のUnityUIを全て一括マスクする挙動を
    アルファ有りで行うといったことを想定しているのかなと思いますが、残念ながらこれは不可能です。
    ただしScroll ViewはImageコンポーネントなどの集合体ですので、この一つ一つのパーツに
    アルファマスクをかけるようなことは可能です。

    しかし現状Unity製のゲームでスクロールUIが徐々に消えていくような場合は、透明~半透明~背景画像に
    徐々に変わるようなアルファ画像をカメラ手前に置くなどがたぶん多いと思います。
    (中に配置したボタンなどの処理も含めて簡単なので)
    この場合のアルファ画像をゲーム内で動的に作ったりといった事もこのアセットの役割になります。
     
  39. roach_779

    roach_779

    Joined:
    Aug 2, 2012
    Posts:
    37
    Hi Myouji,

    This is what I want to do; I want to take one building image and separate it into 5 pieces (object). Each pieces is a stage of the building being built...from ground floor to complete building. Each piece needs to animate separately.

    Can Instant Mask handle more than 3 masks. Is there a method if I want 2 more to a single file or does it has to be a separate file?

    Thanks,
    Eric
     
  40. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, Eric.
    I am sorry if I different understanding, you want two more mask in one target?
    > Is there a method if I want 2 more to a single file or does it has to be a separate file?
    I do not know a little around here, so if my understanding is wrong, I want you to tell me in such simple image.
     
  41. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    Version 1.11h is coming soon.
    From this version, the legacy particle system(Not shuriken) was out of correspondence.
    Because the legacy particle system(Not shuriken) has been determined abolition In the near future by Unity official
    and it has been come out system caution message of this from Unity5.4.

    If you should use still old particle system with this asset, do not apply next version update.
    Best regards,
     
  42. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi,there.
    Version 1.12 is coming soon.

    This version has been added some setting items with shader mask and particle mask.
    And it is added to example that is placed in the demo.
    It has become easy to make the behavior that such as mask moving while expanding or moving while rotating.
    The explanation site has already been written in addition.

    Best regards!
     
  43. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi,there.
    In the coming soon Version 1.12e, the drawing load of transparency on the shader has been improved slightly.
    It should be all right because it is not a new technology, but if you have been bug,
    please tell me in here.

    Best regards!
     
  44. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Does this allow animated masks?
     
  45. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, Superflat.
    Yes, the all setting items can be operated from the outside.
    So you can give the simple animation by the script,
    and if you want to make the elaborate animation,
    you also can it with same way as basic 2D Animation.
     
  46. halfshey

    halfshey

    Joined:
    Apr 26, 2015
    Posts:
    15
    Just bought it and I'm afraid it cant help me with my problem:

    I want to use several masks on one base image to save draw calls. The several masks should work like a combined big mask but I need to animate each one seprately. (What I'm doing is basicalley a robot screen just like in walle: http://area.autodesk.com/userdata/forum/1/15353_hs0ORUrbiuCJvDHiTsUg.png, The background is an image with the blue scane lines. The eyes and in my case the mouth would be masks that i need to animate)

    With this tool I cannot animate the masks... Only position and rotation (which seems to be not working smoothly and using not the center pivot) and I also would need to use scale.

    I thought the masks could be Unity objects just like with the unitys ui mask which I could then animate with the animation tool...
     
    Last edited: Nov 30, 2016
  47. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, halfshey.
    You want to animate the masks, I think you are using the Shader version.
    http://kakatte.webcrow.jp/imask/index_en.html#Shader
    Please look at Mask1Position part.
    Use this, you can change position with pivot.
    If you move with this, you should be able to handle rotation well too.

    Also, all the status of this asset can be manipulated from Animation.
    I think that you can do it with those.
     
    Last edited: Dec 3, 2016
  48. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    The official pricing specification of Asset Store has changed,
    so price is little rising now, but this is ALL asset in store recently.
    I already applied for the price internally deducting that calculation,
    so this asset should be the original price after a week or so.
    Best Regards,
     
  49. myouji

    myouji

    Joined:
    Mar 7, 2014
    Posts:
    119
    Hi, there.
    As mentioned above, I set the price to almost the original price.
    It corresponds to the fact that official specification of Asset Store changed to add VAT on display price.
    I made to the original price by including VAT in price, so this asset is substantially price down.
    Best Regards,
     
  50. idavida

    idavida

    Joined:
    Nov 12, 2012
    Posts:
    33
    Hello there,
    I'm on the hunt for a semi transparent solution that masks preferably using Unity UI sprites, but if it would work on a mesh render thats ok. Yours works perfectly, however I'm also wanting to use an image sequence masking a render texture. Is using a render texture possible in Instant Mask as I can't seem to enable read/write on a Render Texture in Unity?
     
    Last edited: Jan 13, 2017