YOUR ACCOUNT

Login or Register to post new topics or replies
Malkyne
Posts: 22
Filters: 12
So, this is how I usually palletize, in a filter:



The script in there basically grabs all the hue inputs, and sorts them, based on their grey value, and then distributes the bands properly across the gradient output. When the resulting gradient is pushed into the elevation gradient component containing the picture's original hue profile, it reassigns the picture's hues to the proper gradient bands (i.e. the proper color buckets).

What I want to know is: Is there a better way to do this? Also, is there a good way to replace my script with components, without it turning into a huge, monstrous beast? Recently, the script became much more hideous, because I can no longer pre-process my input hue samples in the "prepare" function (and I don't want to switch them to less user-friendly hue-sliders... and I can't think of any way to convert sample inputs down to scalar inputs).
  Details E-Mail
CFandM
ForgeSmith

Posts: 4770
Filters: 267
Something like this.. smile;)

Grad.ffxml
Stupid things happen to computers for stupid reasons at stupid times!
  Details E-Mail
Malkyne
Posts: 22
Filters: 12
I'm not sure I was sufficiently clear about what I'm trying to do.

Hopefully, this image will clarify:



To reiterate: I am replacing the original hue with the nearest hue out of the user-supplied palette.
  Details E-Mail
Indigo Ray
Adam

Posts: 1442
Filters: 82
My palette snippet does something like this. You choose some colors, and the filter finds colors in the image that are similar to each of your colors (not just hue), and then the filter forces these similar colors to be exactly the colors you chose. You can also choose how similar is "similar" via thresholds and smoothness controls.

You could modify my snippet to act only on hue as opposed to hue, saturation, and brightness combined. Good idea. smile:)
  Details E-Mail
Malkyne
Posts: 22
Filters: 12
Quote
My palette snippet does something like this. You choose some colors, and the filter finds colors in the image that are similar to each of your colors (not just hue), and then the filter forces these similar colors to be exactly the colors you chose. You can also choose how similar is "similar" via thresholds and smoothness controls.


Thanks, Indigo. I'll have a look, when I have a few minutes!
  Details E-Mail
Indigo Ray
Adam

Posts: 1442
Filters: 82
tease.

  Details E-Mail
Malkyne
Posts: 22
Filters: 12
OK, I see what you're doing, Indigo! Use of Difference is pretty clever there, I must say. I think that, for my current purposes, mine is probably providing a result that is closer to what I need, but I think I want to experiment with some of the ideas in your filter a bit, because it interests me.

That's part of the fun with Filter Forge -- sharing ideas!
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
  Details E-Mail
Indigo Ray
Adam

Posts: 1442
Filters: 82
Well, here's my mod of my filter (as seen in the above image).

Sphinx's filter is so cool! It works with images too!

We could even make a color swapper that, for example, finds all the reds and replaces them with purples while leaving the other colors untouched.

appetizing palletizing.ffxml
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
If I understand you correctly, I think the Collage filter does exactly what you want: Each color/image slot is used when it is the best match. The algorithm looks at the distances in the 3D color space made up by red, green and blue. So to put it differently: the color/image sample that is closest (least distance) to the original image color is used.
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,720 Registered Users
+9 new in 7 days!

153,546 Posts
+6 new last day!

15,348 Topics
+71 new in year!

Create an Account

Online Users Last minute:

23 unregistered users.