Looks like G’MIC is a perfect plugin for https://www.nodebox.net/node/ image processing but it needs Python wrapper for API.
Yes, there are actually a lot of similar node-based interfaces where G’MIC could be integrated as one available node (Blender sequence editor would be probably one of my favorites ).
Today, we have both C and C++ API for the libgmic, so anyone interested to play with them to create G’MIC plug-ins/nodes for other softwares is welcome !
It would be cool to have a node interface for G’MIC. Then, I can even create my own custom filters since coder I’m not (but have had some experience with nodes in a past life using Simulink and Labview when I was an Electrical Engineer. Also like the Mathmap node interface (though simple it may be) as well as Photo Reactor (program seldom used but have toyed with it some; created the image process control for an IR simulation shown below).
It is posble using on blender?
I do like the idea of a GUI/console app/plugin that allows the user to write commands using nodes; i.e. G’MIC not as a node but many nodes. It would be intuitive and tactile (might also be handy on touch devices) and make it easy to keep track of the commands and their arguments. I might add that it would also be great if the user could zoom in and out of verbose levels. I guess it is fun to dream a bit and at our developers.
If they ever implement such a gui, again, I can actually implement my own plugins for a change instead of just sharing my flows. Maybe a future project for David and his crew. It’s been done for other interfaces already (Mathmap).
I am afraid there are no
they, so if anybody wants to push this forward, the first step is to wrap some of G’MIC commands from
libgmic into Python. Python is used both in
nodebox and Blender, so when Python binding is there, it will be possible to take a next step and wrap it in a
nodebox of Blender plugin. Doing an independent node-based interface might be too hard.
To experiment with C + Python +
libgmic binding, there is CFFI:
Still, I can hope, can’t I? lol
No, abandon all hope. Hope is useless - support is priceless. =)
Good news everyone. There are signs of Blender integration on horizon. It may be already possible to write plugin that uses G’MIC for node editor.
Hello Bazza, maybe we spoke per e-mail. G’MIC can be used in blender 2.8x Linux using the gmic-blender add-on, though without nodes but with python scripting as shown in the demo video here from the Libre Graphics Meeting 2020..
The Blender script that is shown is now in the repository’s examples here.
I guess that the most interesting would be to have true 1-filter-1-node mapping with possible keyframing for gmic parameters. This is not ready yet… but doable in Python as post-render, from inside Blender or from outside Blender.
I am the author of this Blender G’MIC add-on, I need to dedicate discussion time with the Blender foundations guys, because Blender 2.8x currently does not allow to create custom nodes except in C/C++ and by patching Blender’s core only. Blender does however allow to create in Python fake nodes that are groups and which can output some raw image but possibly cannot read input images except if they are from a bitmap/file node.
The draft for needed Blender patching or tighter integration is shown in this video from a recent online Libre Graphics Meeting 2020.
Hello, the Python 3 binding for G’MIC is ready for G’MIC 2.8.4, I am its author and I do plan to make it ready for G’MIC 2.9.0 soon. It can be installed on Linux and MacOS. It is showcased in this recent Libre Graphics Meeting video and installable from now using pip install. cffi or ctypes strategies against libgmic or libcmig (a thin C wrapper against the C++ libgmic) have been discarded in order to create a Pythonic-style opinionated binding. Right now the implementation uses the C/Python API. I do not plan a rewrite in Pybind11 or some elegant framework for now, because apart from a work-in-progress non-released numpy array support, the binding is almost finished to me (memory leaking could be investigated).
I can advise on integrating gmic-py into nodebox for sure, if using the Python binding is the way. What has been done for the gmic-blender project is that add-on zip files contains a main python file with Blender’s required exported addon description global variable, and then imports the proper detected OS’s gmic-py shared library from the archive’s subdirectories. If I do not reply here, please add a Github issue on the gmic-py or gmic-blender project and I will be responding to you.