Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Turing-like pattern script

Sun Jun 28, 2020 2:50 pm

Here is my first attempt at script-fu.
This script produces Turing-like patterns, with two parameters to change the aspect of the patterns and the possibility to either create a new layer from scratch or to create the pattern from an existing layer.

Perhaps a thing I would like to improve about this script is to give it a working progress bar; I cannot get it to work for the moment, so any suggestion is welcome.

NOTE: this script need another script, Rob Antonishen's high pass filter, to be installed. As a new user I cannot provide a link to this script so you will have to find it by yourself.

Re: Turing-like pattern script

Sun Jun 28, 2020 4:25 pm

Thank you, i was looking for a way to make a turing pattern a few weeks ago after watching a video on YT by Nobu Design.
The only thing i could find was something by samj but the results were always blurry (and the plug-in is kind of slow).

I tested your script - in 2.8 i got an error and in 2.10 nothing happens at all. The script runs and leaves the layer in the state it was at the start.

TuringError.png
TuringError.png (241.66 KiB) Viewed 5505 times


You should probably also tell us in your first post that your script requires RobA's high pass filter script to be installed, because most of us dont look at the code.

Re: Turing-like pattern script

Sun Jun 28, 2020 8:37 pm

I get:

Error while executing script-fu-turing-pattern:

Error: not enough arguments

This is in 2.10.20 and I have Rob's high pass script. The high pass script works fine on it's own.

Re: Turing-like pattern script

Mon Jun 29, 2020 3:43 am

Sorry everybody, I forgot to tell that my script require's Rob Antonishen's high pass filter to work. I now edited the original message.

Re: Turing-like pattern script

Mon Jun 29, 2020 5:41 am

holojello wrote:Sorry everybody


The errors mahvin and myself got, have nothing to do with the high-pass script.

Re: Turing-like pattern script

Mon Jun 29, 2020 7:57 am

I have Rob's High pass version 1.2 script and It's working on my end as long you don't tick off "Create a new layer?".

It doesn't work on the active layer

Image

Re: Turing-like pattern script

Mon Jun 29, 2020 9:03 am

holojello wrote:Here is my first attempt at script-fu.
NOTE: this script need another script, Rob Antonishen's high pass filter, to be installed. As a new user I cannot provide a link to this script so you will have to find it by yourself.


All these scripts are open-source, it is totally legitimate to steal the useful bits of code from RobA's script and include them in your code (but you have to understand how they work) as long as you credit RobA, and publish your scripts with an equivalent licence.

Re: Turing-like pattern script

Mon Jun 29, 2020 9:29 am

:tyspin Nice to have Turing Pattern on Linux.

TuringScriptPotracePy.jpg
TuringScriptPotracePy.jpg (124.99 KiB) Viewed 5174 times

Re: Turing-like pattern script

Mon Jun 29, 2020 9:41 am

Nice script

@Nidhogg - there is one for linux

turing.jpg
turing.jpg (136.11 KiB) Viewed 5168 times

Re: Turing-like pattern script

Mon Jun 29, 2020 9:58 am

Thanks heaps rich! Your Gimp chest must contain pretty much everything :yes

Re: Turing-like pattern script

Mon Jun 29, 2020 10:39 am

Thanks rich. Using the "Protoplasm" option makes for a good bumpmap to use on bricks or stucco.

protoplasm.jpg
protoplasm.jpg (572.69 KiB) Viewed 2816 times

Re: Turing-like pattern script

Mon Jun 29, 2020 12:56 pm

Konstantin wrote:
holojello wrote:Sorry everybody


The errors mahvin and myself got, have nothing to do with the high-pass script.


Konstantin:

Swap the file you have with this one:
high-pass.scm
(6.15 KiB) Downloaded 124 times

Re: Turing-like pattern script

Mon Jun 29, 2020 1:08 pm

