UserFilter in G'MIC?

Sorry for fantasizing - but I had to ask.
Would it be possible to implement *.guf filters from UserFilters (GPL license) into G’MIC?

Sources UserFilter:

User Guide + Filters:

The filter collection file contains 2376 filters.
Example guf code - Hex Lattice:

Example

Converted from ‘ffe09gal.8bf’ (ffegalpc.ffl) with ffl2guf.exe v0.9.7.

[GUF]
Protocol=1

[Info]
Category=/UserFilter/Filter Factory Gallery E
Title=Hex Lattice…
Author=Greg Schorno
Copyright=Copyright © 1996 (c) Greg Schorno

[Version]
Major=1
Minor=0
Micro=0

[Filter Factory]
8bf=ffe09gal.8bf

[Gimp]
Registered=true
Description=Imported FFL filter.
Date=1996-01-01
EdgeMode=2

[Map 0]
Enabled=false

[Map 1]
Enabled=false

[Map 2]
Enabled=false

[Map 3]
Enabled=false

[Control 0]
Enabled=true
Label=Grid Size
Preset=134
Step=1

[Control 1]
Enabled=true
Label=Wave Peak
Preset=119
Step=1

[Control 2]
Enabled=true
Label=Mode
Preset=96
Step=1

[Control 3]
Enabled=true
Label=Inner Gain
Preset=213
Step=1

[Control 4]
Enabled=true
Label=Outer Gain
Preset=9
Step=1

[Control 5]
Enabled=true
Label=Frequency
Preset=1
Step=1

[Control 6]
Enabled=false
Preset=0
Step=1

[Control 7]
Enabled=false
Preset=0
Step=1

[Code]
R=put(abs(sin((5x+3y)256/val(0,1,M))),0),put(abs(sin((5x-3y)256/val(0,1,M))),1),put(abs(sin(6y256/val(0,1,M)+((ctl(2)&128)?256:0))),2),put(ctl(2)&64?min(get(0),min(get(1),get(2))):max(get(0),max(get(1),get(2))),4),put(abs(sin(abs(get(4)-val(1,0,512))val(5,1,12)/3)),4),put(scl(get(4),0,256,ctl(3),ctl(4)),5),cget(5)/128
G=cget(5)/128
B=c
get(5)/128
A=a

UserFilters works for Gimp-2.10 (for Win and LInux) - but will not work for Gimp-2.99/3.0 unlike G’MIC.
The G’MIC - User-Defined filter seems pretty close, but for *.guf the code requires a lot more conversion.

I imagine that would be a difficult task, the UserFilter plugin has its own programming language that would have to be implemented for that to work.

The UserFilter plugin is a GIMP version of the Filter Factory plugin that Adobe published for Photoshop in the early to mid 1990s.
I used the parser/interpreter from UserFilter in my Filter Factory plugin for Paint.NET.
The original Filter Factory programming guide is available at: https://github.com/0xC0000054/pdn-filter-factory/blob/master/Filter%20Factory.pdf

I eventually wrote a Photoshop plugin host for Paint.NET (based on GIMP’s PSPI) to allow it to use Filter Factory plugins directly, that was easier than trying to fix any bugs in the UserFilter code or trying to write my own parser/interpreter for that language.

2 Likes

My first (fuzzy and incomplete, making me susceptible to Dunning–Kruger effects) impressions, formed primarily from the programming guide, is that if G’MIC-QT never had come along, this would be pretty exciting stuff — and in the late nineties, I am sure it was. but GMIC-QT is here, with the underlying gmic pipeline processor and its allied math expression processor, and, to my possibly DK affected mind, those have occupied the mind-share which the UserFilter plug-in first had.

I have that impression as well; but for notation differences, In the G’MIC-QT User-Defined filter, I write math expressions to populate various channels with procedurally-generated imagery. What I’m missing, I think, is the analogue to the .guf file which can be named, written out, and retrieved by name later. A G’MIC-QT filter which writes out its own filters, then reads them back in later (meaning: a GUI file dialog too). That’s a lot of coding pain; it would have to have a Really Exciting Endpoint!!! to furnish sufficient motivation. I’d rather go case-by-case, look at the behavior of *.guf filters in the original plug-in, and if one seems especially engaging, re-engineer it as a straight GMIC-QT filter. That falls short of @MrQ request, I think, but @PDN_GMIC raises the practical issue of cost-v.-benefit.

1 Like

Honestly, I think G’MIC-QT could use a upgrade in its interface option. I had suggested a way to append GUI items next to GUI items to allow for grid mode. And this would make things more reasonable interactive. A upgrade would make something like that possible. I wouldn’t mind tabs either.

Still use a few userfilters (inc. Ink Rubber (like how it darkens blues and greens in a unique way while brighten reds. Use it with other blendings to fake an IR). Sad that it won’t be carried over when 3.X comes out. I remember when I was keeping 1.2x around for the unique filters it had that never carried over to 2.x world. Decided not to continue using it when I got my new PC. lol

Will keep 2.10X around so hopefully, the developers won’t force giving up it when 3.x gets released (like they did when 2.6x went to 2.8x as I recall). :slight_smile: