Been thinking about the aliasing issue. If you are going by the upside down triangle, only 2 edges are aliased. Couldn’t you simply make the edges fit pixel perfectly?
Hmm I suppose the problem is lack of information. If you know it’s a triangle, you can use that fact to rotate by vertices and match them exactly. The problem is the filter is only given a raster image, so there’s no concept of shape (without getting into transforms). When you begin using rotations less than 90 degrees, edge mismatch is probably inevitable with a raster image. I might look at testing worst cases to see what reduces that error though
Hmm, I’m interested into the filter as I am a fan of tileable hex-art. That’s all I have to say here.
Ooh, I have a idea, each triangle can go into a separate layer, right? So that I can adjust these triangle individually?
VERY INTERESTING!!! That is probably near to the idea of a meshgrid representation of tilings in Matlab I wrote about on Nov. 25 and something that is useful in my batch processing context.
What about the expected run time of such a representation compared to an original CRMT-pipeline? The run time of a CRMT-pipeline is proportional to the number of proto-tiles that are distributed over the background (14 with p3m1, 28 with p6m, …) and the background area but a grid representation is independent of the number of proto-tiles and only dependent on the number of output pixels (and the interpolation method).
If I am comparing the interpolation of conformal maps to a p3m1-CRMT-pipeline with a similar image area I estimate a 2-3x faster image generation. But perhaps the expected problems in the majority of cases with more than one type of proto-tile (C1, C2,…) could make this efficiency advantage disappear.
Interesting to see that in your first image example some edge artifacts vanishes, some were reduced or transformed but some remain unchanged. So the vector method have active influence on the edge artifacts which could lead to the hypothesis that there exists parameters of the warp/interpolation function (like interpolation method) that could also solve the edge problems (two birds with one stone).
If you know the tile type (p3m1 here) you know automatically the shape of the proto-tile and its orientation bec. the same shape with another orientation and the CRMT-command list is not working properly.
You have even more control if the proto-tile is explicit generated with a mask from an input image so you have all the edge information from the mask coordinate list.
I spy a potential polished kaleidoscope filter.
That’s exactly right, it can also be very parallel - therefore it will be faster to warp from a pre-made vector map than to build one. I’m trying not to get too far ahead of myself though, there are very many options
Exactly what I’ve been thinking!
For now the plan is
- Allow multiple input tiles (might take a bit of rewriting)
- Add presets
- Easy output of vector maps
Time is once again running short, so this may happen in drips
That’s one advantage of using a vector map - it eliminates some glitches caused by imperfect input tiles (but still depends on the opacity map/shape being precise)
The current Kaleidoscope sort of mixes color where one doesn’t want them. I can certain welcome a new Kaleidoscope filter with more options that doesn’t have that problem.
I understand this is an old discussion but I am very interested in the “wallpaper” and other forms of tiling. Wrote my own python / pillow but had the same problems with lines along seams. Tried to produce good Blender UV maps (red, green) as a method but always am off by something.
Did you ever create a filter or other GMic method to create these tilings? I’m having trouble figuring out the GMic commands because everyone uses single letter commands and no comments.
I’m willing to use other software if it works.
those edge artifacts in the tilings haunted me for a long time!
As I wrote I am using Matlab for my Math Art and can therefore not helping with gmic code. But a solution was presented that worked for me for all tilings I made up today. It is about manipulating the mask with some morphological operation imdilate when the mask is in a packed binary image representation (https://www.mathworks.com/help/images/ref/bwpack.html). I insert the relevant code part but I have no idea if/how you can transfer this functionality to Python.
Let “mask” be the gray mask after drawing with insertShape like a white equilateral triangle over black background for p3m1.
BW = imbinarize(mask);
BWp = bwpack(BW);
BWp_dilated = imdilate(BWp, strel(‘square’,2), ‘ispacked’);
BW_dilated = bwunpack(BWp_dilated, size(BW,1));
mask = double(BW_dilated);
Hi, sorry for the late reply, I only have free time in short patches these days. This subject turned out to be quite a rabbit hole so I don’t plan to go further with it. The original g’mic filter “CRMT Tiles” is still present and functional, with an inpaint option to fix seams.
As @gubach mentioned, edges are a tricky problem. More so if you’re trying to fix up a re-usable vector map. The g’mic command I normally use to fix such issues is
inpaint, but you must first construct a mask image containing only the “holes”. There’s a lot of related stuff here (and many other similar threads): Scanned image scratch removal with “ICE”
Could you post an example where there are holes? No guarantees: just want to play and see what can be done about them.