View Single Post
Old 11-06-2018, 08:47 PM   #20
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 115
Default

Quote:
Originally Posted by Eliseat View Post
wwwmaze,

as I see how clear and simple the code for this presets looks like, would it be possible to take the same two inputs but using the second input as greyscale to make the first video transparent depending on the greyscale? This would be the principle of an alpha channel and would be a milestone. Imagine frames and blend modes of all kinds. The possibilities are endless for this. Just create a black and white pattern, use the alpha preset to blend the video depending of the pattern in.

I have no idea how this could work but in my mind it should look like this. Input one is a clear screen, second is the video, third is the greyscale video or image. Maybe the "image overlay" preset or the "chroma key" could help in this case.

Anyway. I'm really, really thankful for your efforts and for Owls contributions too. I think the video thing is way to underrepresented and it would be cool to have a section in the forum to gather information, presets and manual for the video interested people.

Greetings
Eli
Cheers Eli, glad I can help. Is this what you had in mind?
Code:
//@param1:byCl 'bypass clear screen' 0 0 1 0 1
//@param2:byVi 'bypass video' 0 0 1 0 1
//@param3:byMask 'bypass mask' 0 0 1 0 1

//@param5:alCl 'alpha clear screen' 0.5 0 1 0.5 0.005
//@param6:modeCl 'mode clear screen' 0 0 19 0 1

//@param8:csp 'colorspace (1=RGBA)' 1 0 1 0 1

// next (or previous, depending on project settings) video track: clear screen
// track after next track: video
// third closest track: mask

gfx_set(0,0,0,1);
gfx_fillrect(0,0,project_w,project_h);

csp ? colorspace='RGBA';

!byVi ? (gfx_a=1;  gfx_mode=0; gfx_blit(input_track(1)););  // overlay
!byMask ? (gfx_a=-1; gfx_mode=1; gfx_blit(input_track(2)););  // subtraction
!byCl ? (gfx_a=alCl;  gfx_mode=modeCl; gfx_blit(input_track(0)););
I was unsure about the term 'clear screen' and how to blend it into the selective transparent layer so there are parameters for alpha+blend mode.

Last edited by wwwmaze; 11-06-2018 at 09:01 PM.
wwwmaze is offline   Reply With Quote