Cropping Output
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Cropping Output
Hi,
Reading the forums, the only thing I could was to use the "Resolution" module but I'm not sure if it''ll do an OBS like crop where some components aren't rendered at all outside of the cropped boundaries.
I've also seen the mask / polygon method.
Are those the only two ways to do this?
Thanks as usual!
Frank
Reading the forums, the only thing I could was to use the "Resolution" module but I'm not sure if it''ll do an OBS like crop where some components aren't rendered at all outside of the cropped boundaries.
I've also seen the mask / polygon method.
Are those the only two ways to do this?
Thanks as usual!
Frank
Re: Cropping Output
Those two ways are fine. Why would you need anything else?
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Cropping Output
Because they aren't the most rapid ones to do. click/drag area would be better but I understand that MMV's UI isn't built for that (or would it be possible maybe a more appropriate question).
Cheers.
Cheers.
Re: Cropping Output
Ah, I understand. There have been some other threads about clicking/dragging in the output window, but generally we don't have it as a high priority.
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Cropping Output
Hi Eric,
I'm trying to do the crop the way we discussed but it doesn't end up being usable in order scenes.
Here's my goal :
I want to cut a camera input (1920x1080) into 4 quadrants and use these independently. Using trapezoid works but when it comes to reusing only 1 quadrant afterwards isn't simple/easy.
Any ideas?
Thanks
frank
I'm trying to do the crop the way we discussed but it doesn't end up being usable in order scenes.
Here's my goal :
I want to cut a camera input (1920x1080) into 4 quadrants and use these independently. Using trapezoid works but when it comes to reusing only 1 quadrant afterwards isn't simple/easy.
Any ideas?
Thanks
frank
Re: Cropping Output
Not sure what trapezoid means.
Masking with a Polygon should work fine...?
Masking with a Polygon should work fine...?
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Cropping Output
Let's put it this way then : How do i use only 25% of a scene's area as an input into another scene? I want to be able to use all 4 25% portions (top left, right, bottom left, bottom right), as independent components.
Even if I hide using polygons or whatever the module, 75% of the scene's undesired portions, when I'll add it to another scene I'll have 75% of the input blacked out but it'll still be there (i need it to become transparent alpha).
Let me know if it's clear.
Thanks
Frank
Even if I hide using polygons or whatever the module, 75% of the scene's undesired portions, when I'll add it to another scene I'll have 75% of the input blacked out but it'll still be there (i need it to become transparent alpha).
Let me know if it's clear.
Thanks
Frank
Re: Cropping Output
I think I understand. So you would just need to scale/translate the desired portion so that it fills the screen.
Re: Cropping Output
I think Frank, you want to 'capture' the 4 corners of your content and play with them something like this.
Trying to interpret what you've said above, I think you've tried to cover 75% of your content with opaque polygons to isolate a portion of the source content. This is not what 'masking' means. Masking means to multiply the pixels in your source content with a mask. In your case this mask would be a white polygon in each corner of the scene. Here is one way to do that using the Mask module:
This would isolate the top-right of the SceneInput for a 16x9 aspect ratio window. There would be a very similar sub-scene for each of the other 3 corners. It is these subscenes that are used in the first screen-shot. One can now split up any content into four separate quarters and manipulate them however you like:
There is an significant issue with this method however. Some (most) effects applied to each corner will be applied across the whole scene output (window/screen). Some (e.g. those in the first screen-shot), thankfully, apply only to the mask area but most, frustratingly, don't (e.g. Invert).
Trying to interpret what you've said above, I think you've tried to cover 75% of your content with opaque polygons to isolate a portion of the source content. This is not what 'masking' means. Masking means to multiply the pixels in your source content with a mask. In your case this mask would be a white polygon in each corner of the scene. Here is one way to do that using the Mask module:
This would isolate the top-right of the SceneInput for a 16x9 aspect ratio window. There would be a very similar sub-scene for each of the other 3 corners. It is these subscenes that are used in the first screen-shot. One can now split up any content into four separate quarters and manipulate them however you like:
There is an significant issue with this method however. Some (most) effects applied to each corner will be applied across the whole scene output (window/screen). Some (e.g. those in the first screen-shot), thankfully, apply only to the mask area but most, frustratingly, don't (e.g. Invert).
-
- Posts: 711
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Cropping Output
Further to Sadler's suggestion, if you want to use effects on your scene quadrants I think you can address the issue he raises by re-masking the output of any "problem" effects with an appropriate white quadrant before any translation/scaling/rotation of your scene quadrant (or by masking with an identically translated/scaled/rotated white quadrant afterwards).
To ensure your scene quadrants are opaque regardless of the alpha of the input scene (or any modification due to effects) you can use the Set Alpha module to set alpha=1 before the final masking.
To ensure your scene quadrants are opaque regardless of the alpha of the input scene (or any modification due to effects) you can use the Set Alpha module to set alpha=1 before the final masking.
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Cropping Output
Thanks to both of you! i'll look into this method over the weekend; Sadler you got exactly what I was intending to do.
My little question is : there is no such module as "top/left" etc modules. I thought of doing the translate thing but I can't wrap my head around the value range.
I always thought 0 to 1 meant 0 to 100% translated but it seems to work on another basis. In my mind translate X and Y by 0.5 was going to cut it but it never really does a perfect cut. In my mind, it should have been scale X2 then take X,Y and trnslate by (0.5, 0.5), (0.5, -0.5), (-0.5, 0.5) and finally (-0.5, -0.5).
Never worked!
Cheers to both of you!
Francis
My little question is : there is no such module as "top/left" etc modules. I thought of doing the translate thing but I can't wrap my head around the value range.
I always thought 0 to 1 meant 0 to 100% translated but it seems to work on another basis. In my mind translate X and Y by 0.5 was going to cut it but it never really does a perfect cut. In my mind, it should have been scale X2 then take X,Y and trnslate by (0.5, 0.5), (0.5, -0.5), (-0.5, 0.5) and finally (-0.5, -0.5).
Never worked!
Cheers to both of you!
Francis
Re: Cropping Output
Actually Frank I'm not even sure you need to crop for purposes of what you're doing.
See my images below. The first one is the full frame (no scaling/translating), the second is with the bottom left corner scaled and translated to fill the window.
Then you can apply an effect to the whole window, and then scale it back down if you need to. Make sense?
The amount you translate is related to the aspect ratio of the video, so if it's 16/9, that's ~1.78, which divided by two is ~.89.
See my images below. The first one is the full frame (no scaling/translating), the second is with the bottom left corner scaled and translated to fill the window.
Then you can apply an effect to the whole window, and then scale it back down if you need to. Make sense?
The amount you translate is related to the aspect ratio of the video, so if it's 16/9, that's ~1.78, which divided by two is ~.89.
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Cropping Output
wow..... the translate values are based on the aspect ratio???????????????? omg.... i thought it was a % of total screen length/height. Wow you just rocked my world!
And yes, that's right, just making a translation/scale on an input is all i need that's perfect. Thank you so much I'll give it a try tonight!
Thanks again
Frank
And yes, that's right, just making a translation/scale on an input is all i need that's perfect. Thank you so much I'll give it a try tonight!
Thanks again
Frank
-
- Posts: 711
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Cropping Output
I find it useful to have Aspect and Aspect/2 as globals, saving the need to put the same calculation into many modules.
As one cannot (yet?) use internals in expressions these are calculated using the internal "Overall Height" to set the value of an additional global "Height" .
Further, as I design nearly all my scenes for projection I need them to be reasonably aspect ratio independent. This is hugely facilitated by aspect globals as opposed to many embedded "magic" numbers.
As one cannot (yet?) use internals in expressions these are calculated using the internal "Overall Height" to set the value of an additional global "Height" .
Further, as I design nearly all my scenes for projection I need them to be reasonably aspect ratio independent. This is hugely facilitated by aspect globals as opposed to many embedded "magic" numbers.
- Attachments
-
- Aspect Ratio.jpg (33.31 KiB) Viewed 10475 times
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Cropping Output
Brilliant as usual Terry! I'll go ahead and create these internal variables as well, so smart.
Cheers, once again, for the amazing tips & insight!
Frank
Cheers, once again, for the amazing tips & insight!
Frank