Gimp-Forum.net
ofn-tartan - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: ofn-tartan (/Thread-ofn-tartan)

Pages: 1 2


ofn-tartan - Ofnuts - 06-07-2021

Somewhat automated a recent tutorial.


Starting with this:

[attachment=6148]

The script produces this:

[attachment=6147]

And optionally this:

[attachment=6149]

At the usual place.

Slàinte Mhath!


RE: ofn-tartan - Krikor - 06-07-2021

(06-07-2021, 03:37 PM)Ofnuts Wrote: At the usual place.

Slàinte Mhath!

Mòran taing!  Wink


RE: ofn-tartan - Ofnuts - 06-08-2021

Updated with some restrictions lifted some more bells and whistles....


RE: ofn-tartan - Krikor - 06-08-2021

(06-08-2021, 08:46 AM)Ofnuts Wrote: Updated with some restrictions lifted some more bells and whistles....

Would it be easy (or possible) to make the plugin insert pre-informed silhouettes (logos, etc) into the final unhatched areas of the tartan?

I wanted to get something like this (obtained after execution of the plug-in - manually).
[Image: 8VHaxRh.jpg]

But understandably what I get is something like:
[Image: CqpmImn.jpg]

Not a real necessity, as manual insertion is possible and not so laborious.


RE: ofn-tartan - Ofnuts - 06-08-2021

There are no un-hatched areas. Like on a real tartan, you get a uniform color when warp and weft are the same color, but in 4 consecutive vertical pixels two are from the warp and two from the weft. And the hatching is really the alternance between warp and weft, because tartan is woven like this:


[attachment=6154]



RE: ofn-tartan - Ofnuts - 06-09-2021

A couple more fixes (performance improvement and image names).


RE: ofn-tartan - Ofnuts - 06-10-2021

One more performance tweak (100x gain Wink), and a None option for the weaving pattern.


RE: ofn-tartan - Krikor - 06-10-2021

(06-10-2021, 09:37 AM)Ofnuts Wrote: One more performance tweak (100x gain Wink), and a None option for the weaving pattern.

The new 'None, Transparency' option is cool! 
=============//-//=============

I started with a 100x200 px image, getting a 400x400 px tile to be used as a pattern.
But I needed to reduce this pattern by 25% (maybe even more than 25%) to use it in an image.
[Image: 7niLaFn.jpg]
Even if I set it with Scale = 1;Test image (W/H) = 1; I still get a 200x200 px tile, which is still bigger than what I got with the previous 25% reduction.

I use another plugin/script to scale the obtained pattern, but not everyone has this plugin or even knows of its existence.

If Ofn-tartan.py could offer this option to get a desired % in the final tile, it would avoid the need for another plugin just for that.  Idea

Thx!


RE: ofn-tartan - Ofnuts - 06-10-2021

If your image 100px wide, you should get a 200x200px tile.

Why do you need a plugin to scale the result? What does it do that the Scale tool or Layer ➤ Scale layer won't do?


RE: ofn-tartan - Krikor - 06-11-2021

(06-10-2021, 11:17 PM)Ofnuts Wrote: If your image 100px wide, you should get a 200x200px tile.

Well... I can get 200x200 px even with the initial image being 100x200 px.
Just use: Scale =1; Test image W=1; Test image H=1;
But I wanted it even smaller, so I scaled it down by 25%.

(06-10-2021, 11:17 PM)Ofnuts Wrote: Why do you need a plugin to scale the result? What does it do that the Scale tool or Layer ➤ Scale layer won't do?

You are absolutely right! I've done it in the same way so many times that I forgot that there are 1001 other ways to do the same thing! My bad.  Rolleyes

Thx.