07-14-2023, 12:24 PM | #1 |
Human being with feelings
Join Date: Jan 2009
Posts: 1,030
|
Vignette with Blur
Does anyone know how to modify the blur presets or the vignette preset so that the center of the video is clear, but the edges are blurry?
I've seen a solution where two tracks with identical videos are used: one track has the blur, and the other has the vignette. Ideally, I would like to achieve the same effect with one track. |
07-15-2023, 07:46 AM | #2 | |
Human being with feelings
Join Date: Aug 2020
Location: Brasil
Posts: 690
|
Quote:
Code:
//girafx:elliptical vignette xfb // by papagirafe // v0.9 //@param radius radius 1 0 4 2 0.01 //@param df "focal dist" 0 0 2 1 0.001 //@param thickness "thickness" 0.1 0 1 0.5 0.001 //@param rota rotation 0 -90 90 0 1 //@param xoff xoff 0 -1 1 1 0.01 //@param yoff yoff 0 -1 1 1 0.01 //@param hdivs precision 100 32 196 96 4 //@param hsrc "hole src" 1 0 20 10 1 //@param psrc "pierced src" 0 0 20 10 1 input_info(hsrc,w,h)?( colorspace='RGBA'; project_w=w; project_h=h; rota=rota*$pi/180; df*=min(w,h)/2; cx=(1+xoff)*w/2; cy=(1+yoff)*h/2; f1x=cx+cos(rota-$pi)*df; f1y=cy+sin(rota-$pi)*df; f2x=cx+cos(rota)*df; f2y=cy+sin(rota)*df; pr=ceil(radius*min(w,h)); pr2=max(0,(1-thickness)*pr); tx=0;ty=1;ta=2; vdivs=(h/w*hdivs)|0; incrx=w/(hdivs-1); incry=h/(vdivs-1); i=0;x=0;y=0; loop(vdivs, loop(hdivs, rad=sqrt((x-f1x)^2+(y-f1y)^2) + sqrt((x-f2x)^2+(y-f2y)^2); xt[i+tx]=x; xt[i+ty]=y; xt[i+ta]= rad>pr?0: rad>=pr2?1*(pr-rad)/(pr-pr2): //*** change the formula here **** 1; i+=3; x+=incrx; ); y+=incry; x=0; ); gfx_blit(psrc); gfx_xformblit(hsrc, 0,0,w,h, hdivs,vdivs,xt,1); ); |
|
07-15-2023, 11:32 AM | #3 | |
Human being with feelings
Join Date: Aug 2020
Location: Brasil
Posts: 690
|
Quote:
|
|
07-18-2023, 02:39 PM | #4 |
Human being with feelings
Join Date: Jan 2009
Posts: 1,030
|
Your code gets very close to what I'm looking for. Thanks!
Here is an example from Photoshop of what I'm going for: https://photoshoproadmap.com/wp-cont...r-gallery1.jpg Your script is a swipe effect, and I am just trying to effect the current track and not swipe to another video track. I don't want any video content from other lanes to be visible. |
07-18-2023, 06:29 PM | #5 | |
Human being with feelings
Join Date: Aug 2020
Location: Brasil
Posts: 690
|
Quote:
https://forum.cockos.com/showthread.php?p=2596391 |
|
Thread Tools | |
Display Modes | |
|
|