Showing posts with label features. Show all posts
Showing posts with label features. Show all posts

Saturday, August 20, 2011

Almost there...

I'm currently finishing things up for the first public release. There is still an annoying issue with loading a new or existing .blend while Roto2D is active but as long as you activate Roto2D after loading the .blend it is, dare I say it, useable!
Here's a list of changes since the last post:
  • MUCH faster image updates. I've added a couple of functions to Blender that gives me a more direct route to the pixel data. This allows for 15-20x (guesstimated) faster updates. It can now play back filled in animated masks at an acceptable speed.
  • Feathering!!! I finally managed to get it to work. There are some issues with large feather distances and sharp corners but since it is intended to be used to match the soft-edge of an in focus image element it is already useable. For bigger blurs you can attach a blur node to the mask's image node.
  • The feather distance can be adjusted per point. The feather distance for every curve point between two points is calculated using the logistic function mentioned here. This gives it a nice sigmoid slope.
  • Every mask now has a corresponding node in the Node editor. These nodes are fully managed (created/removed/updated) by Roto2D. The nodes can be forced to update by enabling 'Update nodes' in the panel.
  • The masks now match the render settings instead of the image size. A dotted line shows the size of the mask in the editor.
  • Inverting a mask. Just as fast as a non-inverted mask thanks to the new pixel functions mentioned above.
  • Changing the Bézier resolution per mask. range: 10-80
  • Translate, rotate & scale a mask or the selected points. Uses the standard Blender 'g', 'r' & 's' keys.
Example of an Inverted, feathered mask showing the variable feather distance. Inset: corresponding alpha mask generated by Roto2D



Most of the desired functionality is there. Now it's a matter of fixing a couple (Fingers crossed, knock on wood, etc.) of bugs and releasing it.

Monday, July 18, 2011

Animation and more

I was planning on adding the soft edge feature but even the most stripped down blur implementation was simply too slow. So, I shifted my focus towards animation and useability for a while. Here's a quick overview of the changes:
  • Making changes to a mask now automatically adds/updates a keyframe for the current frame. This means that as you jump back and forth through the footage and make adjustments to the mask(s), you don't have to worry about adding keyframes, etc. Roto2D takes care of all that. Of course, you can also edit the animation using the Graph Editor or Dopesheet.
  • All masks are now correctly stored in the .blend file. So, you don't have to worry about saving them seperately. 
  • Added selecting a mask by clicking on the outline.
  • Adding a point to a mask by double-clicking on the outline.
  • Added removing all selected points by pressing 'x' or 'del' or using the 'Remove' button. When drawing a new mask this will remove the last added point (pressing it again removes the point before that, etc.).
  • Added smoothing all selected points by pressing 'Shift'+'s' or using the 'Smooth' button.
  • Mask names can now be changed.
  • Mask color and alpha can now be changed.
  • Visibility of the outlines can now be toggled.
  • The use of 'Ctrl' and 'Shift' when editing points now matches the Foundry's Nuke. 
  • Tested it in Windows for the first time and fixed some strange OpenGL issues. 
And a new screenshot:
Animated mask.

With all that taken care of, it's time to dive back into the pixel buffers. Updating the Image object is still a bit too slow (about 1 sec. for 1920x1080) so I need to find a more direct way to pass the bgl.Buffer data to the Image object's buffer. If only I could get Image.gl_load() to stop causing a segmentation fault, or get direct access to the buffer... I feel another patch coming up! (And this one will be seriously serious :)

Friday, June 17, 2011

Progress so far

Here's a screenshot of a newly created mask in the UV/Image Editor:
Roto2D in action

It shows the panel on the left which features a list of masks. The mask itself shows the different types of points that are available: a simple point, a point with one handle or a point with two handles. A point with two handles can have an angle between the handles or the handles can be symmetrical.

All the points and handles can be moved around individually or, using the shift key or a rectangle selection to select multiple points, as a group. With the shift key you can also change the angle between handles or pull a new handle from a simple point or a point with one handle.

So, the mask editor is pretty much functional. The next step is to generate the raster image mask.

What to expect

The finished add-on will have the following features:
  • Integration into the UV/Image Editor
  • Ability to create and edit 2D Bézier masks in the UV/Image Editor
  • Key frame animation 
  • Soft edges 
  • Generated masks available in the Node Editor
  • Updated dynamically on a frame change
Basically, it will allow you to open a movie or image sequence in the UV/Image Editor, create one or more vector masks, animate them and use them for your composite.