Seexpr pixel perfect grids, hexagonal grids, checkerboard and more!

Since @amyspark helped me build kseexpr recently, I finally managed to create a bundle of my seexpr scripts! It was made in Krita 5.0 master, so please do tell me if any of them doesn’t work for you.

How to use the grids

  • Create a new Fill Layer, select the SeExpr script with the grid you want.
  • Change the values so they fit your purpose.
  • add a new Filter Mask with Color To Alpha to make the background of the grid transparent (there is no way in SeExpr to output transparent color).

Pixel perfect grids & checkerboards

Link: Tiar's_Seexpr_Grids.bundle - Google Drive

Content:

Random test scripts

Link: Test_Seexpr_Scripts.bundle - Google Drive

Content:

20 Likes

It seems that Seexpr can also do some comic effects. Such as speed line, concentration line, etc.

Wolthera made some:


But the problem with them is, someone had to code them in :wink: Here I only gather scripts I already made when I was a bit more enthusiastic about this new possibility plus a few times when someone needed help.

Depending on the task it might be a bit difficult to code it up, though the code is usually short and self-contained and you see the results instantly, which is an advantage over coding Python plugins.

2 Likes

Can seexpr render transparent colors? I want to modify the “Relative grid” to make it a script for head-to-body comparison

No. :frowning: it only returns three values, r, g and b.

Great pack I use the grid a lot.
Where can I find materials on learning SeExpr. I want to do a line halftone SeExpr, where I could adjust the line’s thickness, spacing, and rotation.
Something like this :

Here: Introduction to SeExpr — Krita Manual 5.0.0 documentation though note that there are several other pages linked on top, so it’s better to start on that page but you might need to visit other ones too later.

1 Like

Thanks, I looked at the links and kind of managed to copy the shader…although I’m not getting quite the same result.
If I post it here, can you give it a look?
Basically the smoothing or the ‘aa’ part ins not working correctly. When I copied the code to ShaderEd(software for shader prototyping) I got the same result. But on the SeExpr I get aliased jagged lines

Sure. (And if it becomes a longer discussion, someone can just move the comments to a new thread in Develop subforum etc.)

Ok thanks for taking the time to look at it

here it is


$lineRows = 10; # 0,100
$rotate = 45; # 0,090
$lineThickness = 0.03165; 

$ratiov = $h / $w;
$uv = [$u, $v * $ratiov, 0];

$uv = rotate(uv, [0,0,1], rad($rotate));

$uvRepeat = $uv*$lineRows - round($uv * $lineRows);

$aa = $w * 0.3;
$leftSide  = (1.0 - $aa*0.005) * $lineThickness;
$rightSide  = (1.0 + $aa*.005) * $lineThickness;
$col = smoothstep($leftSide, $rightSide, length(uvRepeat[1]-0.5));

$color = [$col,$col,$col];

$color