Skip to main content
Participant
August 2, 2019
Question

RotoBezier corner vertices

  • August 2, 2019
  • 1 reply
  • 901 views

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

This topic has been closed for replies.

1 reply

françois leroy
Inspiring
August 4, 2019

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

moussamoAuthor
Participant
August 6, 2019

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!

moussamoAuthor
Participant
August 6, 2019

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


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.