Closed skeletonbow closed 4 years ago
Can you explain better what you want this to do? How would the filter control rotation around that point when you are defining the exact geometry using corner pin? Also note that filters do not have any way to respond to user input aside from the properties.
The problem I'm trying to solve is basically the ability to attach the corner or edge of a source in OBS to a specific screen pixel or column/row, and have the rotation axis be on the edge instead of through the middle of the source, which would make it easy to rotate/stretch 2D OBS sources in 3D space to fit a specific shape. It's really hard to put into words, but the problem I'm trying to solve is that if you want to take an OBS source and replace a surface in a 2D image it is very hard to align all 4 edges to the surface in the image when rotation happens around the center of the transform.
For example, lets say you have an OBS source that is an image of a desk, with a picture frame or a computer monitor or TV angled in 3D space, not head on. You want to take another OBS source that is the same aspect ratio as the picture frame or monitor, and transplant the OBS source onto that using 3D transform and have all 4 sides properly align with the edges of the monitor or picture frame. It's incredibly difficult to adjust the 3D transform to carefully match the coordinates of the object you're trying to map it onto. If you place the upper left corner of the OBS source at the upper left corner of the monitor/TV/picture frame, and then try to rotate the X or Y axis with 3D transform, it rotates it around the center of the source, so you're no longer aligned with the corner or edge of the monitor or picture frame. The only way to get it to work right now is to rotate the X axis, then adjust X offset to bring it back to the edge that you had aligned, then adjust Y rotate, adjust Y offset again, with every adjustment requiring a corresponding "repair" adjustment.
If it was possible to define the center of rotation of the axes to be other than 0.5,0.5 in the source, say at 0.0,0.0, or other coordinates then when you rotate the X axis, the left side would stay put where you put it with positioning offset, but the right side would swing around in 3D space. If you pinned the upper left corner for example, you could rotate X and Y, and the upper left hand corner would still be aligned with that monitor/picture frame in the underlying 2D image you're trying to map something to in 3D space.
It's really hard to rotate a 2D OBS source in 3D space to fit it precisely into a picture frame, monitor or other rectangular surface basically, because it rotates around the center of the source. What people sometimes do is cut a transparent hole in the background image, then use 3D transform to rotate it "kind of close" to the shape of the hole, and stick the 3D transformed source behind showing through the hole so it is the right shape, but it never quite fits or looks just right. It works as a hack for that particular single use to a degree. If you're trying to 3D transform multiple sources and have them fit side by side without a gap, it is very difficult to align them all as adjusting almost anything will cause the sides you placed together to come apart.
I'm not sure if my description is adequate to convey the problem I'm trying to solve or not, but I could try to make a demonstration video of trying to rotate some things in arbitrary 3D to map them onto a 2D image, and tightly fit side by side without a gap or overlap. It's pretty difficult. :)
You seem to have the wrong idea of what Corner Pin is, however it would indeed fix the problem, just not in the way you thought it would. Corner Pin allows you define the exact location of the four corners in the filters coordinate space (no filter can do things outside of it anyway), which can definitely eliminate the problems faced.
However it is a bad idea to shoehorn this into 3D Transform, as they are not the same in the slightest. You've merged multiple requests into the same feature request, so I assume that the true request is for a Corner Pin filter. It would be nice if you could update the title and description to fit the actual request.
Yeah I was just going based on your previous suggestion to file a separate report for corner pin. I wasn't familiar with that term so assumed it meant what I was looking for. :) I'm reading up to try to get a better understanding first so I know what I'm requesting. :)
This request is obsoleted by issue request #281.
Description
Feature request, to be able to corner pin 3D transforms for ease of attaching a corner or edge to a specific pixel, and having the filter controls rotate around that point for ease of use for placement.
Filed as per the request at https://github.com/Xaymar/obs-StreamFX/issues/84#issuecomment-566268755
Thanks
Checklist