I am investigating the error reported by Konstantin and Pocholo (it seems to be the same problem, while Mahvin's error seems different). The difficulty is that I cannot reproduce this error; on my computer (windows 10, GIMP 2.10.6) everything works fine. I will try to update my version of GIMP (since it is not the latest) to see whether I can reproduce this error.

The error regarding gimp-drawable-threshold being unbound suggests that there is no procedure named "gimp-drawable-threshold" in the pdb. Could you check this, Konstantin? (filters > script-fu > console > browse, then look for a function named gimp-drawable-threshold). Pocholo, is it the same error message that you get?

Re: Turing-like pattern script

Mon Jun 29, 2020 1:51 pm

holojello wrote:I am investigating the error reported by Konstantin and Pocholo (it seems to be the same problem, while Mahvin's error seems different). The difficulty is that I cannot reproduce this error; on my computer (windows 10, GIMP 2.10.6) everything works fine. I will try to update my version of GIMP (since it is not the latest) to see whether I can reproduce this error.

The error regarding gimp-drawable-threshold being unbound suggests that there is no procedure named "gimp-drawable-threshold" in the pdb. Could you check this, Konstantin? (filters > script-fu > console > browse, then look for a function named gimp-drawable-threshold). Pocholo, is it the same error message that you get?


I don't get any errors. It's just the script go through the motions and leave the background layer as it was in the beginning. It doesn't produce anything.

This the 15 second running script video.
https://imgur.com/a/EO4m6mR

Re: Turing-like pattern script

Mon Jun 29, 2020 3:04 pm

Pocholo wrote:
holojello wrote:I am investigating the error reported by Konstantin and Pocholo (it seems to be the same problem, while Mahvin's error seems different). The difficulty is that I cannot reproduce this error; on my computer (windows 10, GIMP 2.10.6) everything works fine. I will try to update my version of GIMP (since it is not the latest) to see whether I can reproduce this error.

The error regarding gimp-drawable-threshold being unbound suggests that there is no procedure named "gimp-drawable-threshold" in the pdb. Could you check this, Konstantin? (filters > script-fu > console > browse, then look for a function named gimp-drawable-threshold). Pocholo, is it the same error message that you get?


I don't get any errors. It's just the script go through the motions and leave the background layer as it was in the beginning. It doesn't produce anything.

This the 15 second running script video.
https://imgur.com/a/EO4m6mR


Just for reference, the same thing happens to me when I uncheck the Create New Layer box.

Re: Turing-like pattern script

Mon Jun 29, 2020 4:15 pm

I upgraded to the latest version of GIMP (2.10.20), and the script still runs fine whatever the input parameters on my computer. I also confirm that the high-pass script sent by Mahvin is perfectly identical to the one I use.

Mahvin, Pocholo, based on the video you sent, I think I understand the issue; you call the script from a totally white layer don't you? (is it what you do also, Mahvin?). Try to fill the layer with something (for example, solid noise, or even just that good old green pepper brush). Indeed, Turing patterns emerge from the fact that some matter (= pixels with non-zero value (ie non-white)) diffuses and reacts inside a medium (= the canvas), but if there is no matter in the first place, no pattern can be formed.

Re: Turing-like pattern script

Mon Jun 29, 2020 4:42 pm

holojello wrote:I upgraded to the latest version of GIMP (2.10.20), and the script still runs fine whatever the input parameters on my computer. I also confirm that the high-pass script sent by Mahvin is perfectly identical to the one I use.

Mahvin, Pocholo, based on the video you sent, I think I understand the issue; you call the script from a totally white layer don't you? (is it what you do also, Mahvin?). Try to fill the layer with something (for example, solid noise, or even just that good old green pepper brush). Indeed, Turing patterns emerge from the fact that some matter (= pixels with non-zero value (ie non-white)) diffuses and reacts inside a medium (= the canvas), but if there is no matter in the first place, no pattern can be formed.


Amazing! Using certain pattern fills creates some very unique and bizarre Turing patterns.

Re: Turing-like pattern script

Mon Jun 29, 2020 6:36 pm

Good to know, holojello I like it. :jumpclap Make sure you inform users about it.
:jumpclap

Re: Turing-like pattern script

Mon Jun 29, 2020 10:48 pm

holojello wrote:The error regarding gimp-drawable-threshold being unbound suggests that there is no procedure named "gimp-drawable-threshold" in the pdb. Could you check this, Konstantin? (filters > script-fu > console > browse, then look for a function named gimp-drawable-threshold).

Yes, its there.


I was somewhat able to fix the problem.
It worked after i installed the high-pass file provided by mahvin. The reason it wasnt working is because i had edited my version of the script so it appears under "Enhance" instead of the "Generic" category.

However: it still doesnt work when "Create new layer" is unchecked. That will only produce a white layer.

May i suggest, adding the High Pass filter code to your Turing script ?!

Re: Turing-like pattern script

Mon Jun 29, 2020 11:32 pm

Konstantin, read the posts above yours. Or just fill that white background with a texture, then run the script with layer unchecked.
Post a reply