It is currently Mon Apr 15, 2024 8:16 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 625 posts ]  Go to page 1, 2, 3, 4, 5 ... 32  Next
Author Message
 Post subject: new filter "TexturizeByColourArea" (updated)
PostPosted: Sat Jun 11, 2016 8:12 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Plug-in Title : "TexturizeByColourArea"
Gimp Menu : "<Image>/Diego/Quantize"
Release : 1.0 (initial)
Author : Diego Nassetti (dinasset - gimpchat.com)
Licence : GNU General Public License

System Environment used in development
--------------------------------------
Platform : Windows 10 64-bits
Graphic Apps : Gimp 2.8.16
G'mic 1.7.2
Language : python as included in Gimp

Extrn Filters : (Gimp) script_fu_chisel (by Rob Antonishen)
available under Gimp-chat Scripts&Plug-ins as "Chisel Or Carve"


Summary
Filter to implement the creation on a NEW IMAGE (dimension is a user option)
starting from an RGB* input image
where colours are quantized using the temporary conversion of the image
from RGB to Indexed (nr of colours is a user option)
each color area is filled with a SELECTED SET OF TEXTURES (user option).
Filter has been created on the basis of Gimp-chat threads "Ive got Wood!" & "Let's carve some wood".
Even if the main use will be with patterns in wood, it has been generalized
so that you can use any set of textures you like, patterns or gradients
(for this reason "wood" does not appear in the filter's name)

Details
Flow implemented to get the final result:

1. calculate the new image width and height scale for the output (user choice for dimensions)
2. save and set-up context values
3. create the new image by appropriately scaling the input image dimensions
4. create the BG layer for the new image by copying the input layer, scaled
5. add alpha to the layer is not present
6. create a new layer (dup of the BG) for smoothed colours, SOFTLIGHT
7. apply G'MIC Anisotropic Smoothing
8. create a new layer (dup of the Smoothed Layer) for the quantization
9. transform the image from RGBA to Indexed, with the user chosen number of colours
10.create a temporary palette
11.back to RGBA
12.load the complete set of textures chosen: array of names and calculated luminosity values
the textures may be patterns as well as gradients
13.loop on each different color area, selected by using the palette
a- if the user choice is for having the best texture matching by luma, do so
otherwise choose a random texture
b- if the colour area (in pixels) is small the width value is small and the effect is chisel, if it's big the width value is big and the effect is carve, if medium the width value is medium and the effect is chisel
c- fill the area with the chosen pattern/gradient
d- apply the chisel/carve filter
e- merge the layer created by the chisel into the source layer
14.set the texturized layer to GRAIN-MERGE
15.create a new layer from visible and set to SOFT-LIGHT at 45% opacity
16.if the user chose to perform an artistic post-processing,
apply the selected one
17.if the user chose to perform a colour postprocessing,
apply the selected one;
the following artistic post-processes are selectable:
"Graphic Boost",
"Graphic Novel",
"Anguish",
"Colored Pencil",
"Make Squiggly",
"Poster Edges",
"Posterized Dithering",
"Samj Texture Coloree".
the following colour post-processes are selectable:
"Chroma Boost",
"Color Balance",
"Sepia",
"Metallic Look - Silver",
"Metallic Look - Copper",
"Metallic Look - BlueSteel",
"Textured Glass".
18.if the user chose to move the background layer on top,
raise BG to the top and even duplicate it to allow
the use of combined modes and opacities
19.Analyze the BG Layer luminosity and set the top layer mode to:
- color if the image is very dark
- multiply if the image is very light
- hard-light otherwise
20.flatten the image is requested, recalling nr of colours and type of filler in the drawable name

Acknowledgments
This filter has been thoroughly tested by my dear gimp-chat friend Issabella (thanks a lot!)
her suggestions were carefully taken into consideration for the final release


=================================================================

Releases (all releases will be dropped in here)
Initial Release
Attachment:
DIEGO_QUANTIZE_TexturizeByColourArea.7z [7.55 KiB]
Downloaded 383 times


Edit:
new release (with a different name)
Attachment:
DIEGO_QUANTIZE_TexturizeByAreaByColour.7z [8.2 KiB]
Downloaded 264 times


For the fans of this filter (particularly for animicule ...!) I publish here a new release, which has a different name to let the user keep both releases
The main difference is that among the options it is now available a new one:
"best luma & colour"

the option "random" has been removed

Hope you enjoy it

_________________
"Where am I ?"


Last edited by dinasset on Wed Aug 10, 2016 4:40 am, edited 5 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:18 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Some indications:
a) defaults work fine in the majority of cases bur many alternative options are available
b) choose a suitable image for input (I can't say which one is suitable or not, just try....)
c) prepare a set of textures (initially I recommend wood textures) with a common subset in the name (default is "MyWood", you have to put your common subset name: remember that the tule of the function to search will include all textures having a name with:
-whatsoever initial subset of characters
-your indicated discriminant subset
-whatsoever final subset of characters
In case of default you will be able to select (for instance from gimp patterns) patterns with the following names:
-MyWood001
-newMyWood
-aaaMyWoodbbb
etc.

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:21 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
(indications, follows)

if you make your first try with the default parameters and you do not have any pattern with embedded the word MyWood the filter abends with an error message

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:23 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
(indications, follows)

the Chisel/Carve roundness specifies whether you like to see the "cut" hard (0.1) or soft (1.0).
default is average (0.5)

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:26 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
(indications, follows)

the filter uses normally the "chisel" effect, but if you have big areas (think about a big BG with a silhouette as FG), then the "carve" effect is applied on the big area(s)

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:42 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
a first example with 9 colours

Attachment:
P1040733-9colors.png
P1040733-9colors.png [ 3.89 MiB | Viewed 6057 times ]


depending on how many colour-areas you "see" in the source image, you can reduce/increase the default number of colours (11)
the range can vary from 4 to 64 (even if more than 32 is normally not suitable)

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:46 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
same source image but after changing the roundness parameter to 1.0

Attachment:
P1040733-9colors-round.png
P1040733-9colors-round.png [ 3.92 MiB | Viewed 6055 times ]


you can see how the chisel effect is smoother

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:53 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
if you change the parameter "Fillers selection method" to "Random", you get a different result at each run

same source image, same parameters, run twice

Attachment:
P1040733-9colors-round-random1.png
P1040733-9colors-round-random1.png [ 4.65 MiB | Viewed 6050 times ]

Attachment:
P1040733-9colors-round-random2.png
P1040733-9colors-round-random2.png [ 4.95 MiB | Viewed 6050 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 8:59 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12636
Location: Spain, Aragón
Thank you so much Dinasset. You know how much I enjoy your filters.
Here I post some of our tests made with this wonderful filter.


Attachments:
3-bucciali-tav-8-32-saoutchy-Chroma Boost.jpg
3-bucciali-tav-8-32-saoutchy-Chroma Boost.jpg [ 1.32 MiB | Viewed 6047 times ]
Altea-wood-default-hardlight-11colours.jpg
Altea-wood-default-hardlight-11colours.jpg [ 1.88 MiB | Viewed 6047 times ]
fadd-Wood-DuplicateBG-GraphicBoost-.jpg
fadd-Wood-DuplicateBG-GraphicBoost-.jpg [ 1.18 MiB | Viewed 6047 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 9:00 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12636
Location: Spain, Aragón
and these,


Attachments:
ocean-rocks-Wood-default-11colours.jpg
ocean-rocks-Wood-default-11colours.jpg [ 1.45 MiB | Viewed 6047 times ]
Barcelona-Gaudi-wood-default-multiply-11colours.jpg
Barcelona-Gaudi-wood-default-multiply-11colours.jpg [ 1.36 MiB | Viewed 6047 times ]
best_pink_roses-Sepia-.jpg
best_pink_roses-Sepia-.jpg [ 774.2 KiB | Viewed 6047 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 9:03 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12636
Location: Spain, Aragón
Thank you Dinasset for your work invested in this new filter. All of us will be able to play with it getting very nice results. :tyspin


Attachments:
paisajes-casas-Wood-default-11colours.jpg
paisajes-casas-Wood-default-11colours.jpg [ 1.65 MiB | Viewed 1233 times ]
IMG_2983-wood-default.JPG
IMG_2983-wood-default.JPG [ 1.25 MiB | Viewed 1233 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 9:05 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12636
Location: Spain, Aragón
This one is my preferred. :)


Attachments:
Santuario della Beata Vergine delle Grazie Pordenone-MetallicCopper.jpg
Santuario della Beata Vergine delle Grazie Pordenone-MetallicCopper.jpg [ 1.09 MiB | Viewed 1233 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 9:16 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
(indications, follows)

if you want to see the outcome in ONLY WOOD (or whatever texture) set visibility off in the 3 default top layers
in this case it is recommended to use option Best Luma and not Random for the selection of the textures
(obviously "Random" does not distinguish between dark and light areas)
see the two examples below
a) only wood with wood textures selected by Luma
Attachment:
P1040733-9colors-round-ONLYwood.png
P1040733-9colors-round-ONLYwood.png [ 4.06 MiB | Viewed 1231 times ]

b) only wood with wood textures selected randomly
Attachment:
P1040733-9colors-round-ONLYwood-random2.png
P1040733-9colors-round-ONLYwood-random2.png [ 5 MiB | Viewed 1231 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 9:30 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
(indications, follows)

if you like the "carve" effect, prepare or choose an image with a big single-color BG area
example

Attachment:
rose-carved.png
rose-carved.png [ 4.5 MiB | Viewed 1230 times ]


...or ONLY WOOD, selected by Luma

Attachment:
rose-carved-ONLYwood-byLUMA.png
rose-carved-ONLYwood-byLUMA.png [ 3.4 MiB | Viewed 1230 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 10:07 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
for something different
used gradients

Attachment:
rose-carved-with-gradients .png
rose-carved-with-gradients .png [ 2.37 MiB | Viewed 1227 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 10:09 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Impressive results, folks; Diego does it again. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 10:10 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12636
Location: Spain, Aragón
I did this comparison too. Here two different results on the same picture in wood.
Thanks Diego :jumpclap :jumpclap :jumpclap


Attachments:
RosesInWood.PNG
RosesInWood.PNG [ 2.47 MiB | Viewed 1226 times ]
Pink Roses-wood-Sepia-Graphic Novel-10colours.PNG
Pink Roses-wood-Sepia-Graphic Novel-10colours.PNG [ 3.77 MiB | Viewed 1226 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 10:14 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
let me play with gradients again...

Attachment:
rose-carved-with-gradients2 .png
rose-carved-with-gradients2 .png [ 2.92 MiB | Viewed 1225 times ]


pls note: results with gradients always apply a random shape, so they may look different at each run

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 10:20 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
a third one, then I will stop....

Attachment:
rose-carved-with-gradients3 .png
rose-carved-with-gradients3 .png [ 3.32 MiB | Viewed 1225 times ]


only to show different possibilities, patterns are better, especially wood patterns

_________________
"Where am I ?"


Top
 Post subject: Re: new filter "TexturizeByColourArea"
PostPosted: Sat Jun 11, 2016 10:36 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12636
Location: Spain, Aragón
I had to try with gradients, too. Lovely results IMO. :) :bigthup


Attachments:
Used Gradients.PNG
Used Gradients.PNG [ 1.4 MiB | Viewed 1224 times ]
With Gradients.PNG
With Gradients.PNG [ 3.44 MiB | Viewed 1224 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
Post new topic Reply to topic  [ 625 posts ]  Go to page 1, 2, 3, 4, 5 ... 32  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) cli345's cartoon filter as a native GEGL Filter.

10

No new posts Attachment(s) Made with new filter in G'mic

23

No new posts Attachment(s) what filter might help with this image?

7

No new posts Found a 'new' (for me) Filter

0

No new posts Attachment(s) My last Aquarelle filter

21



* Login  



Powered by phpBB3 © phpBB Group