A new mask script for compositing

Just found this script over at CGTalk,


it only runs on 2.49 but seems quite good. Here is the source site.
http://users.telenet.be/EWOCprojects/venicemask.html

Cant think of anything similar in Blender at the moment.

Wow! This sounds great and I will try it out.
If it lives up to expectations then it’s bound to be easier to make masks than using bezier curves.

Well, this might have been great if it had worked! :frowning:
I’m able to load the script but I’m unable to load any image. It gives me an ''unknown file format error" no matter what img format I try to open. Has anyone manged to use this?
I’m really curious.

I had a crash first time too, I tried a different image format. Maybe different size file?

Hey David, thanx for the tip. I tried a low res jpeg and it loaded. It took 20 or so seconds though and I could hear the cpu fan of my laptop spin like hell!
Well, I couldn’t really work with it (it clearly sez in the script documentation page that the preview is slowing it down), but I guess that with some (or a lot?) of work this can eventually turn out to be an interesting addition to Blender. It would be very helpful for novices who would like to do some elementary roto work without having to delve into Blender’s 3D part. For now bezier curves for masks is the only viable alternative to this script.

3pointEdit, thx for starting up this thread over here, it didn’t spring to mind this is even more applicable than the Python scripts subforum (to all: I’m the writer of this script).

blendercomp: what kind of hardware are you working on ? you need at least a bit of computing power to use this script. its written in python so it will never be really fast. maybe one day will see a conversion into a faster language…
I am using a 1.8Ghz dual core laptop and a jpeg of 1200x800 loads in 3 seconds. On my 3Ghz dual core desktop its 2 seconds. Its not down to the dual core, since the script isn’t multithreaded. And to use the script you just have to be kind of ‘patient’ sometimes waiting for a button press to ‘kick in’ and so on… For simple masking speed ís good enough though I recon.
On a side note, due to some strange behaviour on the part of Blender, every time you start the script during the same Blender session, it gets slower and slower. So do restart Blender often! Maybe you first tried to load real big images and then the smaller image, then the slowdown would be so big it could indeed take 20 seconds. Still, the ‘slow’ loading (and incompatibility with some image file types) is due to both Blenders image handling and Python not being able to handle real big lists in a fast way. Maybe I should use P.I.L. for the image loading ? I’ll check it out. Still, the app is definitely not as slow as you experienced…

I tried a much smaller image to test and found that the new version of the script is much quicker. Thankyou.
Paleajed Do you expect to be porting to 2.5 when its closer to finished? Is the new way of handling python even applicable to your script?

I will most certainly port to 2.5 when the Python API of this version is more complete. For example, there is no support for drawing OpenGL yet, and I really need this for drawing my selection grids and the lines between nodes. Lets hope newer versions of 2.5 will include these needed options !

paleajed, I really want to thank you for writing this promising script. I was thinking about sending you an email with the exact error I got to help out with debugging. It’s a pleasant coincidence that you posted in this thread.
My laptopc is my main pc at the moment and I must say it’s not really at the cutting edge of technology. The hw specs of the sony vaio vgn-fw31j laptop: dual core CPU, T6400, @ 2 Ghz, 4 GB ram, and ext4 filesystem. Kubuntu 9.10 the the distro that I use for most daily tasks. I bought it last summer for about 1200 euros and I’m quite happy with it. The only app that takes a few seconds to load (as opposed to miliseconds for most other apps) is Inkscape (for some reason that is beyond me). The only problem with the laptop is that damn ATI graphics card but I’d rather not go into that.

its written in python so it will never be really fast. maybe one day will see a conversion into a faster language…
I am using a 1.8Ghz dual core laptop and a jpeg of 1200x800 loads in 3 seconds. On my 3Ghz dual core desktop its 2 seconds.

Well, my laptop is faster then and it’s unable to load any image with a resolution larger than 1K. Like I said in my earlier post I was only able to load a low res jpeg and it took quite some time. All the other formats I had tried (excluding gif) failed to open.
I have a few test images which are 4000x2600 in various formats (png, tiff, jpeg) which I have tried to open using the script.

Its not down to the dual core, since the script isn’t multithreaded.

it does appear to be very cpu hungry though. I’ve just run another test and it appears that upon opening an image blender’s use of one core skyrockets (>80%). Interestingly enough, though, xorg’s use of the cpu also rises to 50%. Is that normal?

And to use the script you just have to be kind of ‘patient’ sometimes waiting for a button press to ‘kick in’ and so on… For simple masking speed ís good enough though I recon.

I’m unable to use it at the moment.

On a side note, due to some strange behaviour on the part of Blender, every time you start the script during the same Blender session, it gets slower and slower. So do restart Blender often! Maybe you first tried to load real big images and then the smaller image, then the slowdown would be so big it could indeed take 20 seconds. Still, the ‘slow’ loading (and incompatibility with some image file types) is due to both Blenders image handling and Python not being able to handle real big lists in a fast way. Maybe I should use P.I.L. for the image loading ? I’ll check it out. Still, the app is definitely not as slow as you experienced…

I did indeed try to load high res images first, but none opened. Maybe that explains part of the problem.
Do you want me to pm you the exact error that I get when trying the script with large images?

thanx again for your efforts and I’m looking forward to its integration in 2.5.

blendercomp,

I am very sorry the script doesn’t work very well for you. Do pm me with the exact error message, this will most definitely help out.

I’d like to point you to another thread about this program in the Python plugins subforum.
http://blenderartists.org/forum/showthread.php?t=177379

Some good info there too.

I’d like to point you to another thread about this program in the Python plugins subforum.
http://blenderartists.org/forum/showthread.php?t=177379

Head over to the other thread for more info on the newest version 0.61 !

Masks with bezier curves should actually be quite easy now, just draw the curve with the grease pencil, and then convert the paint to curves.

LetterRip

I’m just looking at Masks/Roto more closely with 2.5

Can you control the number of points generated with GP, such as reducing the number of right down? Are they keyframeable?. Can they be automatically keyframed as they are created?

I don’t think you have much control over number of points generated. I know they are keyframable but don’t think they are set to autokeyframe. You might ask aligorith.

LetterRip

For Grease Pencil:
There isn’t any “absolute” control over the number of points created, although you can somewhat get around this using a combination of “simplify strokes” option and/or making tweaks to the sensitivity settings (probably not really desireable for responsiveness to be retained).

Ok, I’ll give that a go. Thanks guys. I hope to get more into these wonderful improvements that are happening in 2.5, Aligorith you’re even finding time to get that ‘old bugger’ of a sequencer back into use. :slight_smile:

Yellow is there any chance you could start a thread for testing that approach?