Old 07-08-2021, 02:08 PM   #1
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default Simple 3d projection of 2d video?

Hi!

Has anyone found a way to make a simple 3d projection video processor preset?
(The cube is there for demonstration only)
Attached Images
File Type: jpg 3d mapping.jpg (61.8 KB, 395 views)
papagirafe is online now   Reply With Quote
Old 07-09-2021, 12:37 PM   #2
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

As far as I know there is no 3D projection out there.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 07-11-2021, 04:53 PM   #3
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

I guess someone (me included) would have to decipher the "panoramic" presets. My understanding so far is that we only need to change the formulas of the transformation matrix. Easier said than done...
papagirafe is online now   Reply With Quote
Old 09-12-2021, 06:12 AM   #4
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Do any of the gfx functions allow projection onto a trapezium/trapezoid?

As far as I can tell, gfx_deltablit only projects onto parallelograms (with curved sides if the optional parameters are used).
juliansader is offline   Reply With Quote
Old 09-12-2021, 01:29 PM   #5
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by juliansader View Post
Do any of the gfx functions allow projection onto a trapezium/trapezoid?

As far as I can tell, gfx_deltablit only projects onto parallelograms (with curved sides if the optional parameters are used).
You are right, I made a simple test preset with almost all deltablit parameters to get some understanding of this esoteric function. Results are difficult to predict but you can eventually get the result you are looking for (almost!).

Here is the code inspired from "Image: Overlay"
Code:
//Overlay: DeltaBlit image
//@param1:zoom_x 'alpha' 1 0 1 0.5 0.01
//@param2:zoom_x 'zoom x%' 100 0.1 400 100 0.1
//@param3:zoom_y 'zoom% y%' 100 0.1 400 100 0.1
//@param4:paral_x 'paral x' 0 -4 4 0 0.01
//@param5:paral_y 'paral y' 0 -4 4 0 0.01
//@param6:curve_x 'curv x' 0 -4 4 0 0.01
//@param7:curve_y 'curv y' 0 -4 4 0 0.01

//@param9:srcx 'src off x' 0 -10 10 0 0.001
//@param10:srcy 'src off y' 0 -10 10 0 0.001
//@param11:dstx 'dst off x' 0 -10 10 0 0.001
//@param12:dsty 'dst off y' 0 -10 10 0 0.001

//@param14:degr_ax  'alpha dx' 0 -10 10 0 0.01
//@param15:degr_ay  'alpha dy' 0 -10 10 0 0.01

// formules magiques
zoom_x/=100;
zoom_y/=100;
project_wh_valid ?  (w=project_w; h=project_h;) : input_info(0,w,h); 
bgi=input_track(0);
srci=0;

srci != bgi ? colorspace='RGBA';
input_info(bgi,img1w,img1h) && project_wh_valid===0 ?  ( project_w = img1w; project_h = img1h; );

srci != bgi && input_info(srci,sw,sh) ? (

srcx*=sw; dstx*=sw;
srcy*=sh; dsty*=sh;
curve_x/=1000; curve_y/=1000; // attenuation des courbures
degr_ax/=1000; degr_ay/=1000;
gfx_mode=0x10000 | 0x100;
gfx_a=1;
gfx_blit(bgi,1); 
gfx_deltablit(srci, 
              dstx,dsty,sw*2,sh*2,
              -srcx,-srcy,
              1/zoom_x, paral_y,  
              paral_x, 1/zoom_y, 
              curve_x, curve_y,
              degr_ax,degr_ay
              );
);

Last edited by papagirafe; 09-12-2021 at 03:10 PM.
papagirafe is online now   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 12:01 PM.


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