You are here

Mycelium plugin

I wrote a plugin that renders in thread or mycelium. It uses worm automata (its a visible simulation.)

It is not quite ready for general consumption (works well, but has bugs and is still being improved.) I would appreciate comments, or even code contributions.

Python source is at https://github.com/bootchk/pluginMycelium.git You also need https://github.com/bootchk/pixmap.git

See the README file.

When it is a little more polished, I will upload an archive here.

Can you show an example of a resulting image after using the plugin?

Thanks,
-Rod

I added example images in the data folder.

A gray image using default settings except: Gray, Greedy, 77, 75, 13: https://github.com/bootchk/pluginMycelium/blob/master/data/LenaGrayGreed...

Similar settings except not Gray: https://github.com/bootchk/pluginMycelium/blob/master/data/LenaRGBGreedy...

(Is it still the case that this site doesn't let you paste images into posts?)

Here is a project from which this derives, an effect that you MIGHT be able to achieve with this plugin if you invert at some stage? http://www.creativeapplications.net/processing/mycelium-processing/

Here is another project, whose code I started from: http://stick.gk2.sk/2013/02/idea-factory-mycelium-animated-photos/

(Note both projects use the 'Processing' language, for art, which is interesting in its own right.)

The plugin needs improvement. Its a prototype, in Python, so its easy to change. I am still exploring with the GUI and the algorithms. Its slow but could be made faster, once the design stabilizes.

For an example of an improvement to be made: I don't think the color composition method is correct ( subtracting from white, should be adding to black?)

Also, the animation should be optional and the progress bar should be used, or a preview (I have been working with small images since it is so slow.)

Also, since there are many settings and the effects vary widely, it might benefit from presets (choices of canned settings.) Its a microcosm of GIMP: you can achieve blur, brighten, invert, etc. but its all done by independent automata working on a pixel at a time.

I mention a few other improvements in a TODO list at the end of the README.

bad file descripter.
Here is the traceback information.
Traceback (most recent call last):
File "C:\Program Files\GIMP 2\lib\gimp\2.0\python\gimpfu.py", line 699, in response
dialog.res = run_script(params)
File "C:\Program Files\GIMP 2\lib\gimp\2.0\python\gimpfu.py", line 361, in run_script
return apply(function, params)
File "C:\Documents and Settings\Admin\.gimp-2.8\plug-ins\plugin-mycelium.py", line 23, in pluginMain
compose, grain)
File "C:\Documents and Settings\Admin\.gimp-2.8\plug-ins\pluginMycelium\myceliumGimpPlugin.py", line 48, in myceliumGimpPlugin
field.populate()
File "C:\Documents and Settings\Admin\.gimp-2.8\plug-ins\pluginMycelium\field.py", line 84, in populate
self.populateUniformly()
File "C:\Documents and Settings\Admin\.gimp-2.8\plug-ins\pluginMycelium\field.py", line 111, in populateUniformly
self.append(automata)
File "C:\Documents and Settings\Admin\.gimp-2.8\plug-ins\pluginMycelium\field.py", line 34, in append
print("append Automata ", len(self.automata) )
IOError: [Errno 9] Bad file descriptor

This is with Windows XP 32 bit.

This looks like it could be an extraordinary Gimp plug-in. I can't wait to see future releases. fascinating stuff.
Thanks,
-Rod

OK I'll remove the print statements, which are for debugging. The problem is, 'print()' syntax in Python is a FUTURE feature, that is, it is in Python 3 and is supported by some 2.x versions of Python. I suppose the Python you have installed doesn't support that syntax.

Thanks for the encouragement, although I think you are overstating. At times, I think Mycelium is just a toy.

Working excellent now. Thanks! :)
I don't know. Something about Myce eating my image and pooping out results seems akin to Nanobots. LOL Anyways i think it's fascinating.
I started a render and i will be posting the results in this thread at GimpChat if you want to check it out.
http://www.gimpchat.com/viewtopic.php?f=9&t=9271
-Rod

Is it possible to add a new function or variable such as a new Myce shape? Essentially giving the plug-in a autopaint with different brush shapes option. :)

Thanks again for this terrific plug-in for GIMP.
-Rod

Thanks, I welcome any suggestion for improvement.

My initial thought was: you could stroke the result with brushes using another plugin (isn't there one that does that? As I recall, there is a plugin that applies random density map and then brushes?) Then I thought, that might not be along the same paths as the myce. Maybe Mycelium should just create paths, although that might be slow?

What is 'autopaint'? My guess is a PS plugin.

Autopaint is a stand alone program that takes a set of small images and using them as brushes paints your input image. This could be fruit shapes and colors or bottlecaps of different colors. It essentially paints with colored shapes. Mycelium actually does the same thing. If their were a way to just change the shape of the Myce themselves you would get close to the same results.

I am not sure of another plug-in available to do this. I think Ofnuts developed a density fill plugin from python though.

On another thought if you were to take the results and select all the black, invert that and save that selection to paths. You could then stroke the paths with any brush. Probably a very small one. That could yield the same results.But that many selections converted to paths, wouldn't that take a long time?

Thanks,
-Rod

With it, you can just paint with worms. lol
:)

http://img17.imageshack.us/img17/4737/v8d9.png

A few hours ago I downloaded/unzipped the .tar/gz archive for your plugin, and installed the three items to plugins directory in a portable GIMP 2.8.10 via Windows 7 Home Premium SP1 64 bit laptop; I'm happy to say it has worked the first and two more times without errors! It does take a little while for the render, but nowhere near as long as say JWildfire when doing its Java-based goodness. Thought you'd like to know it's working for my type of GIMP.

Subscribe to Comments for "Mycelium plugin"