Composite with Polygon Mask

Moderator: jsachs

Post Reply
Marpel
Posts: 692
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Composite with Polygon Mask

Post by Marpel »

Latest version.

Compositing with a Polygon Mask, if (to keep the explanation easy) I have a rectangular mask shape, I can move any side (by clicking and dragging an outside boundary line) vertically or horizontally without changing the other three sides (their points do not move), except of course, the adjacent sides lengthen.

However, if one side is not perpendicular to the adjacent sides, and I drag the opposite side to enlarge/reduce the shape, the point which is the shortest distance from the side being dragged "follows" the drag direction. The point which is the farthest from the side being dragged, as expected, does not move.

For example, a rectangular Polygon, if the lower left point is moved up (so the bottom side is angled), and the upper side is dragged either up or down, the noted point moves up or down as well, while the lower right point remains fixed.

Looked in the Help file for clarification, but could not find anything, so am wondering if this is working as intended?

Marv
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Composite with Polygon Mask

Post by jsachs »

Dragging the outer bounding rectangle simple scales the entire polygon either vertically or horizontally. You can still adjust each of the polygon vertices individually to create any polygon you want or add vertices.
Jonathan Sachs
Digital Light & Color
Marpel
Posts: 692
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: Composite with Polygon Mask

Post by Marpel »

Jonathan,

Thanks for the reply.

I guess my confusion arose from the difference between moving the two opposing edges.

If I start with a rectangle shape, which has the bottom side angled up from the lower left, let's say 30 degrees, while the other three sides remain vertical or horizontal.

If I move the bottom side up or down, the shape shrinks or expands but the top edge stays horizontal, the two top corner points do not shift, the bottom edge remains at 30 degrees, but moves up or down.

However, if I move the top side, the angled bottom side changes it's angle (becoming a more or less severe, depending on which direction the side is dragged) and the lower left point moves, while the bottom right corner remains planted in it's location. I would have expected the angled bottom to remain as is, while the top edge just raises or lowers. It seems the two sides change their "habits" depending on which side is moved.

The reason this came up was I was making a mask shape as described, with the bottom angled edge placed exactly where I wanted it, along an angled line in the image. When I moved the top edge up a bit, I found the bottom side changed it's angle/position, causing me to go back to that location and revise it's position back to where I had initially set it.

I can understand an angled side changes if one of the (in this example) vertical sides is moved, but I just didn't understand the need for the angled side to change as described. Not saying it's wrong, just not expected.

Marv
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Composite with Polygon Mask

Post by jsachs »

When you move the bottom edge of the bounding box, the vertex (or vertices) that aligns with the top edge stays fixed and the rest are scaled up or down. Similarly if you move the top edge the bottom vertex stays fixed and similarly for right and left. There are presumably other ways it could be made to work, but that's the way it is implemented. As far as I know, the behavior is analogous for each of the four edges. In your example, the bottom edge does not remain at 30 degrees since it goes to zero as you collapse the rectangle. If you want to scale both horizontally and vertically, drag a corner of the bounding box instead of an edge.
Jonathan Sachs
Digital Light & Color
Post Reply