xirja
![]() |
Predominant Colors by Elentor
http://www.filterforge.com/filters/14372.html ![]() _____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|
Posted: July 22, 2017 9:53 pm | ||
xirja
![]() |
Great concept here. It would be perfect if you could rewrite the script to output across the row and then scale down instead of up. The scale component is a major slowdown. Otherwise an excellent filter.
_____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|
Posted: July 22, 2017 10:00 pm | ||
Fernanda Pires |
Hey, thanks.
There's not much I can do about it at the moment that I know, but I'm open to suggestions from seasoned snippet writers. I added the scale component with the intent to allow you to visualize it quickly if you just want the color output in a few pixels - the script would be a lot faster if it only ran once instead of once per pixel but that would require either: 1) Access to bitmaps from the Prepare() function 2) Buffer a pixel in memory so that it's not re-rendered when it's accessed. The way it works right now is that even if you're scaling the exact same pixel across multiple other pixels, the original Map function is called every time that happens. Otherwise we could output just four pixels and then scale their final bitmap values for what would be a gigantic increase in performance. |
|
Posted: July 23, 2017 3:12 am | ||
xirja
![]() |
Had hacked apart Bitmap buffer for my own 1 channel x(top row only) streamlined purposes. I can't seem to get it back to a functional 4 channel script, and add a second buffer, but hopefully this will help?
Predominant Colors 3.ffxml _____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|
Posted: July 23, 2017 3:48 pm | ||
Fernanda Pires |
Oh I didn't know about that snippet. That's a clever idea. And it's indeed much faster and opens up room for a lot of improvements in the algorithm.
I'll play around with it and release an update. Thanks! |
|
Posted: July 24, 2017 12:39 am | ||
xirja
![]() |
Cheers, thank you!
_____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|
Posted: July 24, 2017 1:53 pm | ||
xirja
![]() |
![]() _____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|
Posted: July 30, 2017 4:29 pm | ||
Indigo Ray
![]() |
||
Posted: July 30, 2017 5:58 pm | ||
xirja
![]() |
Yeah, this Image may be helpful to debug the color code. Probably the rectangular
nature that makes it so hard. Random offsets will likely fix this one. ![]() _____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|
Posted: July 30, 2017 10:23 pm | ||
Fernanda Pires |
I'm gonna remove the grid component in a future update. Its original purpose was to speed up the filter by turning every image into a 8x8 grid. I didn't want to remove it now because the filter already existed and someone might already have their settings configured.
For now it's kinda simple to remove it, just link the image directly into the nodes that use the grid. This should improve the precision of the filter a lot. |
|
Posted: July 31, 2017 1:05 am |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,531 Posts
+36 new in 30 days!
15,347 Topics
+72 new in year!
10 unregistered users.