Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Masks for compositing in blender

38

In this videotutorial from Blendtuts.com, Oliver demonstrates the new Robobezier function and goes on to use the animated mask in the compositor.

blendtuts writes:

Recently, a new addon ("Rotobezier", developed by Daniel Salazar, alias Zanqdo) was added to Blender, and I needed to make a tutorial about it, because it's an addon that makes a lot easier to animate bezier curves :DBezier curves have a lot of applications if animated, but one of them is the ability of using them as masks on the blender compositor. This tutorial talks about how to use and animate curves using this addon, and how to use them as masks in compositing :)

See you!

http://vimeo.com/17355544

38 Comments

  1. very interesting
    i wonder if in some way (gimp integration?) it could be done with some bitmap selection tool... automatically in each frame... changing the selection into a thing like this...

  2. Hi, it`s a good idea to make the mask from curve or object, but it`s more usefol to have one in compositing nodes.
    Imagine you have a lots of object`s in the scene and you need to put in that scene a video and u have to put a mask in that video, well be imposible to maket. In this moment i use Sony Vegas to mask the video and afther that i render the sequents in png. format and afther that i insert the video in blender compositing nods.
    I don`t know if it`s posible to make a node for mask in compositing node, mabe in the future.

  3. @Igna

    Definitely. I believe this is on a list somewhere, it's definitely wanted. Right now, 2.5 is working towards being stable, but after that, the other branches can be merged and we'll have a ton of new features developed, including possible masks for compositor/sequencer.

  4. yeah a choke node would be handy (to clip in or out the mask edges), and if you leave the matte shape as a render layer (instead of an image sequence) you can do that with the Offset function of the curve.

  5. @3dpointedit:
    well, there is the dilate/erode-node which does exactly that. more or less.
    but i think i know what you mean, an extra curve element to control the choke and feather. yes, that would be nice.

  6. Good tutorial, thanks! :)

    Now we obviously need a "tracker" like SynthEyes :) Without the tracker this cool addon will be... a bit hard to use as a video mask tool. Yeah, we need that "robo-bezier" :)) I think it's not very hard to implement (pitty - I'm not a coder). It can be like a "threshold" for Glare with iterational detection algorythm for choosen "white" points. The brightest point in a spot that also must be in a center of selected area (user will be just doing a "click-there" action and the addon will be performing "draw circle" procedure) will be the coordinates center. To prevent center's trembling it can be (I'm not pretty sure) an algorythm in fusion of an FFT-based average point detection and a selection zone correction for every frame (possibly based on an edge detection - maybe through sharpen procedure and roughly generating controls points which will be forming a new zone's bounds).

    This is only my proposition of a possible way to create this feature. Unfortunatelly, I feel myself with the brain of a coder but I don't have a free time to learn all needed things now and I don't know maths well. Though I know about cycles, loops, functions... possibly almost all popular things in OOP. But I'm far from pro and can't get yet things with recursion (and such crazy things) well. I'm far from the mathematical analysis and other great sciences close to this area... So I got that I will better become a really good modeller-animator than a weak coder-programmer.

    BTW - Olivier just shown us that we don't need a feather feature for masking, coz it's already in Blender :)

  7. Thanx for the tutorial which was very interesting. Have two comments though.
    First, I think that rendering image sequences is a bad idea, and a waste of time and resources.
    Using the matte shape on a render layer would suffice. I can get an animated matte into the compositor without the need for img sequences. As this steps appears to be redundant I'm wondering what exactly is there to gain by doing this.
    Second, I think that for a fixed-shape object such as the one masked, using a 2D shape instead of a 3D one would be more efficient.

  8. Nice! =)

    Both the tutorial and the demo of Rotobezier.

    I guess someone (probably ZanQdo) is already thinking of a way of making Blender automatically detect video wise what edges (or approximation of edges) the respective beziers are "attached" to and also automatically move the masks accordingly, and I'd really want that!

    Even if not perfectly executed it would make rotoscoping so much faster with smaller, but duller mask tweeking.

    Anyone has any inside info on future features of Rotobezier?

  9. This is already useful for those who make motion graphics. It's also very useful for creating garbage mattes and compositing masks (for power windows, for instance).
    About the "choke" option, i think that we're pretty convered with dilate/erode, blur and even RGB curves nodes. What I would really love to see is a way to define variable feathering for the masks, using a double-bezier or node weights. But I know it's pretty difficult to do withouth changing blender's internals and wouldn't be possible at the moment with just a script (but somebody can show me I wrong anytime, of course ;-)

    Another aspect that I think it should be revised (I know ZanQdo already has this in mind) is the fact that these roto-masks are still treated as geometry in Blender, and if we want to use them we have to render them (likely using an extra renderlayers).
    These curves should have an option to be marked as masks and moved to a special buffer to be rendered (just as index passes or something like that) and it would be really good if that pass would be rendered interactively using OGL to provide interactivity in the compositor, making unnecesary to render each frame to tweak the masks.

  10. I'm confused. What do you mean it wasn't possible before? Blender has been able to animate curves over a background video for *years and years*, and all that seems to be new here is that the add on appears to wrap the task of adding a 100% emitted or shadeless material to the filled curve and provide that function with a one button interface. Sorry but I've been using blender for animated masks exactly as seen here with no add ons for years.

    Am I missing something?

  11. "I’m confused. What do you mean it wasn’t possible before? Blender has been able to animate curves over a background video for *years and years*, and all that seems to be new here is that the add on appears to wrap the task of adding a 100% emitted or shadeless material to the filled curve and provide that function with a one button interface. Sorry but I’ve been using blender for animated masks exactly as seen here with no add ons for years."

    "Am I missing something?"

    i Gotta agree with David Weese, the feature has been present in blender for years. "animating curves"

  12. David Weese, how did you animate the shape of the curve? I could always animate the rot/loc/size but not the actual shape. Unless you use hooks (yuck). This is an elegant way to animate the editing of the vertex shapes.

  13. @Moolah @Dave @blendercomp
    Totally agree.

    Why not use tracking algorithms for such a clear 'object' in the video (compositor or otherwise).
    Even some open source libraries do a really decent job. And there's a reason lots of studios still use good-old-fashioned green screen.

    Hey, I can imagine the usefulness of Rotobezier, but for this?
    I thought the whole reason for inventing computers was to automate tedious tasks, not to create them.

    Although, come to think of it...

  14. @TomsT, you're right but it's obvious :)
    Just be patient - Daniel do this work by himself and it will be not that fast. ;)
    Programming is a world of complicated tasks. 80% of visible work takes 20% of a whole development time and other 20% of work takes 80% of a remaining time.
    You can use it right now to create a funny vector animation ;)

    p.s. what are these open source libraries?

  15. @Moolah

    for some reason my posts previous posts got removed, no idea why.
    Just do a search for OpenCV (which is extensive and can be used with Python)
    or if you're more into C-sharp take a look at Aforge.

  16. @TomsT
    Unfortunatelly, I tried just Action Script 3.0 ))) So I'm not familiar with this but it's just interesting about existing algorythms. So this info will be helpful but not for me.

  17. Thanks for your comments! :)

    Somebody told that this was already possible before, a lot of time ago. Well... in the video I say at some point that it was possible... but not so easy as it is now! I, myself animated curves before using hooks and all that... but that's not very handy for this purpose, specially when you need more that one mask at a time!

    But... if it was possible in another way... sorry, I didn't knew it (and I looked at another ways for a long time, maybe a searched for wrong keywords hah xD)

    ;)

  18. It was possible using hooks or shapekeys, but anyone who tried that knows how tedious and error-prone it was.
    This addon simplifies things a lot, you change the curve on the fly marking keyframes and you're done. It's great.

  19. Sorry, no intention to flame or anything, just not seeing the point. I always just used vertex keys. In fact all the grabage mattes in the "Greenscreen Nightmare" video were done this way.

  20. Not my favourite tutorial: I think you should give a example of some very cool stuf that can (easily) be done with it... (Why it would come in Handy)

    Anyway thanks for the tip.
    Nice show and train our imagination :D

  21. I liked the tutorial, I think it's good for beginners, very clear and all.

    But I have to agree with other posters that the add-on only adds a panel to handle the stuff (don't get me wrong, it is also good to have it !).

    I have myself worked doing bezier masks, and I never ever used hooks. I just grabed the bezier nodes just like shown in the video and insert vertex keys. It always worked like this, go to a frame, edit mask, insert keyframe, go to another frame, edit mask...etc.

    Anyway, I think any add-on that helps people to do their job is welcome, and Daniel have done an excellent job, so, kudos to him and go RotoBezier !

    PS: And yes, we need a tracker !

  22. Shapekeys in Curves is a mean. But it's not that handy as RotoBezier. In some cases it may be better. But generally - RotoBezier is better! I don't like to add "Slurph" keys because if you'll add another key (for some reason) - you need to re-record all keyframes for Slurph.
    Wow... and actually - I can't get how Slurph works... Can somebody explain how it deals with keyframes?

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×