It is currently Fri Apr 26, 2024 8:07 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Mice running around in GIMP? (LONG post)
PostPosted: Fri Dec 13, 2013 11:57 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Or myce? :)
http://registry.gimp.org/node/28679
Anyone tried this new Python plug-in by bootchk yet?
Pretty fascinating what it does. It is like small individual mice that feed on each image pixel and defecate the results to a new image. That's correct "Myce Pooh" :lol . Actually it is a thread or wire result.

Anyway you download the git zip package.
https://github.com/bootchk/pluginMycelium
AND you need Pixmap
https://github.com/bootchk/pixmap

Install and explanation below.

*****************************
Gimp Mycelium Plugin

Copyright 2013 Lloyd Konneker

Licensed under GPLv3


This is work in progress. It works but has a few bugs. Development is on-going.


About
-----

A Gimp plugin (filter) that renders an image as mycelium, or threads, or wire.


Audience
--------

Artists who use Gimp.

Programmers: as an example of object-oriented programming for simulation (the ancestral use of OOP as in Simula.)

Theorists: as a visible example of worm automata.


Specifications as a plugin
--------------------------

Generates a new image from any color or grayscale or indexed image.

Ignores the selection and renders the entire input image.


References
----------

Uses worm automata paradigm.

See also: http://en.wikipedia.org/wiki/Paterson%27s_worms


Derivation
----------

Derived from open source written by Pavol Rusnak (source on GitHub) which was in turn derived from work by Ryan Alexander.


Structure
------------------

plugin-mycelium.py is the 'main' of the plugin, that GIMP finds in it's plugin directory. It is just a shell, most of the action is in the Python package pluginMycelium which it imports from the same directory.

In the package, myceliumGimpPlugin.py is the 'main'. Other files define classes that it uses. The main class is AutomataSimulator (the plugin is a simulation) and Automata is the class of the simulated objects.



Installing
----------

Copy to the normal Gimp plugin directory for your platform:

- the file plugin-mycelium.py (a GIMP plugin written in Python)
- the directory pluginMycelium (a Python package)
- the directory pixmap (a Python package)

Then grant execute permission (on Linux, >chmod +x plugin-mycelium.py)

You 'install' the packages in the same directory as Gimp Python plugins.
(Not in the normal Python way; the packages do not yet include setup.py.)

(For example, the normal Gimp plugin directory, for 3rd party plugins, on Linux, is ~/.gimp-2.8/plug-ins)


Dependencies
------------

This is a Gimp plugin, so it only works installed as a plugin for Gimp.

This plugin is not a single file (like many other plugins) but requires two other Python packages:
- pluginMycelium (the engine for this plugin)
- pixmap (another Python package, which I also wrote, and its on Github too.)



Explanation
-----------

Myce are like mycelium or mice. They consume from the input image and appear in the output image. Considered as mycelium, they grow linearly, like threads. Considered as mice, they move, leaving a trail of deposits.

The tradition of 'worm automata' is misleading: all the action (feeding and depositing) is at a point, the head of the worm. The result might look like a worm, but the automata are not shaped like a worm. And the result might not be wormy or thready (when it runs a long time.)

Different myce instances may occupy the same pixel.

Myce don't directly interact with each other (except indirectly via their effect on the environment.)

Myce might wander off the field.

Myce are specialized to a channel (a pixelel of a pixel.) I.E. to a kind of resource.

Myce have a reserve of eaten food minus requirement.

Myce can divide if their reserves are large enough.

Myce with no reserves and not eating might migrate. Migrate means randomly jump to another pixel at a middle distance.

Myce only deposit if they eat. Thus their trail might have gaps (if they move while living off their reserves, or if they migrate.)



Parameters
----------

Starting field: how the simulation is initialized. Uniform: a population (the max) is uniformly random distributed. Center: a small population starts in the center.

Max population: upper limit on the population of automata.

Ending percent: one factor determining when the simulation ends. The percent of food consumed. The simulation also ends if many simulation periods elapse with no food consumed, e.g. if all the myce have died.

Mode to gray: whether the output is grayscale. Input may be color, grayscale, or indexed. Output may be either color or grayscale. If 'Mode to gray' is 'No', each myce is specialized to a channel (R, G, or B.) If 'Mode to gray' is 'Yes', all myce are in one channel.

Myce squirm: the direction a myce moves. Relaxed: mostly forward. .... Plodding: mostly forward but also straight back.

Myce greedy: whether a myce moves to a pixel with more food or randomly chooses from pixels in it's squirm range.

Myce exhausted: what happens when a myce has no reserves and finds no food.

Myce max daily intake: how much food a myce attempts to eat.

Myce daily burn: how much food or reserves are consumed each period.

