View Single Post
Old 11-10-2018, 04:36 PM   #44
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

holy cow Eli these are some sweet transitions!

Quote:
Originally Posted by Eliseat View Post
wouldn't it be a good thing to have video folders behaving the same as audio folders? I mean, imagine how easy it would be to handle title animations separately from scene transitions etc. It only needed a last instance like opacity to plan and organize everything.
Yes thats what I was proposing, making video folders a bit more encapsulated. Preferable by a pair of functions to query the folder depth.

Pseudo-code:
PHP Code:
folderDepFX GetMyFolderDepth();  // get folder depth of this video processor
folderDepIn GetInputFolderDepth(input_track(0));  // get folder depth of input

folderDepFX==folderDepIn ? (
  
// do stuff
); 
In the meantime I modified the preset so that the user can define the track offsets from the FX to the input tracks by himself.
The default order hasn't changed: video-processor -> background -> foreground -> mask
PHP Code:
// Selective Blender
// v0.2
// blends parts of the foreground defined by the
// grey-level of a reference (mask) into the background
// 
// Default track-order (can be modified by offset parameters): 
// VideoProcessor - background - foreground - mask

//@param1:blend 'blend amount' 1 0 1 0.5 0.01
//@param2:mode 'blend mode' 0 0 19 0 1

//@param4:sub 'subtract?' 0 0 1 0 1

//@param10:offsBg 'track offset bg' 1 1 20 1 1
//@param11:offsFg 'track offset fg' 2 1 20 1 1
//@param12:offsMask 'track offset mask' 3 1 20 1 1

oldCS=colorspace;
colorspace='RGBA';

bg=input_track(offsBg-1);
fg=input_track(offsFg-1);
mask=input_track(offsMask-1);

gfx_blit(bg);

gfx_dest fsMask gfx_img_resize(fsMask,project_w,project_h);
gfx_blit(mask);

gfx_dest fsFg gfx_img_resize(fsFg,project_w,project_h);
gfx_blit(fg);

gfx_evalrect(0,0,project_w,project_h,
    
"a=max(0,min(255,0.2989*sr+0.5870*sg+0.1140*sb));",
    
0,fsMask);

gfx_dest=-1;
gfx_a=blend*(sub?-1:1);
gfx_mode=(sub?1:mode)|0x10000;
gfx_blit(fsFg);

colorspace=oldCS
To realize this layout
Quote:
Originally Posted by wwwmaze View Post
Code:
parent track* b
---background b
---parent track* a (= foreground b)
------background a
------foreground a
------mask       a
---mask       b
one would just have to set the mask track offset of video-processor b to 6. Just count all tracks with active video inputs (items or FX') at the current time.

Not very user-friendly but afaik there's no other choice currently.


Quote:
Originally Posted by Eliseat View Post
Choose the "cheap brightness" effect on it to desaturate and darken it until its nearly black. Then animate the contrast or brightness (extreme settings are possible) to make the transition to white.
Nice tips. You don't need to desaturate though, the preset automatically converts the mask image to greyscale by the equation specified at the bottom of this page: https://www.mathworks.com/help/matlab/ref/rgb2gray.html

You basically just can use another video as mask.
wwwmaze is offline   Reply With Quote