Glitch Art Filters?


#141

I prefer code with indentation. Makes it easier to read. The error happens because you are adding too many parameters to resize(). I think it expects 4, so it considers 1,1,3,1 as the value for the last one.


(dumb) #142

At this point I’m convinced that it’s impossible for me to fix. Here’s the filter, but it’s still very broken. The best that I can do right now is describe what it should do. I would ask David to fix it but I don’t want to pester him because I reckon he’s doing a lot of more important work. The errors always result from the functions not recognising some arguments and no matter what I try it’ll tell me that something’s out of place even when as far as I can tell it really isn’t!

The filter should move from left to right across horizontal strips of the image, all 16 pixels high except at the bottom of the image if it’s not a multiple of 16 blocks high. Each 16x16 block should be processed as follows in different modes:

…so each 16x16 block can have two 8x16 or 16x8 blocks in it or 4 8x8 blocks.

For the luminance channel, four 8x8 blocks within each 16x16 block should always be used regardless of the mode used for the other two channels in the YCbCr colour space. The DCT image would have to be cropped each time and then resized to match the block size to get a classic broken look because the DCT image’s blocks are 8x8.


(dumb) #143

I’ve changed my mind again and tried to have yet another go. It’s becoming even less clear for me besides defects in the algorithm which I presume exist by working through what I believe the interpreter’s logic to be. It won’t tell me which of the variables it doesn’t recognise and why when I set the verbosity level to debug and view the log. There’s a space in sum(val*src*resize(crop( #"$dct",0,0,(off+errtile)%64,8,8,1),cbw,cbh,3,1)) which leads to the interpreter telling me that there’s unbalanced parentheses. When I remove it I get unrecognized item '3,1' and when I remove that it gets even worse…

image

I’ve left the arguments in the crop() function in exactly the order that David used in the original ‘JPEG artefacts’ script. I don’t know what it wants, since I’ve checked that the brackets are all where they need to be. What’s going on?


#144

As I said, you have too many parameters. See here:

sum(val*src*
  resize(
    crop( #"$dct",0,0,(off+errtile)%64,8,8,1),
    cbw,
    cbh,
    3,
    1
  )
)

I.e., crop() is the 1st parameter, then cbw, then cbh, then 3. That is already 4!


(dumb) #145

I was using a different resize function which has more parameters.

The shorter one runs without errors. My problem is now getting it to work properly. All I get are blank channels.


#146

I still think that you are using the simpler resize, since crop() results in a vector. Reading the error from post #143 again, it looks like cbh might be =8, which is what the error is complaining about, since there is no such thing as an interpolation option valued 8.

You need to make your code more readable and / or simpler because right now I can’t even get to your plugin error using post #143’s version of the filter. Instead, I get

gmic<float>::fill(): Unbalanced parentheses/brackets, in expression

This expression is super long and hard to follow; I don’t know where the imbalance is. The thing about the G’MIC interpreter is that it just tells me the line number of fill(). However, this fill has many lines and brackets. I don’t know where to look.

Time to call @David_Tschumperle.

Why is @Joan_Rake1 getting a different error? Is there a difference in how error is reported between the plugin and CLI versions? Also, only the line number of the location of fill is being reported but the contents of the fill itself is one huge block of code with at least a dozen groupings within. I am not a programmer; maybe it isn’t that hard to read…


(G'MIC staff) #147

My guess is that if you put an expression as " #somethin " (notice the first blank character), then the interpreter will consider that everything following is a comment.
This probably happens in your expression

(...)sum(val*src*resize(crop( #"$dct",0,0,(off+errtile)%64,8,8,1),cbw,cbh,3,1))))));

Removing the space character in the crop( # is necessary (at least).


(dumb) #148

That explains what’s wrong, though now the interpreter isn’t throwing any errors. Now the problem is that I’m getting blank images for each of the channels and though I know it’s due to the fill algorithm I’m using, I haven’t an idea as to why it’s screwing up.

">begin(boundary = 2; res = vector256(); val = 1; errtile = 0; const sticky = "$ste"; stuck = 0; cold = "$cd"; const cbw="$bw"; const cbh="$bh"; const cbwh=cbw*cbh);

if (!(x%16) && !(y%16), # seek every pixel in a 16x16s-spaced grid

for (ll = 0, ll<(16/cbh), ++ll, for (kk = 0, kk<(16/cbw), ++kk, # scan within each 16x16 block

src = crop(x+(kk*cbw),y+(ll*cbh),cbw,cbh); # crop each sub-block

for (l = 0, l<8, ++l, for (k = 0, k<8, ++k, off = k + 8*l; # get a tile from the DCT image; there are only 64

j(#"$G",kk*cbw,ll*cbh)==1?(val+=(u(-cold,cold)/10); stuck==0?errtile=0; # half-implemented glitch trigger stuff which isn't that important right now

res[off+(2*ll+kk)*(cbwh)] # the aim is to draw a sprite for every 16x16 block but I don't know how to assign the values of each sub-block.

= sum(val*src*resize(crop(#"$dct",0,0,(off+errtile)%64,8,8,2),cbwh,3,1))  # ditto

))))));

draw(#-1,res,x,y,0,0,16,16); # draw the sprite

"

(dumb) #149

More progress: I’ve made a working thing where everything is processed in the correct order by retrofitting a more familiar command but I’ve had to cut down on some of the functions I want. My next, er, trick is to put all the functions I wanted back in.

#@gui JPEG Artefacts : fx_jpeg_artefacts, fx_jpeg_artefacts_preview(0)
#@gui : note = note("<small>This filter simulates the JPEG compression artifacts, using DCT quantization on 8x8 blocs.</small>")
#@gui : Quality (%) = int(50,1,100)
#@gui : Encoding = choice("444","442","424","422")
#@gui : sep = separator(), Preview Type = choice("Full","Forward Horizontal","Forward Vertical","Backward Horizontal","Backward Vertical","Duplicate Top","Duplicate Left","Duplicate Bottom","Duplicate Right","Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inverse"), Preview split = point(50,50,0,0,200,200,200,0,10,0)
#@gui : sep = separator(), note = note("<small>Author: <i><a href="https://goo.gl/Ryf7Cv">David Tschumperl&#233;</a></i>.      Latest Update: <i>2017/05/07</i>.</small>")
fx_jpeg_artefacts :
base642img "MSBmbG9hdCBsaXR0bGVfZW5kaWFuCjggOCA2NCAxICMyMjIyCnic5Vs9q51FEC60kKtWMYpaCirYKCoI767iR6UoSangtdM/EAM2Fgab2FhaWdgIUXOqVO8sXEHBVDFia6kgCBaCQSyu+5w8c3nv5p55Bg+3uSmGs19nP2Z2Zt752P39/bJ/G8PHF5+qD1y4v77+yNWyeulegPWy9bbW+9pJ7z9XH6s/f3KxdLBeRr2hjDb0nfR+4OZyxwlw8UbHS4f1nehtBTg66f3kAyOU261OfDTiA/ehEV91ga8T208+cDlg5JNKPiknvR8ykfKwLuRlo7y0k96PegS8MxsB80RAnROBRYC9R0AZtxF45o1w+cXz9fHvztTnP7y7nv7z5dLBern1NvTht37/75P17Qt/lOsPPQqwXrbeth6D/6Hv3F2fl2/++WXqMPfyegzmwZz439e9755fHwbMvTxjHqwFQBlt6MMYjMV/8F/MgbkwJ+bGGlgLa2Jt7AF7wRjMg/+hD3vG3nmGxr0Y5/S+euPGe/XVJ/ZKB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+H+0PRPVHNL/4DgTd2gQ="
nm[-2,-1] dct,idct
i[Q] (16,11,10,16,24,40,51,61;12,12,14,19,26,58,60,55;14,13,16,24,40,57,69,56;14,17,22,29,51,87,80,62;18,22,37,56,68,109,103,77;24,35,55,64,81,104,113,92;49,64,78,87,103,121,120,101;72,92,95,98,112,100,103,99)
f. "const S = $1<50?5000/$1:200-2*$1; max(1,round((S*i+50)/100,1,-1))"
repeat {$!-3} l[$>,-3--1]
l[0] w,h={[w,h]} r {w+(-w%16)},{h+(-h%16)},1,100%,0,3 rgb2ycbcr s c
if {$2==1} r[-2,-1] 100%,50%,1,1,2 elif {$2==2} r[-2,-1] 50%,100%,1,1,2 elif {$2==3} r[-2,-1] 50%,50%,1,1,2 fi round. endl
repeat 3
bw,bh=8
if {$>==1}
if {$2==1} bh=16 elif {$2==2} bw=16 elif {$2==3} bh,bw=16 fi
fi
[$>]
f[$>] ">begin(boundary = 2; res = vector64(); const cbw="$bw"; const cbh="$bh"; const cbwh=cbw*cbh);
if (!(x%(128/cbw)) && !(y%(128/cbh)),for (ll = 0, ll<(16/cbw), ++ll, for (kk = 0, kk<(16/cbh), ++kk,
src = crop(x+(ll*8),y+(kk*8),8,8);
for (l = 0, l<8, ++l, for (k = 0, k<8, ++k, off = k + 8*l; res[off] = sum(src*crop(#"$dct",0,0,(off)%64,8,8,1)); draw(#-1,res,x+(ll*8),y+(kk*8),0,0,8,8)))))); i"
round.
+r[Q] {$>,w},100%,1,1,0,2 /.. . round.. *[-2,-1]
f. ">begin(boundary = 2; res = vector64(); const cbw="$bw"; const cbh="$bh"; const cbwh=cbw*cbh);
if (!(x%(128/cbw)) && !(y%(128/cbh)),for (ll = 0, ll<(16/cbw), ++ll, for (kk = 0, kk<(16/cbh), ++kk,
src = crop(x+(ll*8),y+(kk*8),8,8);
for (l = 0, l<8, ++l, for (k = 0, k<8, ++k, off = k + 8*l; res[off] = sum(src*crop(#"$idct",0,0,(off)%64,8,8,1)); draw(#"$>",res,x+(ll*8),y+(kk*8),0,0,8,8)))))); i"
rm.
round[$>]
done
l[^3--1] r ${-max_wh},1,1,1 a c ycbcr2rgb round. r $w,$h,1,3,0 endl
endl done
rm[$dct,$idct,$Q]
fx_jpeg_artefacts_preview :
gui_split_preview "fx_jpeg_artefacts $*",${-3--1}

I’ve tried doing just that minus the glitching stuff and it runs but something’s up with the order in which the blocks are being processed in. I might still need help on this.


#150

@Joan_Rake1

Could you copy and paste this, and then put in your code in here? It’ll make it a slight easier to read by adding colors. I actually found a few bug fix within my filter just because I was able to see the colors where the bugs were.

Copy and paste what’s below, then add a space bar, then duplicate it three time. Copy and paste that as the border of the code.

`


(dumb) #151
#@gui Less-Fake JIFF (JPEG) Encoder : fx_jiff, fx_jiff_preview(0)
#@gui : note = note("<small>A less-fake JIFF encoder.</small>")
#@gui : Quality (%) = int(50,1,100)
#@gui : Encoding = choice("444","442","424","422")
#@gui : sep = separator(), Preview Type = choice("Full","Forward Horizontal","Forward Vertical","Backward Horizontal","Backward Vertical","Duplicate Top","Duplicate Left","Duplicate Bottom","Duplicate Right","Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inverse"), Preview split = point(50,50,0,0,200,200,200,0,10,0)
#@gui : sep = separator(), note = note("<small>Author: Joan Rake, \'borrowed\' from <i><a href="https://goo.gl/Ryf7Cv">David Tschumperl&#233;</a></i>.      Latest Update: <i>2017/05/07</i>.</small>")
fx_jiff :
iw,ih={[w,h]}
gp=0
cd=1
ste=0.125
base642img "MSBmbG9hdCBsaXR0bGVfZW5kaWFuCjggOCA2NCAxICMyMjIyCnic5Vs9q51FEC60kKtWMYpaCirYKCoI767iR6UoSangtdM/EAM2Fgab2FhaWdgIUXOqVO8sXEHBVDFia6kgCBaCQSyu+5w8c3nv5p55Bg+3uSmGs19nP2Z2Zt752P39/bJ/G8PHF5+qD1y4v77+yNWyeulegPWy9bbW+9pJ7z9XH6s/f3KxdLBeRr2hjDb0nfR+4OZyxwlw8UbHS4f1nehtBTg66f3kAyOU261Of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/rC3v5DY/3P509Y7O/t/7vw+sf/n1g8Z/cHbX4j4P5qfZ/vvPf0+0v+j/YGo/ojmF4nf/7nz82z/vaffR/p/tD8Q1R/R/CLx+z93fp7tv/f0+0j/j/YHovojml8kfv/nzs+z/feefh/p/9H+QFR/RPOLxO//3Pl5tv/e0+8j/T/aH4jqj2h+kfj9nzs/z/bfe/p9pP9H+wNR/RHNLxK//3Pn59n+e0+/j/T/aH8gqj+i+UXi93/u/Dzbf+/p95H+H+0PRPVHNL/4DgTd2gQ="
nm[-2,-1] dct,idct
i[Q] (16,11,10,16,24,40,51,61;12,12,14,19,26,58,60,55;14,13,16,24,40,57,69,56;14,17,22,29,51,87,80,62;18,22,37,56,68,109,103,77;24,35,55,64,81,104,113,92;49,64,78,87,103,121,120,101;72,92,95,98,112,100,103,99)
f. "const S = $1<50?5000/$1:200-2*$1; max(1,round((S*i+50)/100,1,-1))"
i[G] $iw,$ih,1,1 f[$G] ">begin(chance = "$gp"; tlmax=16; tt=-1; val=0);
if (!(x%16) && !(y%16),for (l = 0, l<2, ++l, for (k = 0, k<2, ++k, (u<=chance?(val=1;tt=round(u(1,tlmax))):tt>=0?(val=0;--tt):(val=-1)); j(k*8,l*8)=val)),0)"
repeat {$!-4} l[$>,-4--1]
l[0] w,h={[w,h]} r {w+(-w%16)},{h+(-h%16)},1,100%,0,3 rgb2srgb gcd_srgb2jpeg s c round. endl
repeat 3
[$>]
bw,bh=8
if {$>==1}
if {$2==1} bh=16 elif {$2==2} bw=16 elif {$2==3} bh,bw=16 fi
fi
f[$>] ">begin(boundary = 2; res = vector256(); val = 1; errtile = 0; const sticky = "$ste"; stuck = 0; cold = "$cd"; const cbw="$bw"; const cbh="$bh"; const cbwh=cbw*cbh);
if (!(x%16) && !(y%16),for (ll = 0, ll<(16/cbh), ++ll, for (kk = 0, kk<(16/cbw), ++kk,
src = crop(x+(kk*cbw),y+(ll*cbh),cbw,cbh);
for (l = 0, l<8, ++l, for (k = 0, k<8, ++k, off = k + 8*l; j(#"$G",kk*cbw,ll*cbh)==1?(val+=(u(-cold,cold)/10); stuck==0?errtile=0; res[off+(2*ll+kk)*(cbwh)] = sum(val*src*resize(crop(#"$dct",0,0,(off+errtile)%64,8,8,2),cbw*cbh,3,1))))))));
draw(#-1,res,x,y,0,0,16,16);"
display
round.
+r[$Q] {$>,w},100%,1,1,0,2 /.. . round.. *[-2,-1]
f. ">begin(boundary = 2; res = vector256(); val = 1; errtile = 0; const sticky = "$ste"; stuck = 0; cold = "$cd"; const cbw="$bw"; const cbh="$bh"; const cbwh=cbw*cbh);
if (!(x%16) && !(y%16),for (ll = 0, ll<(16/cbh), ++ll, for (kk = 0, kk<(16/cbw), ++kk,
src = crop(x+(kk*cbw),y+(ll*cbh),cbw,cbh);
for (l = 0, l<8, ++l, for (k = 0, k<8, ++k, off = k + 8*l; j(#"$G",kk*cbw,ll*cbh)==1?(val+=(u(-cold,cold)/10); stuck==0?errtile=0; res[off+(2*ll+kk)*(cbwh)] = sum(val+src*resize(crop(#"$idct",0,0,(off+errtile)%64,8,8,2),cbw*cbh,3,1))))))));
draw(#"$>",res,x,y,0,0,16,16);"
round[$>]
done
l[^4--1] r ${-max_wh},1,1,1 a c gcd_jpeg2srgb srgb2rgb round. r $w,$h,1,3,0 endl
endl done
rm[$dct,$idct,$Q,$G]
fx_jiff_preview :
fx_jiff $*
#gui_split_preview "fx_jiff $*",${-3--1}

…it’s useless within the fill blocks.


#152

I think I’ll separate the fill block for you. You can do that again, but remove the " . Like they’re separate codes. One to see the code as a whole, and fills separately.

Fill #1

>begin(boundary = 2; 
res = vector256();
 val = 1; 
errtile = 0; 
const sticky = "$ste";
 stuck = 0; 
cold = "$cd"; 
const cbw="$bw"; 
const cbh="$bh"; 
const cbwh=cbw*cbh);
if (!(x%16) && !(y%16),for (ll = 0, ll<(16/cbh), ++ll, for (kk = 0, kk<(16/cbw), ++kk,
src = crop(x+(kk*cbw),y+(ll*cbh),cbw,cbh);
for (l = 0, l<8, ++l, for (k = 0, k<8, ++k, off = k + 8*l; 
j(#"$G",kk*cbw,ll*cbh)==1?(val+=(u(-cold,cold)/10);
 stuck==0?errtile=0; 
res[off+(2*ll+kk)*(cbwh)] = sum(val*src*resize(crop(#"$dct",0,0,(off+errtile)%64,8,8,2),cbw*cbh,3,1))))))));
draw(#-1,res,x,y,0,0,16,16);

Fill #2

>begin(boundary = 2; 
res = vector256(); val = 1; 
errtile = 0; 
const sticky = "$ste"; 
stuck = 0; 
cold = "$cd"; 
const cbw="$bw"; 
const cbh="$bh"; const cbwh=cbw*cbh);
if (!(x%16) && !(y%16),for (ll = 0, ll<(16/cbh), ++ll, for (kk = 0, kk<(16/cbw), ++kk,
src = crop(x+(kk*cbw),y+(ll*cbh),cbw,cbh);
for (l = 0, l<8, ++l, for (k = 0, k<8, ++k, off = k + 8*l;
 j(#"$G",kk*cbw,ll*cbh)==1?(val+=(u(-cold,cold)/10); 
stuck==0?errtile=0; res[off+(2*ll+kk)*(cbwh)] = sum(val+src*resize(crop(#"$idct",0,0,(off+errtile)%64,8,8,2),cbw*cbh,3,1))))))));
draw(#"$>",res,x,y,0,0,16,16);

I think it’s only a slight more readable now.


(dumb) #153

I didn’t see that at all, but I still don’t think it would help. The problem is that though there’s no syntax errors and it works for what it is, it’s not the right thing for the job that I want it to do. The order in which everything is being filled is all wrong because I’m in the dark as to how to manage a vector with a size of 256 when there are only 64 8x8 tiles in the DCT image and off is always between 0 and 63. The main reason why I’m not using something based on David’s approach is that the edges of the blocks are less blocky.

So far the filter works absolutely fine in 444 mode, which is why I believe I’m not that far off.


#154

Well, I have only added this line to the pixel sort filter -

elif {$3==10} +split_opacity rm[1]

The result is not exactly like this filter in PDN - https://forums.getpaint.net/topic/7968-gravity-ymd100714/
image

But evidently, the shape is there. The colors on the other hand… But, I’m sure Joan Rake would love this effect though.


(dumb) #155

While there’s already a pixel sort filter made by David with a really nice masking feature, I’m interested to see your take on this sort of thing.

Meanwhile, another update to the JIFF glitch thing. It’s much more violent than the Snorpey one.

image

image

image

image

It seems to like green a lot.


#156

The glitch looks really interesting. But, I’ll have a test when you’re finished with the filter. Maybe that can be a separate JIFF filter.

Here’s the test for my changes to pixel sort

PDN Gravity
image
G’MIC Pixel Sort with an attempt to add alpha
image

Seem right in some places. Other places are a no. Hmm…


(dumb) #157

I might just keep the DCT tile errors, but the next step is to add shifts to the tiles themselves as well as errors in the source tiles used for the transforms.


(dumb) #158

[https://pastebin.com/fDpJaLx5](Another update.) Added value errors.

image

image


#159

I have just tested it. In some way, it actually has potential. By the way, doesn’t this affect your other filter like JIFF? I haven’t tested those to see if this new JPEG Artefacts breaks those filter that uses it.

EDIT: Never mind about the green problem. It seem to like primaries. Blue, Red, Green. Basically those. The only issue is that I have no control over the final in some scenarios. Like I want to see something more like the preview, but I get something else. Oh well, I know that’s a preview issue

By the way, I combined JPEG Artefacts and ECB to see what would happen -

Hmm… I’ll take it.


(dumb) #160

I didn’t yet bother to change the name of the retrofitted ‘JPEG Artefacts’ script because I was focussing on getting it to work. It will become the new ‘JIFF’ script. It’s still far from done because I think there’s ways in which I can speed it up.