Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,375
|
layer colordependent transparancy
Suppose I got two clips, a background clip and an overlay clip, and I want to define a new clip overlay(clip_back,clip_over,stuff). I would like to see all the colored (that is anything except the black areas of clip_back) stuff from clip_back and from clip_over in the resulting clip. (So I don't want to see _anything_ of the black of clip_back in the resulting clip.) Is something like this possible?
|
|
|
|
|
|
#2 | Link |
|
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
If I got you I describe it:
If a pixel of clip_back is BLACK then show clip_overlay else show clip_back (the roles of back and over are exchanged in Layer()...) BACK=Mask(BACK, BACK.greyscale.levels(0, 1, 1, 0, 255)) #only black is transparent else is opaque, maybe you have to change 0,1,1 to 16,1,17 when coming from yuy2 Layer(OVER, BACK, "add", 255, 0,0,0) #layer BACK on top of OVER maximal 100%(=255) where mask is transparent. |
|
|
|
|
|
#3 | Link | |
|
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,375
|
Quote:
If a pixel of clip_overlay is BLACK then show clip_back else show clip_overlay. Is that also possible with those masks? ps, I sent you an email. edit: I already figured it out yesterday when trying your script, thanks anyway. Last edited by Wilbert; 28th August 2002 at 09:00. |
|
|
|
|
![]() |
|
|