Search Unity

Can I make video with greenscreen play with transparent background?

Discussion in 'General Graphics' started by Lotias90, Aug 14, 2016.

  1. Lotias90

    Lotias90

    Joined:
    Nov 11, 2015
    Posts:
    30
    Hello fellow developers.

    So I have created a small mobile app that uses the camera to detect videos in the real world. These videos are within a gameobject in the sceen that pops up and start to play when the camera detects them. The videos are quite simple videos of a person talking to the viewer. At the moment the person in the video are on a greenscreen. Is it possible to make the greenscreen transparent within unity (saves editing the videos etc in for example after effects) with a shader or effect? I have seen some people use shaders or similar things?

    So can I remove the greenscreen quickly in easly in Unity itself?

    I also hope that I have posted this in the right section, otherwise move this thread to the right category!

    Kind regards
    Lotias
     
  2. Deleted User

    Deleted User

    Guest

    Yes you can create a shader that detects the green/any color value you choose, and removes it/makes it black/white whatever, put it in the Alpha as a mask, etc etc
     
  3. Lotias90

    Lotias90

    Joined:
    Nov 11, 2015
    Posts:
    30
    I have tried this and it works perfectly! got a shader and made it replace green (as the green screen) with a transparent shader and after some playing with setting I have gotten a satisfying result! Thanks a lot!
     
    Linkruste and (deleted member) like this.
  4. Deleted User

    Deleted User

    Guest

  5. Rodolinc

    Rodolinc

    Joined:
    Sep 23, 2013
    Posts:
    63
    Hi I´m having the same problem here, but don´t know a lot about shaders, would it be possible sharing the shader code?
     
  6. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Linkruste likes this.
  7. khanhabib

    khanhabib

    Joined:
    Oct 11, 2018
    Posts:
    29