Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Video Editing/Mangling

Reply
 
Thread Tools Display Modes
Old 07-11-2022, 05:21 PM   #41
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default Image overlay with rotation (non clipping)



This is an improvement on the stock "overlay image" preset that includes non-clipping 2d rotation with adjustable axis of rotation. This preset does not crop the image directly but the thread also include a cropping only preset that feature smooth animation. Just add it on the item fx chain before the overlay preset. Follow here

papagirafe is offline   Reply With Quote
Old 09-19-2022, 05:07 AM   #42
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default polygons & circles framework preset

Here is a preset that emulates the missing gfx_circle() and gfx_triangle():



papagirafe is offline   Reply With Quote
Old 02-13-2023, 06:15 PM   #43
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default Overlay: image w/UYV chroma-key, masking, scaling

I created a much simpler to use chroma-key preset that works like an image overlay with scaling, offset and, very importantl, the hability to mask out unwanted parts of your foreground image. Here the post:

https://forum.cockos.com/showthread.php?p=2642845


https://stash.reaper.fm/46231/green2.png
papagirafe is offline   Reply With Quote
Old 04-13-2023, 09:57 AM   #44
magicchord
Human being with feelings
 
magicchord's Avatar
 
Join Date: May 2006
Location: L.A. Cahleefornia
Posts: 305
Default

Quote:
Originally Posted by joffo78 View Post
Hi evereyone


Does exist an effect that allows to set or change the size of an image with different setting for height and width ?

Thanks
Think i managed !
I tried your code but the video just went black. I must be doing something wrong.

I have a piece of video that was originally 4X3 aspect ratio, but has been stretched out to 16X9. I just want to reduce the image width to create a pillarbox with the 4X3 picture centered in the 16X9 frame. Any help appreciated. Thanks.
magicchord is offline   Reply With Quote
Old 04-13-2023, 01:41 PM   #45
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by magicchord View Post
I tried your code but the video just went black. I must be doing something wrong.

I have a piece of video that was originally 4X3 aspect ratio, but has been stretched out to 16X9. I just want to reduce the image width to create a pillarbox with the 4X3 picture centered in the 16X9 frame. Any help appreciated. Thanks.
A combination of 2 stock preset will do. "Track opacity/zoom pan"->force w/h+ preserve aspect=0. Then "resize to project´s dim".
papagirafe is offline   Reply With Quote
Old 04-13-2023, 04:03 PM   #46
magicchord
Human being with feelings
 
magicchord's Avatar
 
Join Date: May 2006
Location: L.A. Cahleefornia
Posts: 305
Default

Quote:
Originally Posted by papagirafe View Post
A combination of 2 stock preset will do. "Track opacity/zoom pan"->force w/h+ preserve aspect=0. Then "resize to project´s dim".
I see what you are saying. I make the project's aspect 4X3 and then do this with the presets. I will try that. Obrigado.
magicchord is offline   Reply With Quote
Old 04-13-2023, 04:14 PM   #47
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by magicchord View Post
I see what you are saying. I make the project's aspect 4X3 and then do this with the presets. I will try that. Obrigado.
No need to change the project size:just chain them. The first one forces the resize of the source to 4:3 making it actually smaller in width than the project´s. The second take this smaller source and paste it in the middle of the larger project´s frame.
papagirafe is offline   Reply With Quote
Old 06-26-2023, 07:51 AM   #48
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default Better dynamic Image flipper

Flipping an image with gfx_blit() using nagative values is a hack that leaves uncorrectable visual artifacts. Here is better version:
Code:
//girafx:flip
// by papagirafe
//  release 1.0

//@param fh horizontal 0 0 1 0.5 1
//@param fv vertital 0 0 1 0.5 1
fh|=0;fv|=0; 
input_info(0,w,h)?(
  gfx_img_resize(-1,w,h);
  0[0]=fh?w-1:0;  0[1]=fv?h-1:0;  0[2]=fh?0:w-1;  0[3]=fv?h-1:0;
  0[4]=fh?w-1:0;  0[5]=fv?0:h-1;  0[6]=fh?0:w-1;  0[7]=fv?0:h-1;
  gfx_xformblit(0, 0,0,w,h,2,2,0);
);
**update **
I found an old post where an image flipping method is proposed by Justin using gfx_deltablit(). So here is an alternate version:
Code:
//girafx:flip 2
//by papagirafe

//@param fh horizontal 0 0 1 0.5 1
//@param fv vertital 0 0 1 0.5 1
fh|=0;fv|=0; 
input_info(0,w,h)?(
  gfx_img_resize(-1,w,h);
  gfx_deltablit(0, 0,0,w,h, fh?w-1:0,fv?h-1:0,  fh?-1:1,0,0,fv?-1:1);
);

Last edited by papagirafe; 08-11-2023 at 12:41 PM. Reason: new info = new code
papagirafe is offline   Reply With Quote
Old 06-27-2023, 08:37 AM   #49
uncleswede
Human being with feelings
 
Join Date: Feb 2015
Posts: 1,096
Default

Quote:
Originally Posted by papagirafe View Post
Flipping an image with gfx_blit() using nagative values is a hack that leaves uncorrectable visual artifacts. Here is better version:
Code:
//girafx:flip
// by papagirafe
//  release 1.0

//@param fh horizontal 0 0 1 0.5 1
//@param fv vertital 0 0 1 0.5 1
fh|=0;fv|=0; 
input_info(0,w,h)?(
  gfx_img_resize(-1,w,h);
  0[0]=fh?w-1:0;  0[1]=fv?h-1:0;  0[2]=fh?0:w-1;  0[3]=fv?h-1:0;
  0[4]=fh?w-1:0;  0[5]=fv?0:h-1;  0[6]=fh?0:w-1;  0[7]=fv?0:h-1;
  gfx_xformblit(0, 0,0,w,h,2,2,0);
);
Very smooth! Thanks
uncleswede is offline   Reply With Quote
Old 06-27-2023, 09:24 AM   #50
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,271
Default

Quote:
Originally Posted by papagirafe View Post
Flipping an image with gfx_blit() using nagative values is a hack that leaves uncorrectable visual artifacts. Here is better version:
Does it actually work like this? The number 0 should not be a valid variable name for the buffer. The version in your own thread uses a, which makes sense, but this one freaks me out.
ashcat_lt is offline   Reply With Quote
Old 06-27-2023, 11:58 AM   #51
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by ashcat_lt View Post
Does it actually work like this? The number 0 should not be a valid variable name for the buffer. The version in your own thread uses a, which makes sense, but this one freaks me out.
As surprizing as it looks, the version with 0s works the same: it's a trick I borrowed from Justin. The eel2 "table like" shared vector is closer to assembler than to an interpreted language :it takes the form of {base}[offset]. In the first version a[1..n] means {value of a = base}[1..n]; "a", being unitialized, takes a value of 0 which translate to 0[1..n]. Furthermore 0[3] is the same as 3[0]! The interpreter doesn't care if the base is a literal or a variable.

Last edited by papagirafe; 06-27-2023 at 03:50 PM. Reason: typos
papagirafe is offline   Reply With Quote
Old 01-02-2024, 01:48 AM   #52
Trishtrashtrush
Human being with feelings
 
Join Date: Oct 2023
Posts: 44
Default Scripts to generate particles, etc

Some scripts useful to create visualizer videos for music releases:

https://forum.cockos.com/showthread.php?t=286779
Trishtrashtrush is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 -7. The time now is 06:23 AM.


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