Deformation (warped fill)

Thanks Reptorian.
Yes, looking at the sample output it’s what I’m looking for.
Unfortunately I don’t know how to make out of that set of files a Gimp Python filter (and you didn’t in porting them to G’mic).
Maybe someone else could give a try.
Thanks again

It takes a lot of time to create filters like this for g’mic. Partly why I want more gmic developers here, so I wouldn’t have to spend as much time to port filters and get closer to my dream of a complete toolset that replaces pdn plugins.

1 Like

For me, the kernel idea stems from following a contour. See Blur by Color, a yet-to-be-reconstituted tutorial. Scroll down to " 4. Following Contours".

Rough outline of an idea. Start with a simple line drawing:
selfportrait_epicycle
Goal: a field of specific impulses (2 channel image). Each impulse encodes the sine and cosine of an orientation angle. Harness this to orient a tile sprite (a chip in the overall mosaic).
inpulse

Derive this orientation from -structuretensors which detects edges and calculates orientations. Something like:

gmic                                \
   -input selfportrait_epicycle.png \
   -r2dx 20%,5                      \
   -normalize. 0,1                  \
   -oneminus.                       \
   -threshold. 50%                  \
   -distance. 1                     \
   - structuretensors.              \

gmic_000001

   -eigen.                          \
   -rm..                            \
   -resize. 500%,500%,[-1],[-1],1   \
   [-1],[-1],[-1],[-1]              \
   -noise_poissondisk 10            \
   -mul

This carries the rough idea through a field of impulses encoding orientation angles that align with edges originally found by -structuretensors. Sorry: don’t have the bit on rendering tiles. `Tis a working day and meetings are coming up. Binning this field-of-impulses image out into 5 degree increments for fifteen separate binary [0,1] impulse image channels, then, for each, convolving over the impulses with a suitably rotated tile texture, then summing or otherwise blending the fifteen channel images into the output is the follow-up outline. -structuretensors tends to make colorwheel like structures; the centers of these colorwheels are points where tiling can be awkward. A mosaic artist would probably drop a chip over the point and call it a day.

Aye. There’s the rub.

It’s hard to beat di Blasi’s java app for rendering these. I managed to come close with G’MIC as you know, Diego, but still I’ll admit I like di Blasi’s Java app output more. Someone re-compiled to allow higher rez for me and I shared that compile jar file (guy deleted his profile and I have no way to attribute him doing this for me, unfortunately) at link below. :slight_smile:

http://gimpchat.com/viewtopic.php?f=11&t=18050&p=260021&hilit=mosaic#p259671

Look forward to how you did your outline grosgood. Hope you don’t mind a bit of di Blasi play textured using G’MIC’s Local Orientation preset. :slight_smile:

output

1 Like

@Reptorian

Thank you for the link.
The ‘Yobeatz/mosaic’ program is fine.
Here is a test with ‘gmicky’ with default values.

Well done for the creations of @grosgood and @lylejk

:o)

gmicky_mosaique_romaine

Sylvie, I suppose you ran the ‘Yobeatz/mosaic’ python as standalone (it’s Python3).
Do you think it’s possible to derive from that a Gimp Python filter?
(Gimp I guess is still using 2.7).

@dinasset

The ‘Yobeatz/mosaic’ program is activated with a simple command line from the terminal, for example :
python.exe mosaic.py

I believe that it is possible to activate this program from Gimp 2.10 by taking inspiration from samj Créations: Utiliser GEGL en ligne de commande avec les versions Gimp portable.

I used Anaconda to test ‘Yobeatz/mosaic’. It is relatively big and there is perhaps a simpler method.

:o)

Thanks, but are you saying that it could be called from inside a gimp plug-in written in python? (just to be more specific: with something similar to a call of another plug-in?)

PS: as you know, I write plug-ins in python which I then distribute on Gimpchat, that’s the reason of my question

@dinasset

… it could be called from inside a gimp plug-in written in python?

Yes :
http://gimpchat.com/viewtopic.php?f=9&t=18040&start=20#p256055

just to be more specific: with something similar to a call of another plug-in?

I never had this idea. It is to try.

:o)

<offtopic warning>
Hand drawn. Inspired by 3Blue1Brown’s But what is a Fourier Series? The trick to the game is to make a line drawing, but not lift the pencil from start to end - and not cross the path. Transform that single curve line drawing to its spectral equivalent, where each spectral point furnishes the size and initial angular position of a wheel, and whether the wheel rotates clockwise or counterclockwise. Except for the root, on the origin, the center of each wheel coincides with the end of the single radial spoke of the parent. Each wheel of the so-constituted wheels-within-wheels mechanism rotates at some integral multiple frequency of the root, that multiple coinciding with the wheel’s spectral coordinate. Clockwise or counterclockwise stems from whether the spectral point coordinate is above or below the Nyquist frequency. So positioned, the wheels-within-wheels ‘mechanism’ also draws the contiguous line when it is set in motion - the last wheel has a pen attached, rather than another wheel.
It is a lot of silly fun, draws the connection (literally) between the temporal and spectral domains - and was rendered with Python - not G’MIC
</offtopicwarning>


Think I’m free for the rest of the day. Maybe I can finish the thought on this mosaic tiling game…

2 Likes

Excellent Etch-a-Sketch simulation, G. :slight_smile:

A G’MIC implementation; lighting/shading model borrowed from Fingerpaint. Need to give some thought to keeping tile aspect ratio more-or-less constant. Annotated code to go to Tutorial Fragments, but not tonight (Sunday evening, N. American East Coast). Time to walk the puppy.


Goudy 1911 Ampersand


Ditto, tileified

1 Like

On the way…Thanks Garry.

Took awhile; mea culpa but a busy week ensued. Check back at T. Fragments…

@dinasset

Bonjour,

The new ‘gtutor_tileit’ filter performs very well in the current version of G’MIC-Gimp.
Here is a test performed in G’MIC-Gimp using this code :

fx_gmicky 0
blur 1
to_gray
autoindex 2
n 0,255
gtutor_tileit 10,10,2,0,0,60,0,40
rm[-2]

:o)

gmicky_gtutor_tileit

1 Like

Thanks Sylvie.

Thank you for the reminder, Sylvie. I frequently overlook Various →Custom Code backdoor in the QT plugin.

Always fun to see how other people approach a visualization, such as tiling and how your samj_Mosaic_A plays its game. It is a curious pleasure, considering that we both started from bits of ceramics plastered to walls, seeing the two approaches. You don’t think like me - and that, I think, is a very good thing. Such is the way to a colorful world.

gtutor_tileit has taken another turn - the last until I do the tutorial on it. Have fun.

1 Like

Really cool result, Sylvie. :slight_smile: