Blender-2-G'MIC Python Script for Video Sequence Editor

Hi

Just wanted to announce the availability of “Blender-2-G’MIC” - a Python script that provides access to G’MIC image filters from the Blender Video Sequence Editor. It is an alpha release, open to feedback and further development.

UPDATE 6/20/16
Blender-2-GMIC-Details-Denoising:
The separate b2gSSD blend file provides access to over 30 G’MIC filters and is targeted towards Softening, Sharpening and Denoising images. The filters can be applied to single images or image sequences. Use and settings are exactly as described on the main Blender-2-G’MIC page at GitHub.

UPDATE 5/4/16
The Alpha2 version of Blender-2-G’MIC has six additional G’MIC filter options that allow you to enhance still images by animating a single filter effect over time (Erode, Pencil B&W, Soft Glow, Twirl, Water, Zoom). Info and updated Blend file/script at:

YouTube videos provide setup info and directions for use.

fantasy!
a question, do you think will it be able to do some interactive operation? such as

http://www.davidrevoy.com/article240/gmic-line-art-colorization

thanks

Oyster, My first hope is that people will be able to successfully produce interesting image efects on their images using the alpha version of B2G. Regarding Inpainting…it’s possible, but if you’re intending to do a lot of that type of work, it would be better right now to use the GIMP plugin. I’m working on the Colorize filter, and it may be added in the future. The interactive Foreground Extraction filter works pretty well.

@natcern
Wow fantastic I love it

This need to be integrate in blender

I really doubt G’Mic will ever be more than an external executable that Blender script link to. I looked into the codebase and all the functions were hooked up to command line parser, not isolated in any way to their own classes or functions. It’s not a library, it’s a direct command line tool and is very difficult to be used as anything else.

edit: A bit less negative of a tone. Also, further research revealed that G’MIC library does have a way to read and write from memory. It’s not just using the command line utility from code, reading and writing files. So it could be possible to integrate it properly with other software.

G’MIC is more than just a simple command-line tool. It defines its own library (with C or C++ API) which is used by several interfaces : the popular G’MIC plug-in, a plug-in for Krita, PhotoFlow, Zart, and so on… All this makes it quite easy to embed it in third-party softwares. You should have missed something.

In videos, it seems that addon is opening default image viewer instead of using Blender’s VSE Preview.
It is a pity for a use with VSE to produce movies using G’MIC filters.

It would be better if addon could create a VSE G’MIC effect strip.
G’MIC renders could be strored as strip proxies and be visible in Blender’s VSE preview.
And G’MIC filter settings could be shown by effect strip panel.

This way, it would be possible to go back and forth between several G’MIC filters applying.

Hi awesome addon idea… I recently done a manual gmic filter to 500 frames (Dream Smoothing) so looking forward to trying it out but having trouble loading it, I loaded it like all other addons the header says it loaded in the addons section but can’t find it anywhere in the addons or in the vse any help appreciated thanks… windows 8.1 blender 2.77a yes i tried load ui will try a fresh install of blender later… Well tried other versions and new installs still no joy no idea what I’m doing wrong .

Thanks for your interest. B2G is a simple script already inside the Blend file…no add-on loading, etc. required. If you loaded it as an add-on, you might want to delete any remnants of that first.

Also maybe watch/rewatch the Settings & Use video on the GitHub page/YouTube to see if things are working as intended. Basically, you click “Run Script” and then make sure the top-right panel is open/opened to show the UI. Should work OK in 2.77 (haven’t been able to revisit the script for a while), but you can always use 2.76 if necessary. Screen caps below might help…


Thanks got it working yeah my mistake was treating the zip as a addon another case of to much blender and not enough sleep… :o I will delete any remnants like you suggest and give it another go thanks…

Attachments


Make sure that you have connected b2g with your copy of gmic.exe. Use the “GMIC filepath” button to tell B2G where to find the gmic.exe file on your system. See info @ 1:49 in “Blender-2-G’MIC - Settings & Use” video on GitHub/YouTube. Hope that helps.

  • There might be some issues with the latest Blender 2.77 related to script handling … so I would suggest trying to see if you can get it working with 2.76 first.

Hi got it all working in 2.76, no preview but renders out perfectly fine look forward to future updates cheers for the help…

It does not work in Ubuntu. What is the path to the file?

The code was primarily developed on Windows, but it does seem to work quite well on Linux (see attached Linux Mint screen image). Tests were originally done with Blender 2.76a under Linux Mint 17 (I would recommend sticking with Blender 2.76a). I’m not currently able to do a lot of compatibility testing, but here’s a couple of tips to see if you can get it working:

  • make sure that you have installed the Linux version of G’MIC, either with a downloaded deb file or via one of the PPAs (Google will help here). Once this is done on Linux, you can forget about the G’MIC filepath textbox…the Blender commands will be directed to G’MIC automatically.

  • turn off “Relative Paths” in the Blender User Preferences. You want the full path to be displayed and used as part of the G’MIC command lines.

Hope this helps.

The code was primarily developed on Windows, but it does seem to work quite well on Linux (see attached Linux Mint screen image). Tests were originally done with Blender 2.76a under Linux Mint 17 (I would recommend sticking with Blender 2.76a). I’m not currently able to do a lot of compatibility testing, but here’s a couple of tips to see if you can get it working:

  • make sure that you have installed the Linux version of G’MIC, either with a downloaded deb file or via one of the PPAs (Google will help here). Once this is done on Linux, you can forget about the G’MIC filepath textbox…the Blender commands will be directed to G’MIC automatically.

  • turn off “Relative Paths” in the Blender User Preferences. You want the full path to be displayed and used as part of the G’MIC command lines.

Hope this helps.


Thank you. Single frame (jpeg, png ) now works.
But the video file - no …
Just the option “save” not working too.
Blender 2.76a

Works fine here on Linux Mint 17 (Qiana) & Linux Mint 18 (Sarah) with Blender 2.76a. The filters can be applied to single images or image sequences (applying the filters directly to anything other than short video files is not recommended, due to the memory requirements and format complexities).

Recommended procedure (assuming that you have all the right Linux file/folder rights):
Add your chosen range of image sequence frames to Blender timeline and make sure the sequence strip is selected.

Choose filter + settings, then click Apply Filter Effect to preview the results (you can scroll through the image strip in the normal manner beforehand to select a specific frame to preview).

Once satisfied with the filter effect, click Save Output, enter an appropriate filename for the new sequence (eg: NewSequence.jpg) in the Destination File Name textbox and then click Apply Filter Effect to actually generate the new image sequence.

If all goes well, the new sequence will be found in it’s own folder inside the GMICrenders folder (click the “Open GMICrenders Folder” button to view). Checking/Rechecking the Blender-2-GMIC Settings & Use and Blender-2-GMIC Feature Update videos on GitHub/YouTube might indicate whether things are working as expected.

UPDATE 8/13/17
The G’MIC team recently released a major QT-based revision of their software, essentially making the old GTK-based version obsolete (it still works, but will no longer be maintained). While Blender-2-GMIC offered access to a selection of filters based on the CLI version, the new QT version provides the opportunity to use a full range of filters relevant to processing timeline strips in Blender’s Video Sequence Editor. Demonstration video of Blender working with G’MIC-Qt at YouTube:

While I am very pleased and appreciative of the work on G’MIC, as I use in in GIMP but I am not easily able to implement it use in Blender. It is not an Addon, I get that . . . so a simple “How to… for lunkheads” would be appreciated. I need to download what??? and put it where?? and then what do I need to do inside of Blender?? Just more than a bit confused here. But thank you all none the less.