Log in

View Full Version : Simple Overlay / Stack


Hotte
10th March 2020, 16:52
This is probably an easy one.

(I thought it should have been simple but I did not succeed using Avisynth Overlay whatever blend mode:)

I just want to cover Clip A with Clip B. B is smaller than A, so A is only visible where there is no B. No blending or whatsoever interference between the two. I was only looking at overlay because it allows me to determine the position of B on A (x,y), but no overlay blend mode I tried worked right.

Thanks.

poisondeathray
10th March 2020, 17:15
This is probably an easy one.

(I thought it should have been simple but I did not succeed using Avisynth Overlay whatever blend mode:)

I just want to cover Clip A with Clip B. B is smaller than A, so A is only visible where there is no B. No blending or whatsoever interference between the two. I was only looking at overlay because it allows me to determine the position of B on A (x,y), but no overlay blend mode I tried worked right.

Thanks.


Default overlay() should work

Overlay(A,B, x=xpos, y=ypos)

The order matters. Overlay(A,B) means A is the base layer, B is on top.

Or is there another problem with the video ? Are they different pixel types ? What formats are they ?

Hotte
10th March 2020, 18:18
Thanks poisondeathray, works. I knew it must be simple.

It sounds stupid, because "blend" (= default) was the only mode I did not try enough. One reason is that I got confused by the example shown at http://avisynth.nl/index.php/Overlay where Clip A is being shaded by Clip B. I did not realize that this example illustrates the blending situation with opacity=0.5. With standard opacity (and the right order of clips of course!) it works as desired.