Myce divide on reserves of: how much reserves cause a myce to divide (splitting its reserves with it's twin.)

Compose: how what a myce deposits is composed with what has been deposited earlier (by itself, or by other myce.)

Grain: the graininess or granularity of the effect. If 'Coarse', a myce eats a swath of pixelelels (of the same channel) from a neighborhood of pixels, instead of just one pixelel, and deposits to one pixelel. If 'Greedy' is also chosen, this tends to keep myce separated and non-crossing. In other words, myce may have a wide-mouth.


Inverting
---------

Myce currently deposit RGB or GRAY pixelel values on a black background. The plugin has no 'Invert' parameter, but you can invert an image, run the plugin, and invert the results, for a different effect. (I'm still exploring whether an 'Invert' parameter and a subtractive compose mode would offer novel effects.)

TODO
----

Compose by pixel: myce are specialized to a pixelel, but they eat and deposit all the pixelels of the pixel they are on, in the amount of their specialized pixelel.

Crossing: myce won't cross each other's trails.

Slime: myce leave a trail even if not eating.

My first Mycelium image. :)
Image
When it's done rendering i will post the result but so far it looks like this.
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 12:14 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Some things are beginning to take shape. :)
Cool to watch it run.

Image

You can select to run in color mode also. I elected grayscale so it looks more like chalkboard drawing on automatic. :bigthup

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 12:21 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12518
Seen similar renders before; looking forward the the official release to toy with this one. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 12:24 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Image

Not sure when the Myce will die but i will let it go until then and post the end results after. You get the picture though. Pretty cool i think.Lyle you may like this one a lot. Especially with people renders.

:ninja by Lyle :lol

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 12:26 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
lylejk wrote:
Seen similar renders before; looking forward the the official release to toy with this one. :)


This is the actual release Lyle. Just follow the install directions and it works really well. I have a 500 MB RAM system and it's pretty quick for me. :bigthup

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 12:43 am  (#6) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
That's interesting... sounds like it would take forever to render very large images, especially on my computer.
It's worth investigating and yes this was a long post.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 1:24 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
It is basically GIMPs very own AutoPainter Plug-in. Now if we could only add different myce-shape/brush choices. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 1:30 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
The myce died and i have to say i am impressed with all the detail. :)

Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 2:00 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
The finished splash render. You may download and place in your .gimp-2.8/splashes folder and use it if you wish. :)

Image

Working on a colored one now. :)

Image

I will post the end results after it finishes. :kpix

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 4:02 am  (#10) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
You should try inputting your signature image, and see what it makes of it.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 4:39 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Here is the (not so final result because i stopped the module :lol ) , but if you have ever heard the story of the three blind mice i am thinking i have three color blind myce. heheh :)
Image

@ Wallace - I will try that next. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 9:50 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2247
Location: Poland
Very interesting
Image

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 10:04 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Nice animation MareroQ! :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Sat Dec 14, 2013 10:43 am  (#14) 
Offline
Script Coder
User avatar

Joined: Apr 13, 2010
Posts: 244
Very interesting. Thanks for sharing.

_________________
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime! Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Tue Mar 31, 2015 6:46 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Wallace wrote:
You should try inputting your signature image, and see what it makes of it.


Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Tue Mar 31, 2015 6:30 pm  (#16) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Rod could you post the files needed to run mycelium, as it's very confusing

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Wed Apr 01, 2015 6:09 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Graechan wrote:
Rod could you post the files needed to run mycelium, as it's very confusing

Sure.

More information can be found here.
http://registry.gimp.org/node/28679

You need pixmap and the mycelium plugin for this to work.
I attached both zip folders here.

Attachment:
pixmap-master.zip [25.69 KiB]
Downloaded 73 times

https://github.com/bootchk/pixmap
UNZIP and
Place the pixmap folder in your plug-ins folder.
Attachment:
pluginMycelium-master.zip [650.57 KiB]
Downloaded 86 times

https://github.com/bootchk/pluginMycelium
Unzip and
Place the mycelium python file AND the pluginMycellium folder in your plug-ins folder.

RESTART GIMP. :)
Plug-in is found in the menus here
<Image>/Filters/Map/Mycelium
Open an image and run the filter.
Enjoy.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Wed Apr 01, 2015 6:37 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
A gray mode example. :)

Original input image
Image

After mycellium settings
Image

Image

Just watching it go is pretty amazing. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Wed Apr 01, 2015 6:00 pm  (#19) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Thanks for the files Rod

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Mice running around in GIMP? (LONG post)
PostPosted: Wed Apr 01, 2015 7:20 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12518
Any tips to speeding this up? Took over an hour to render an object using this (not showing; just practicing) and the image wasn't that large. :)

_________________
Lyle

Psalm 109:8

Image


Top
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Gimp running slow

1

No new posts Attachment(s) error when running potrace

2

No new posts Attachment(s) Error when running Set Colormap script

1

No new posts Attachment(s) Gimp still running after an hour of closing it down

9

No new posts Error running Gimp Script-fu from windows cmd prompt

5


cron

* Login  



Powered by phpBB3 © phpBB Group