12-17-2018, 01:22 AM | #1 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Zoomed images moving to roughly
Hi,
I noticed that zoomed images are unable to pan smoothly thru the screen. While I was working on a simple slideshow to demonstrate nearly all possible transition types in Reaper I got stuck by this problem. At first I thought its kind of a parameter problem, that the values of the automation only are stepped because of the coarse parameter dial resolution. But it seems more like a magnifying effect as if the vertical and horizontal pan gets zoomed with the image what makes the little steps visible. The weird thing is, not only the movement in one direction looks chunky it also happens that the images jumps for one pixel or a certain step in another direction and back. Here is an example: The chunky movement is not only from the 10 frames per second. The video looks nearly then same. The problem is more the left/right/up/down micro movement. Here the video: https://mega.nz/#!C2pUTabS!rPStu-TrL...PzidghcvBZralQ I have no idea if this is a preset problem as it happens in the default Opacity, zoom, pan preset as well as in the Essential video controls from Jon. Or if this is a general problem with the automation resolution. Maybe its to rough for this kind but okay for audio? You can recreate this problem by zooming an image to 1.5 and slowly panning it in both directions. You would say that zooming this high should be avoided but sometimes its necessary to do so. Any idea of how to fix that? Many thanks Eli Last edited by Eliseat; 12-17-2018 at 01:30 AM. |
12-17-2018, 10:44 AM | #2 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
Hmm perhaps try decreasing the automation step size via the //@param lines?
|
12-17-2018, 11:38 AM | #3 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
I will make further tests to see what its all about.
|
12-18-2018, 12:44 AM | #4 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
So it happens if you pan and zoom at the same time. Even slightly zooming leads into little jumps. I tried (hopefully right) to decrease the step size but this doesn't change anything.
For my understanding the resolution of video automation always should happen with maximal possible resolution/sub-division independent from the parameter dial resolution. And it seems this already is the case. But for some reason the zoom and pan coordinates don't fit to each other. Maybe something gets round down? Take a look at this example: Same set up of an image getting moved and zoomed. Once with default preset. Once with decreased step size preset. This jumping movement also gets rendered. I will make a further test if it also happens with video. |
12-18-2018, 08:46 AM | #5 |
Human being with feelings
Join Date: Jul 2013
Location: Edmonton, Alberta, Canada
Posts: 258
|
I am also having the same problem with test sizing and zooming especially at the beginning and ending of this video.
https://youtu.be/qFhoFabeUCU Licecap view: https://drive.google.com/open?id=13y...aTWrqLkO2UcbFJ Ron L
__________________
Ron L, i7 laptop x64, Win7pro/x64(dual boot), 7200rpm hd, 2 ext. hd, Scarlett 2i4, Event 20/20 audio monitors, 1 ext. video monitor, Novation Launch Control XL, REAPER x64, Sonar Platinum Last edited by rluka; 12-19-2018 at 01:30 PM. |
12-18-2018, 08:52 AM | #6 | |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Quote:
Greetings Eli BTW: Nice and crisp sound, lovely melody. Like it! |
|
12-18-2018, 10:23 AM | #7 |
Human being with feelings
Join Date: Jul 2013
Location: Edmonton, Alberta, Canada
Posts: 258
|
Off topic: Do you think I should roll off some of the brightness ?
__________________
Ron L, i7 laptop x64, Win7pro/x64(dual boot), 7200rpm hd, 2 ext. hd, Scarlett 2i4, Event 20/20 audio monitors, 1 ext. video monitor, Novation Launch Control XL, REAPER x64, Sonar Platinum |
12-18-2018, 08:23 PM | #8 |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
It really looks like its jumping backwards in this gif but I'm having problems to reproduce that.
Code-wise there's something which rounds the zoomed image dimensions to numbers that are divisible by 2 (5 becomes 4, 123 becomes 122 etc.). Not completely sure what this does (let the image stay centered?) but do you see any improvements concerning the backwards jumping if you remove the "&0xfffe" part from these lines (line 33 and 34)? Code:
dw = (project_w*z)&0xfffe; dh = (project_h*z)&0xfffe; (btw enabling filtering makes edges in the image look much more smooth) Last edited by wwwmaze; 12-18-2018 at 09:20 PM. |
12-19-2018, 12:58 AM | #9 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Hi wwwmaze,
I don't have these lines as I'm probably using a different (optimized) version from a dev. The corresponding code looks like this: Code:
dw = (project_w*z)&-2; dh = (project_h*z)&-2; For me this was a serious drawback in the whole concept of video/image editing as it makes it nearly impossible to do simplest tasks. And I was just wondering why I never discovered it before. This is what it looks like now: The jumps are gone. But I'm not sure if those steps are right. And in rluka's example you can see in the beginning that the movement seems to be smooth while the zooming makes kind of stepped progression. This looks weird. I will make further tests. Many thanks for your help. BTW: rluka, I actually can't listen to your mix with my studio headphones as they are broken. For me it sound great over Bluetooth. |
12-19-2018, 01:11 AM | #10 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Here is what I mean:
In other video apps those scaling and moving updates happen in every frame. In Reaper it doesn't just look like its stepped. It is kind of. Or could there be something wrong with my thoughts? I'm not sure if I make a mistake supposing the motion updating in every frame. But doesn't it need to do so? At least it feels like that. Greeting Eli |
12-19-2018, 10:23 AM | #11 |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
I really think the issue of the image jumping back is a bug in the video-processor code. If anybody wants to reproduce it, it's much more noticeable if you set video size to something ridiculously low in project settings, like 20x20.
But I can't figure out why it's happening. Removing the "&0xfffe" or "&-2" part (kind of the the same thing) of lines 33 and 34 solves it even though it makes zooming not exactly symmetrical. The issue of zooming appearing to be stepped could be caused by limitations of gfx_blit (which can take only discrete values) and may be improved by filtering frames over time but it probably reduces the image sharpness. |
12-19-2018, 01:35 PM | #12 | |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
Quote:
Basically it's just a tiny mod of Justins "show motion- subtract last frame" preset: PHP Code:
You can increase the effect by duplicating the preset. EDIT: updated to set preferred video size to size of input Last edited by wwwmaze; 12-19-2018 at 04:10 PM. Reason: updated to set preferred video size to size of input |
|
12-19-2018, 02:17 PM | #13 | |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
Quote:
The reason for &-2 / &0xfffe is to make all pixel offsets even, because with YV12/YUY2 and subsampling drawing at odd offsets can do odd things. Maybe those are unnecessary and unhelpful though. |
|
12-19-2018, 02:49 PM | #14 | |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Quote:
I will take a look if this can be analyzed a bit more in detail. Maybe I should zoom and pan for 10% with linear interpolation or something like that. But thanks to both of you, for making some thoughts about it. Good night. Eli |
|
12-19-2018, 03:30 PM | #15 | |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
Quote:
But sorry for the blunt question, are you sure offsetting only to even indices even works in the preset? (try setting video size to something very small in video settings). |
|
12-19-2018, 03:37 PM | #16 | |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
Quote:
are you sure you're seeing this with rendered videos? It's like you describe here too but only while playing the video not after render. See this example for an extreme setting (setting video size to 1000x1000 and using A LOT of chained motion blur effects) for a rendered gif: |
|
12-21-2018, 10:02 AM | #17 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
wwwmaze, this looks quite smooth. But its without panning.
Anyway, this motion blur is great. (And my post is kind of off topic.) I figured out how to change the alpha to make it more subtle but for some reason it reacts to sensible. Even the slowest motion gets a lot of last frame blending what would be good for the slow zooming example in your post but is to much for a real application. Is there a way to decrease the distance of the blends or even to make a slower reaction? So it increases the blur later at higher speeds but not so much in slower? Look at this example: There are two cycles. One with clean motion, one with motion blur 0.1 alpha. This looks almost perfect but as you see, it reacts just not fluidly or dynamically. Its more like a linear alignment of motion blur distance what doesn't look naturally. Does it need an algorithmic adaption? Have no idea. I know you did this little gem just to show how to even out the zoom issue. But this has so much potential to rock the Reaper video world ... |
12-21-2018, 10:14 AM | #18 |
Human being with feelings
Join Date: Jul 2013
Location: Edmonton, Alberta, Canada
Posts: 258
|
[QUOTE=wwwmaze;2072302]Hey Eli,
are you sure you're seeing this with rendered videos? It's like you describe here too but only while playing the video not after render. See this example for an extreme setting (setting video size to 1000x1000 and using A LOT of chained motion blur effects) for a rendered gif: Is there anything here that I can apply to fix my choppy text. Ron L
__________________
Ron L, i7 laptop x64, Win7pro/x64(dual boot), 7200rpm hd, 2 ext. hd, Scarlett 2i4, Event 20/20 audio monitors, 1 ext. video monitor, Novation Launch Control XL, REAPER x64, Sonar Platinum |
12-21-2018, 01:54 PM | #19 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
Try this preset, which lets you control the top/left position of the image with parameters, and has a better size control:
Code:
// Track opacity/zoom/pan //@param1:opacity 'opacity' 1 //@param2:zoom 'scale' 0 -2 2 0 .01 //@param3:xoffs 'X position' 0 -2000 2000 0 1 //@param4:yoffs 'Y position' 0 -2000 2000 0 1 //@param7:filter 'filter' 0 0 1 0.5 1 //@param8:clear 'clear bg' 1 0 1 0.5 1 //@param9:force_w 'force width' 0 0 2600 1024 2 //@param10:force_h 'force height' 0 0 2600 1024 2 //@param11:paspect 'preserve aspect' 1 0 1 0.5 1 (bg_img=input_ismaster() ? -2 : input_track(0)) ? ( force_w &= -2; force_h &= -2; force_w && !force_h ? force_h = (force_w * project_h / project_w)&-2; force_h && !force_w ? force_w = (force_h * project_w / project_h)&-2; force_w>0 && force_h>0 ? ( project_w=force_w; project_h=force_h ); w = opacity < 0.01 ? 0 : opacity > 0.99 ? 1 : opacity; gfx_blit((w < 1 || clear < 0.5) ? bg_img : -2,1); w > 0 ? ( gfx_mode = filter>0.5 ? 256 : 0; gfx_a=w; dw = (project_w*10^zoom)|0; dh = (project_h*10^zoom)|0; gfx_blit(0,paspect, xoffs|0,yoffs|0,dw,dh); ); ); |
12-21-2018, 04:45 PM | #20 | |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
Quote:
Could it be that you set "gfx_a=0.5" in line 11 to something low? You would need to set it to something high if you need more opacity for current frame. I dont know, could be the blur too, which is super primitive, just averaging 2 frames. |
|
12-21-2018, 10:18 PM | #21 | |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Quote:
Great. How embarrassing can it get? Anyway. What I wanted to say in the first place was: This motion blur is amazing. And if it would react more naturally to motion (less in slow movement) it would be stunning as it doesn't need a lot of cpu and could be used to cinemize any motion/movement of text, image and graphic objects. |
|
12-21-2018, 10:18 PM | #22 | |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Quote:
|
|
12-22-2018, 07:31 AM | #23 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Okay, to demonstrate whats happening I firstly tried to demonstrate whats going on by comparing Reapers video scaling/zooming to the master of video editing: Premiere Pro
drum roll ... here the result: There is no noticeable different! Scaling as an separate process just works as it should work. Examples: Premiere scaling only Reaper scaling only BUT then I compared another set up. Scaling AND moving. That's where I found out the step like motion when I tried to make a slideshow. So I set up a scene with a little box moving a bit and scaling a bit. And here you can clearly see the poodles core. Premiere has no problem showing a smooth result while Reaper shows the discussed problem without any sense of shame. Examples: Premiere scaling and moving Reaper scaling and moving (see the little jumps) Justin, I also tested your alternative scaling preset. But as long as scaling and moving come together, those little jumps still appear. It seems that Premiere pro also has some problems with scaling and moving at the same time but it smooths the motion kind of so it doesn't show up like hard little steps rather then soft wobbles. Last edited by Eliseat; 12-22-2018 at 07:36 AM. |
12-22-2018, 03:17 PM | #24 | |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
Quote:
(btw Eli all 4 links seem to link to the same folder) |
|
05-06-2019, 07:11 AM | #25 |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,268
|
I can't get smooth zooming.
Using Track opacity/zoom/pan - video processor filter set to 1 animating zoom parameter with envelope here are some examples small cropped gifs(captured from exported file from video player) are 25fps and I see them as I see the full exported mp4 25fps videos they seem like low framerate but the exported videos look the same. That is the problem. The only one that looks like 25fps is the last one with a big zoom parameter, but it still wiggles a bit. Tell me which one do you think is smoother and if this could be solved. the image is a cookie.. because.. why not.. and it has a resolution of 3000x1920. Project settings are
zooming in a bit and project settings 640x480 resolution same zoom move but changed project settings 1920x1080 1920x1080 small zoom zooming from -9 to -6 1920x1080 big zoom zooming from 5 to 8 |
05-17-2020, 02:00 PM | #26 |
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
Was there any resolution to this? Since it suddenly got quiet a year ago, I assumed this had been fixed... but I'm seeing it now....
Of course, I am doing no arithmetic gymnastics in my code: Code:
// 'name' [defval minval maxval centval step] //@param 1:opacity 'Opacity' 1 0 1 0.5 0.01; //@param 2:zoom 'Zoom' 1 1 5 2.5 0.05 //@param 3:x_offset 'Vert Pan' 0 0 1 .5 0.01 //@param 4:y_offset 'Horiz Pan ' 0 0 1 .5 0.01 //@param 6:percent_y 'Top' 0.0 //@param 7:percent_x 'Left' 0.0 //@param 8:percent_h 'Height' 1 0 1 .5 0.01 //@param 9:percent_w 'Width' 1 0 1 .5 0.01 //@param 11:fine_y 'Top-fine' 0 -1 1 0 .01 //@param 12:fine_x 'Left-fine' 0 -1 1 0 .01 //@param 13:fine_h 'Height-fine' 0 -1 1 0 .01 //@param 14:fine_w 'Width-fine' 0 -1 1 0 .01 //@param 16:preserveAspect 'Preserve Aspect' 1 0 1 0 1; img1=0; img2=input_track(0); gfx_blit(img2); input_info(img1,iw,ih); fine = .01; original_w = iw; original_h = ih; //convert percents to pixels dest_x = (percent_x + (fine * fine_x)) * original_w; dest_y = (percent_y + (fine * fine_y)) * original_h; dest_h = (percent_h + (fine * fine_h)) * original_h * 1.5; dest_w = (percent_w + (fine * fine_w)) * original_w * 1.5; src_w = original_w / zoom - .01; src_h = original_h / zoom - .01; //todo: limit pan. when zoom is 1, it should be zero x_pan = x_offset * zoom ; y_pan = y_offset * zoom ; // convert pan(0,1) to a pixel value... src_Left = (src_w * x_pan) + 1; src_Top = (src_h * y_pan) + 1; gfx_set(1,0,0,opacity); //(bgc,bgc,bgc,opacity); gfx_fillrect(0, yt, project_w, txth*(1+border*2)); gfx_mode = 256; //HQ filter always on //gfx_blit(input,aspect,x,y,w,h,srcx,srcy,srcw,srch); gfx_blit(img1,preserveAspect, dest_x, dest_y,(dest_w)|0,(dest_h)|0, src_Top,src_Left,(src_w)|0,(src_h)|0 ); |
05-17-2020, 04:26 PM | #27 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Hi Woodslanding,
its nice that you tried to find a way, but it does not work. You can't get pan and zoom at the same time smooth. Even with the finest course. It seems there is a bug or a misconstruction which doesn't allow pan and zoom at the same time. And its a really big bummer because I wasn't able to use Reaper for my videos since I've found this out. Anyway. I hope this gets fixed or someone finds a solution. I guess its not a big deal. Sometimes its just know how which is needed. The same thing happened with blur when someone posted an interesting link to a paper where he pointed to a method with a more natural blur effect. Since than we have perfect blur in the video processor. Thanks Eli
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
|
05-17-2020, 06:57 PM | #28 |
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
I guess I will file a FR?
|
09-09-2020, 03:21 AM | #29 | |
Mobile
Join Date: Jan 2006
Location: London & São Paulo. Hardcore commercial REAPERite
Posts: 1,669
|
This is fascinating. I feel like I've come up against this a few times and not realised that was the case - pan and zoom together being the issue.
Not sure what to FR to suggest it being fixable though. Quote:
__________________
Proudly using REAPER exclusively for... * Media and event music composition & production, sound design + auto-processing at Qsonics.com * Broadcast branding, promos, education & training and narration voice-overs at DrewWhite.com |
|
Thread Tools | |
Display Modes | |
|
|