Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Painting holes (with dissolve shader)

Discussion in 'Made With Unity' started by mgear, Aug 9, 2011.

  1. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,999

    Attached Files:

  2. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    This is cool!
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Looks cool but doesn't work on my Macbook Pro (ATI X1600 graphics):

    $nohole.jpg
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,999
    ^ Try to rotate to ball (A/D keys) ?

    (it doesnt draw on backside/inside)
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    A-ha! It's working just fine after all! :)
     
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,999
    Test version 2
    - You can shoot objects through the holes (press space)
    - And fill the holes by holding down LeftShift while painting
    - Sparks fx, when there is something to cut, if there is hole already, no fx.

    webplayer source download:
    http://unitycoder.com/blog/2011/08/10/painting-holes-with-shader-v2-0/

    screenshot: (box went through the plane)
     

    Attached Files:

  7. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,997
  8. zine92

    zine92

    Joined:
    Nov 13, 2010
    Posts:
    1,347
    Cool. Trying it out now. :D Just thinking that maybe can have a paint backface option so that i can plain the backface without turning the sphere all the way to the back. But still very neat. :D
     
    Last edited: Aug 10, 2011
  9. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    Wow this is amazing, you've done a great job with this. This could answer a lot of questions about damaging objects and environment. Im even more impressed that the collider reacts with this plane, just amazing....
     
  10. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    Hi, thanks for sharing, it does look cool and useful
     
  11. mmerlange

    mmerlange

    Joined:
    Jan 22, 2013
    Posts:
    9
    Hi,
    Woaw, I can me only admire how smooth it is (the source is no longer available).
    I gave a try but so fo far from your result...
    - how do you paint please? Do you use setPixels or?
    - what's the magic you used to make objects go through your transparent section? (your own engine or?)

    Thanks a lot and have a good we,
    Michael
     
  12. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,999
    Yes, its just setpixels.

    "Going through" collider
    - when you shoot, it checks the target pixel color, if there is hole, it sets bullet collider as trigger.. :)