Bezier Masks in a Nutshell??

ilmagic wrote on 2/7/2010, 5:14 PM
Hi,
I'm battling to master the Vegas advanced compositing features, but with poor results so far. I've got a compositing software, Visionlab from FXHome, giving me good results , ease of use and all that I need, but it would be great if I could reach my compositing goals from my editing software instead of using a specific application every time I need, for instance, to apply a grade effect to a limited portion of a frame. During my Sony Vegas trialing month I noticed the program had this option in the Pan/Crop window to create keyframed masks during your ordinary editing work, and this is one of the reasons why I preferred Vegas over Premiere. Unfortunately, as I started working on my very first projects, I realised these masks are a bit tricky to manage: they're not simple vector shapes, they're Bezier curves, I'm not familiar with them. If it 's just about creating a static garbage matte, then it all works good. But when I need to create an animated mask, then adjusting the points to make them fit with the object shape turns sometimes into a living nightmare. As I move a point, an unwanted doted line appears changing the curve shape and making hard to close the path. The motion tracking is therefore shaky and unprecise. Is there a workaround to disable this curve option? I would definitely prefer to move the single points freely, like in Visionlab, instead of having these crazy handles appearing suddenly and running all around. Or else, can anybody explain in few words how these curves work?
Thank you.

Comments

rs170a wrote on 2/7/2010, 5:34 PM
Right from Sony themselves:
Discovering the power of Bézier masking

Mike
BudWzr wrote on 2/7/2010, 6:18 PM
Bezier curves are not new to graphics work. BC allow precise drawing in a vector environment like Illustrator or CorelDraw.

A vector is a math concept whereby points are multidimensional and contain information like "How long is the line", "curve analytics", etc. that define the shape in binary data (dynamic) rather than bitmap colors (analog).

Each point has "handles" that allow the user to visually set the path of each segment. The handles grow in length to specify the length of the curve, and twist to apply starting angle.

FXHome software uses a mask similar to Photoshop. It's called a "lasso" mask.

The mask in Vegas is more tedious, but more precise. If you play with it long enough you'll get to appreciate it.

Just click out a rough outline like you would in FXHome and avoid manipulating the points for now until you have time to play around.

Best bet is to use a greenscreen whenever possible on longer "motion masks".

xberk wrote on 2/7/2010, 6:59 PM
I'm not expert in Bezier Masks but I think what you wanting is a way to move the points on the mask without getting the handles for curves so as to "animate" the mask easily.. Click on the PEN tool for this. What I think you do is "deselect" all the points in the mask (right click any point and chose deselect "all") .. Then left click anywhere on the mask outline when no points are selected. This will "select" all the points again but now you can hold down the "ctrl" key and drag a point anywhere to reform the mask (no handles appear). I don't use this so I'm far from solid on this. Try it.

Paul B .. PCI Express Video Card: EVGA VCX 10G-P5-3885-KL GeForce RTX 3080 XC3 ULTRA ,,  Intel Core i9-11900K Desktop Processor ,,  MSI Z590-A PRO Desktop Motherboard LGA-1200 ,, 64GB (2X32GB) XPG GAMMIX D45 DDR4 3200MHz 288-Pin SDRAM PC4-25600 Memory .. Seasonic Power Supply SSR-1000FX Focus Plus 1000W ,, Arctic Liquid Freezer II – 360MM .. Fractal Design case ,, Samsung Solid State Drive MZ-V8P1T0B/AM 980 PRO 1TB PCI Express 4 NVMe M.2 ,, Wundiws 10 .. Vegas Pro 19 Edit

Rory Cooper wrote on 2/8/2010, 1:55 AM
To draw mask hit D on key board draw and close mask then select normal edit tool = white arrow right click on mask deselect all

This will allow you to edit each node separately to select whole mask hold down ALT key and release to edit individual nodes again


ilmagic wrote on 2/8/2010, 2:28 AM
Thank you for your support,
I tried it all but curve handles still appear... it's the trickiest masking technique I've ever seen, I can't really understand why some people in this forum say this is more "precise" than lasso masks in FXHome and Photoshop... to me, they sound a bit like those who say that using text-only browsers is better than using your regular Explorer/Mozilla setup, or that they prefer console statements over graphical interface. I'm planning to buy the new Boris FX plugin for compositing and special effects: do you think this can turn things easier?
farss wrote on 2/8/2010, 2:39 AM
A lasso / magnetic mask is more precise because it uses a bitmap instead of vectors, it can be pixel accurate. The problem with it is for a moving image you cannot do anything with it, you literally have to draw a new mask every frame.
By comparison a Bezier mask is nodes etc. In say After Effects you can have trackers lock the nodes to points in the image, object moves, trackers track the object. It's less precise but way more useful.

Bob.
ilmagic wrote on 2/8/2010, 2:49 AM
Even the masks I'm familiar with are vector-based and enable you to keyframe the node position. But they don't have curve handles changing the whole curve shape every time I move a single point.
Rory Cooper wrote on 2/8/2010, 3:00 AM
You are editing the nodes with the pen …don’t edit with the pen or split edit tangent it will drive you mad … edit with the arrow = normal edit tool
ilmagic wrote on 2/8/2010, 5:03 AM
I'm not editing the nodes with the pen... I know perfectly that nodes have to be edited using the normal edit tool... and as a matter of fact the generated shapes are good for static masking, it's the precise node adjusting that is hard to accomplish, even using the edit tool. However, does anyone know if Boris FX comes with a simpler masking feature?
Thank you
JohnnyRoy wrote on 2/8/2010, 6:31 AM
> However, does anyone know if Boris FX comes with a simpler masking feature?

Boris FX uses a Bezier mask and so does After Effects. If you want to do compositing, you need to get use to using Bezier masks because that is how most compositing apps do masking.

The Pen tool is only for creating points. Once all of your points are created you should never touch the pen tool again. You should be using the Arrow tool. As soon as your mask is closed, select the arrow tool and click on the frame somewhere outside of the mask to deselect the entire mask. This is the critical step. Now you can select individual points and move them (or multiple points) and only have the selected points move.

If you select a line, it will distort the mask. Only click on points.

~jr
Rory Cooper wrote on 2/8/2010, 7:16 AM
Yes it does but if you are battling in Vegas you will battle in Boris because its node operation is the same
Boris is not as user friendly as Vegas


I have masked out flying birds with feathers and feat and many other intricate masks and rotoscoped in Vegas although tedious it works well

If you want to create nodes without curve handles’ when you create a mask just click on the point where you want to create a node = don’t click and drag this will create a node with tangents or handles


BudWzr wrote on 2/8/2010, 7:48 AM
Try just a 4-node square and shape it into a blob by pulling the segments, not the nodes or handles, and fuzz it. Voila "FXHome style".
ilmagic wrote on 2/8/2010, 8:03 AM
I do move points only, but they always end up too far from the object border... it's driving me crazy.
farss wrote on 2/8/2010, 9:34 AM
There's many ways to work with Bezier curves, none of them right or wrong. Learned a lot watching a pretty intense tutorial on AE that really didn't have anything directly to do with Beziers at all.

In that tut though the guy was doing pretty well everything that people here are saying not to do. Now obviously the guy doing the tutorial is a compositor so he's had a lot of practice so he's become fast and he knows where to put a node. He'd click and drag one so the line aligned perfecto with the curve he was trying to trace and I'd say he was doing a node every two seconds and within less than a minute he'd pretty much added 100 or so nodes and completely traced out a couple of words of cursive text. He goes back to tweak it up a little and only does so by pushing the curves around, I don't think he ever once touched a node or a handle.

So the trick is getting the nodes in the right place and I fear that's a skill that you just have to learn. The interpolation between nodes follows some mathematical formula. If you get nodes in the wrong place then there's no way to get the path to go where you want it to go. So you don't go nuts and give up start with very simple shapes and practice a lot.

I'll admit I'm far from very good at this in any application. After Effects is a bit easier to work in than Vegas but for learning the basic skills it doesn't matter which application you practice on. I'd suggest allow months to years to get really proficient at this skill.

Bob.
rs170a wrote on 2/8/2010, 2:03 PM
I do move points only, but they always end up too far from the object border... it's driving me crazy.

You do realize that you can zoom in on the mask, don't you?
This makes accurately moving individual points much easier.

Mike
ilmagic wrote on 2/8/2010, 2:43 PM
"After Effects is a bit easier to work in than Vegas"

Why is it easier?
ilmagic wrote on 2/8/2010, 2:58 PM
"So the trick is getting the nodes in the right place"


I need to move the nodes anyway in order to create an animated mask.
And every time those annoying curves appear warping the mask shape unintentionally.
farss wrote on 2/8/2010, 3:16 PM
"Why is it easier?"

