RotoBezier corner vertices
Copy link to clipboard
Copied
I'm using:
ERR(suites.MaskSuite6()->AEGP_SetMaskIsRotoBezier(maskItem, TRUE));
This smooths all the vertices in the mask. I'm trying to find a way to not apply it to the corner vertices, just like using the Convert Vertex Tool.
I guess I need to know how the RotoBezier works behind the scenes.
As far as I can tell, I can access these vertex properties: x,y, tan_in_x, tan_in_y, tan_out_x, tan_out_y
Copy link to clipboard
Copied
Hi,
if I remember correctly, RotoBezier work just like classical bezier, except that the In/Out tangents are always aligned and have the same "smoothing" (in fact, distance form the vertex)
So, to get sharp vertices, you can simply set tangents X/Y to 0.
Cheers,
François
Copy link to clipboard
Copied
I had tried that before and it didn't work. As soon as I set the rotobezier to true, it resets all vertices to be the same "smoothness". Then I found this in the documentation saying that the tangent values are ignored when rotobezier is on, and they're automatically calculated.
Currently, I got around it by turning the vertices into corners manually before keyframing in the code, but it would be great if I can automate the whole process.
Thanks!
Copy link to clipboard
Copied
Can you explain what didn't work when you tried it before?
Cos' there's something I don't really understand: when you use rotobezier, you can still adjust the smoothness for each vertex, right?
So what happened when you've set them to 0?
Also, before writing your tangents, did you try reading them, see their value? It could give you a clue...
Cheers,
François
Copy link to clipboard
Copied
The problem is that as soon as I enable Rotobezier (in the code), the tangent values are recalculated, and all vertices are smoothed, even if I had manually set the tangents to 0.
Copy link to clipboard
Copied
It's normal that they are smoothed. But you should be able to set the tension anyway...
What do you get when you read the tangent / vertex values?

