10
2011
Painting holes with shader v2.0
mHolePainter v2.0 (just a test/concept demo..)
Using a shader from http://www.unifycommunity.com/wiki/index.php?title=Dissolve_With_Texture we can make “holes” in the material using texture. Then just add drawing into that “hole” texture and we have a hole-painter!
Added to this version is:
– You can fill the holes by holding left shift, while painting
– You can shoot objects thru the wall, if there is hole, by pressing space.
– Little sparks fx for the painter
*Note: holes are not actually _painted_ on shader, shader displays the hole where texture alpha is transparent..
Webplayer:
http://unitycoder.com/upload/demos/mholepainter2/
Download:
mHolePainter20.unityPackage
Related Posts
3 Comments + Add Comment
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
This is great! How do you make the brush size smaller? I tried replacing the plane
with a mesh that has more vertices and increasing the resolution of the texture but
it did not work. Thx for your help!
P
Hi, I’m trying to make an erasable texture and the included shader and mHolePainter2.js script have been very useful. However, I’m having difficulty translating the functionality over to C#. I’m not familiar with JavaScript, and I’m still trying to wrap my head around how to use Unity’s Texture2D.SetPixel function. Could you possibly tell me how to convert your script into C#? Thanks very much! It would be tremendously helpful.
You My friend save my life
thank you so much !!!