Because the work area can be enlarged and the screen updates can be faster. There's also a few more masking options. When it comes down to actually drawing a Bezier it's just as diificult as it is in Vegas and anything else for that matter.

Bob.
BudWzr wrote on 2/8/2010, 4:21 PM
It doesn't matter where the nodes are. The "segment" is the line. PULL THE SEGMENT, not the node.

Yellow indicates "selected". When two nodes are selected you can move left right up down.

Let me make a video, hang on.
ilmagic wrote on 2/8/2010, 4:24 PM
Thank you. I'll watch it when you're finished.
BudWzr wrote on 2/8/2010, 4:46 PM
I'm not really trying to mask anything, just play with this simple shape and you can see it is very pliable, stretchable, whatever. You only need ONE normal tooltip, just click around on the lines and points and watch for the yellow color.

No need for ALT, CNTL, just use the regular pointer.



A-Scott wrote on 2/8/2010, 4:54 PM
ilmagic,

I know what you mean about the arcane nature of the bezier mask editor. Used to frustrate the hell out of me. The turorial linked above is good, but let's cut to the chase. You want to manipulate a simple mask without all the curvey stuff. Read on...

Go into the editor for bezier mask (via event pan/crop) and do the following "experiment":

* Select the "anchor creation tool".

* You're going to make a simple box. Click (without dragging) each of the 4 corners of the box and then (carefully) click the first corner to close the loop.

* You should now see a box with an anchor point on each corner.

* Select the "normal edit tool". The normal edit cursor should appear as a pointer when hovering over any part of the mask. When it is not hovering over any part of the mask, it is shaped like a hand. (Try it and see.)

* Click anywhere NOT on the mask. The anchor points on the mask will "disappear". Everything on the mask is now de-selected. Consider this the starting point for making changes to the mask.

* You're going to move one corner of the box. Hover over a corner of the box (just the corner - not the sides) and click. You should see the anchor points re-appear. The one you just clicked will look different from the other corners and it will show yellow when you hover over it.

* Drag that anchor someplace. Repeat with the other corners as you wish. Make sure you click on just the corners and not the sides of the box.

* Now click one of the sides of the box (but don't drag). The two end points of that side are now selected. Click either one of the two end points and drag. Watch what happens. Do not drag by clicking on the side between the points. You already know why.

* Hold the SHIFT key and click on one of the two remaining corners. You now have 3 anchors selected. (Release the SHIFT key.) Click on any of those 3 anchors and drag. Watch what happens.

* Now let's say you want to move one of the 3 selected anchors by itself (without the others following.) Just click somewhere not on the mask (with the "hand" cursor.) Everything is de-selected. You can now click just the corner you want to move.

* You can always click somewhere off the mask to reset the selections. Also don't forget that right-click brings up a menu of useful choices.

* Now you're going to move the whole mask. Right-click and chose Select->All. Click on any of the anchor points and drag.

* If you accidentally create tangents and curves, right-click and select Hide Tangents->All (or just for the tangent you want to delete.)

Hope this helps.

farss wrote on 2/8/2010, 5:40 PM
[i]"I need to move the nodes anyway in order to create an animated mask"[/i

OH, RIGHT!

So what you're really trying to do is rotoscoping. This is a specialist field in which people get paid big bucks.

This is when desinging the node layout is even more critical not less. Using less nodes in the right places makes the task easier. Indeed you have to move them, how many of them you have and how well they define the moving objects will determine how easy or hard the task ahead is. Getting it right upfront can make the difference between taking weeks or days.

I've done this only a few times and only for seconds of footage and I went back and started all over again more than once. Getting it right meant I could select a group of nodes and move them all together, just draw a box around a group of nodes to select them and then you can drag the around all at once.
Now if say an elipse changes shape due to shift in camera angle then it's fairly easy to adjust a good set of nodes to compensate. You beak the task down into it's parts based on how they could move. It is never a trivial task and there's good reasons why the pros spend a lot of money up front to avoid having to do this.

Bob.
BudWzr wrote on 2/8/2010, 6:11 PM
Agreed, a "motion mask" is a complicated animal, that's why it's best to use a "blob" and the feather control.

If you're masking something small or quick, then detail isn't needed.

I've been experimenting with this for a long time, and if you throw a convolution kernal or Cartoon'r on the material BEFORE masking, it can help find the outlines and give you something simpler to work with while keyframing.