Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ofn-tartan
#1
Somewhat automated a recent tutorial.


Starting with this:

   

The script produces this:

   

And optionally this:

   

At the usual place.

Slàinte Mhath!
Reply
#2
(06-07-2021, 03:37 PM)Ofnuts Wrote: At the usual place.

Slàinte Mhath!

Mòran taing!  Wink
Reply
#3
Updated with some restrictions lifted some more bells and whistles....
Reply
#4
(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.
Reply
#5
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:


   
Reply
#6
A couple more fixes (performance improvement and image names).
Reply
#7
One more performance tweak (100x gain Wink), and a None option for the weaving pattern.
Reply
#8
Lightbulb 
(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!
Reply
#9
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?
Reply
#10
(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.
Reply


Forum Jump: