VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. This seems like a very basic effect, but I was wondering what it's called and how it's achieved:

    Example video

    So, there are two black and white layers (one is text in the example, but that's not vital), and when the blacks overlap, it automatically turns white. I'm sure it's very simple, but off the top of my head I can't even think of a quick way to do this with stills in Photoshop, never mind video. Can anyone point me in the right direction, please?
    Quote Quote  
  2. It's done with masks and layers. A duplicate of the silhouette layer itself, is used a layer mask for the 2nd text layer (the one that "covers up" the original text layer). So whenever the silhouette layer intersects with original text, it will "reveal" a color-inverted layer (in that example, it's close-to-black and not-quite-white, but it doesn't have to be "inverted" or black and white only - it can "reveal" any replacement layer, any color)

    The mask can be a luma mask (white/black shows where the "cutout" areas are), or an alpha mask (a separate alpha channel shows where the transparency or "cutout" areas are)

    Is it clear? Or would a physical example help ?
    Quote Quote  
  3. Thank you very much - you've explained that so clearly that I'm actually embarrassed I didn't figure it out for myself!
    Quote Quote  
  4. It's a simple XOR algorithm. You might be able to find a filter that does it directly. For example, AviSynth's Overlay() filter in "exclusion" mode does it.

    Click image for larger version

Name:	xor.png
Views:	245
Size:	24.8 KB
ID:	31784

    Code:
    function XOR_Overlay(clip v1, clip v2, int xpos, int ypos)
    {
      Overlay(v1, v2, x=xpos, y=ypos, mode="exclusion")
    }
    
    BlankClip(width=640, height=480)
    Subtitle("Big Text", size=100, x=160, y=180, text_color=$FFFFFF)
    small_text = BlankClip(width=320,height=40).Subtitle("A line of small text", size=38, text_color=$FFFFFF)
    
    Animate(0, 100, "XOR_Overlay", last,small_text,100,150, last,small_text,300,300)
    Trim(0,100)
    AssumeFPS(24)
    Image Attached Files
    Last edited by jagabo; 18th May 2015 at 11:16.
    Quote Quote  
  5. Thanks, jagabo - much appreciated. I knew it must be relatively straightforward, but couldn't Google it because I had no idea what it was called.
    Quote Quote  
  6. A minor adjustment on the jagabo's overlay function - you need to set pc_range=true to avoid seeing the outline box of the small layer

    Code:
    function XOR_Overlay(clip v1, clip v2, int xpos, int ypos)
    {
      Overlay(v1, v2, x=xpos, y=ypos, mode="exclusion", pc_range=true)
    }


    Photoshop/AE has exclusion and other layer blend modes that produce similar results that you can play with, with and AE has a channel operator "XOR" . For pure black/white, jagabo's suggestion is a smarter way to do it and will render faster because of fewer layers
    Quote Quote  
  7. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    You can also do it in Aviutl. There the blending mode is called "Difference"
    Image Attached Files
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!