brunoherbelin / vimix

Live Video Mixer
GNU General Public License v3.0
259 stars 25 forks source link

free cropping in F2 view #115

Closed MoorPoor closed 6 months ago

MoorPoor commented 7 months ago

Hello!

Some while ago we had a discussion about cropping in F2 view. I want to bring it up again as I think it would be very nice to have the option to crop freely in F2.

The center cropping is good in itself, but in order to be able to select an exact uncentered section, it is quite impractical to switch back and forth between F2 and F4 in order to find the right combination of section and placement by moving the canvas around.

I`m still a fan of using the frame grippers for both: Resizing and cropping by toggling using a keyboard shortcut or double-clicking on the corners or similar.

what do you think?

brunoherbelin commented 7 months ago

Good to have your input on this ! I started working on #106 to allow distortion of sources in F2 Geometry view : image

So, indeed, this is linked to the cropping and other features of geometrical transformations.

My problem (well, the challenge I impose to myself for vimix) is that I would like to keep things as minimalist as possible, and unified across views. The use of keyboard keys to change the impact of an action is already busy:

This is why for the moment I wouldn't be in favor of using a modifying key for cropping.

And yes, you are right, there is a duplication of cropping mechanisms between F2 and F4 : in essence, cropping could be done only within F4.

What would you say of the following proposal

Mode 'normal' square manipulation image

Mode 'distort' corner manipulation image

Would that work?

MoorPoor commented 7 months ago

wow! cool, that you started with distortion! to switch between normal and distort corners is something I like a lot, actually so much that I would like to have the same switch for cropping, e.g. in the bottom right corner. Sorry for insisting on this, I think it's so nice to have all forms of manipulation in one view (apart from the special cases in F4) it's just much more intuitive, I guess as soon as you see grippers on the corners, you want to use them and expect cropping in addition to resizing.

A simple click or double click in the source itself could also switch the corner tools sets. such as in Inkscape.

but wait a minute, what's the difference between "normal" square manipulation and the resizing tool in the lower right corner?

Another thing, if alt key is used to work aligned to the grid, wouldn't it be consistent to also have the rotation aligned to some angles in combination with alt?

brunoherbelin commented 7 months ago

Good, so we agree on the principle !

Let's keep the discussion about CROP for later, but I heard you.

I agree with the parallel with Inkscape, and was indeed imagining getting inspiration from the two tools: Selector and Node:

Selector tool in Inkscape :

image

Node tool in Inkscape:

image

The first, Selector, would be what is currently done in vimix, and the second, Node, would be the new mode for moving the corners. This could be toggled with this lower left corner button (instead of changing tool in Inkscape). I imagine how i could do that.

Let me start on this and i will come back after testing and facing the reality of implementation 😄 !

what's the difference between "normal" square manipulation and the resizing tool in the lower right corner?

In vimix, currently, the right arrow distortion in lower right corner is a CENTER scaling (like upper right corner is a CENTER rotation and scaling).

alt key is used to work aligned to the grid, wouldn't it be consistent to also have the rotation aligned to some angles in combination with alt?

yes it is: are you using the latest beta ?

MoorPoor commented 7 months ago

sounds good! yes it is: are you using the latest beta ? nope, sorry, I will have a look!

brunoherbelin commented 6 months ago

Please try latest Beta 5465a45dc6476ace9633680017781054c29f0943 :

20231217232906145_vmixcapture

Toggle geometry edit more to crop: It has corner distortion, side cropping and corner rounding. Implementation is not finished and has bugs, but it's usable enough to try and send feedback.

20231217233320646_vmixcapture

MoorPoor commented 6 months ago

ui! Is there a way for lazy people to quickly install the beta version via snap or flatpak?

brunoherbelin commented 6 months ago

Check here; https://github.com/brunoherbelin/vimix/blob/master/flatpak%2FREADME.md

this shows how to create a pre-release flatpak Package

MoorPoor commented 6 months ago

thanks, I like the integration! the switching between the modes seems intuitive enough for me. Pulling the corners out of the frame isn't possible, but I don't think that's a problem in practice corner rounding is fun too.

brunoherbelin commented 6 months ago

Good that you could test !

I like the integration! the switching between the modes seems intuitive enough for me.

I might add a menu item to make it explicit. I hesitate to toggle mode on double-clic, as double clic is already used to show the left panel (in every view); changing the meaning of this action would be a little inconsistent with the rest of user experience. Or am I too picky?

Pulling the corners out of the frame isn't possible, but I don't think that's a problem in practice

In effect, putting a corner outside of the frame requires to scale the source to enlarge it, so that the frame is still encapsulating the whole source. This is not impossible to do, but a bit tricky geometrically (i.e. moving nodes inside while changing the global scale at the same time).

corner rounding is fun too.

There is much more possibilities behind my implementation, and i will follow up later...

MoorPoor commented 6 months ago

I might add a menu item to make it explicit.

do that in addition for savety , but in general I don't like menu as long as everything is accessible at a glance. That's why I like it the way you've integrated it now! its good.

This is not impossible to do, but a bit tricky geometrically

then you better leave it as it is. I think this is clear and no further work is needed.

There is much more possibilities behind my implementation, and i will follow up later...

:D

brunoherbelin commented 6 months ago

image

Implementation is done (Beta >= abdc70121d857f57f98d98d026adb9be4a69dcfd )