Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Raichiu · Oct 31, 2014 at 12:16 AM · graphicsmask

How to make a cleaning effect similar to the one in Dumb Ways to Die with C#?

We're trying to create an effect where you have a dirty screen and you clean it with a brush controlled by a mouse.

How can we mask out a dirt sprite bit by bit so it looks like the brush is wiping the dirt off?

Here's an example of the same kind of effect in Dumb Ways to Die: http://www.appslooking.com/wp-content/uploads/2013/06/Dumb_Ways_to_Die_2.jpg

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlwaysSunny · Oct 30, 2014 at 10:29 PM 0
Share

This problem is probably best approached through a shader which includes a mask. You can script the ability to affect the mask texture at runtime. If it's low-res enough to remain performant, you can even do it with a virtual "brush" you operate inside a loop over the texture's pixels.

An alternative is a shader which uses vertex color for alpha masking, in which case your real-time edits would be to the vertex colors.

avatar image Raichiu · Oct 31, 2014 at 04:45 AM 0
Share

How would you go about modifying a mask texture at runtime?

avatar image robertbu · Oct 31, 2014 at 05:39 AM 0
Share

Open up the extra comment section of the following answer for some starter code:

http://answers.unity3d.com/questions/614788/is-it-possible-to-make-2d-real-time-coloring-with.html

avatar image MuraliVenkat · Jun 23, 2016 at 07:31 AM 0
Share

@Raichiu - Hi. I am working on the same thing that you said in this post. I created a texture and i successfully cleaned it but i dont know how to check that i finished cleaning everything??

Please help me on that. Thanks in advance.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to make a simple "That's all folks!" effect in 2D? 1 Answer

Non rectangular GUI Mask / Matte? 2 Answers

Mask and Vignette artifacts on Android 0 Answers

Keyword 'void' cannot be used in this context 1 Answer

Fog and Blur not affecting terrain and some trees! 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges