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

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 26th August 2002, 15:16   #1  |  Link
Wilbert
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?
Wilbert is offline   Reply With Quote
Old 26th August 2002, 22:06   #2  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
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.
WarpEnterprises is offline   Reply With Quote
Old 27th August 2002, 13:08   #3  |  Link
Wilbert
Super Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,375
Quote:
If a pixel of clip_back is BLACK then show clip_overlay else show clip_back
Yes, that's what I had in mind. I will try it when I am home. But what I actually what is the following:

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.
Wilbert is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:39.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.