Wed Dec 25, 2024 10:33 pm
Do you want to duplicate a clip on the timeline with Magic Mask applied to it, or do you want to duplicate the whole timeline with magic mask applied to it?
If I’m not mistaken when you duplicate the timeline you duplicate the link between clip in the edit page and magic mask in the color page, so they travel together and you should not lose the mask, as long as you don’t separate the two or delete the cache itself.
If you just click on the timeline in the media pool and duplicate it, magic mask should work. Even if you reset or delete the original timeline you used for duplication.
If you want to duplicate a clip that has magic mask applied to it, and you want to keep the tracking and mask, there are several methods, of which the most elegant one is using fusion to apply magic mask. Fusion will reference the clip on the timeline but use the clip from media source to track at source, meaning original resolution. That way you can scale up and down, duplicate the clip on the timeline, move it around, crop it and mask will remain.
It is how it was meant to be used for such operations. However, if you want to use magic mask on the color page but want to duplicate the clip in the timeline, you have several options. Basically, you either protect the link between source clip and cache files or you reapply the mask to clip your want to manipulate. Whichever works for you.
The first method involves using some form of nested timeline which will protect the link. The obvious way is compound clip, fusion clip or nested timeline.
Make a compound clip first, open the compound clip as a timeline. On that timeline track the thing you want to track with magic mask and back in your timeline you will have a protected link with a container called compound clip. Then you can duplicate the compound clip etc. Even copy it to another timeline.
Alternatively, you can render out the mask to an image sequence and apply that as a separate clip in the edit page or you can render in place. Of the two, render in place is quicker, but requires large file size to get transparency, while if you render it out as image sequence you can use some format that is nice and small, good quality and has transparency. Same is true if you use saver from fusion.
Keep in mind that cache for magic mask is like any other, you render to disk an image sequence associated with a particular clip and its state when you made the mask. Reference frames, the ones with strokes are not cached so they are not lost. They will always update. But the other tracking frames, are rendered as image sequence somewhere on disk and when you delete the cache or change source to which they are associated, you invalidate the mask. The methods I mention prevent or avoid that.
The only way to keep the magic mask completely flexible would be to also include it in the edit page, or to make it into vectors instead of raster version. This has been done by some other companies, but the downside usually is that you lose some advantages when masking fast moving objects and dealing with motion blur, dealing with hair and fur and similar situations. Blackmagic decided to use raster version, and actually cache the masks, and if they use the other version they lose some of the advantages you can't get with vectors. if you use existing methods I mentioned you should be fine. Considering how many people for some reason want to use magic mask on the edit page, maybe one day they will add it to edit page as well.