YOUR ACCOUNT

Login or Register to post new topics or replies
Mehmet Sensoy
Mehmet Sensoy
Posts: 64
Filters: 10
Hello all,
Trying to understand filter forge and using map/curve script components.
Recently I had an idea to subtract one source image from multiple other sources.

Is it possible to make ;


Main Input : Source Image
Input : Subtract Image 1
Input : Subtract Image 2...5

with map script component.

Don't you think it would be useful?

Thank you,
Best Regards.
  Details E-Mail
Indigo Ray
Adam

Posts: 1442
Filters: 82
Do you mean (series):
Output = Source - Image1 - ... - ImageN

Yes, this is possible. Just do it channel-wise (R,G,B).

---

Or do you mean (parallel):
Output1 = Source - Image1
...
OutputN = Source - ImageN

This may be possible. Map scripts, like all other components, have only one output. However, if seamless tiling is OFF, you have an unlimited plane (x,y) to work with.

Or do you mean something else?
  Details E-Mail
Mehmet Sensoy
Mehmet Sensoy
Posts: 64
Filters: 10
Hello,
Thank you for your answer;

I have created 5 inputs and written this code (without a coding knowledge:))
Of course it's not working at the moment,
Looking for your help.

Code
function prepare()
end;

function get_sample(x, y)
   
local originalimage = get_sample_map(x, y, SOURCE)   
local image1 = get_sample_map(x, y, IMAGE1)
local image2 = get_sample_map(x, y, IMAGE2)
local image3 = get_sample_map(x, y, IMAGE3)
local image4 = get_sample_map(x, y, IMAGE4)

local originalimage - local image1
local originalimage - local image2
local originalimage - local image3
local originalimage - local image4

OUTPUT =  get_sample_map(x, y, originalimage)   
   
   r,g,b,a = get_sample_map(x, y, OUTPUT)
   local r = x
   local g = y
   local b = (x + y) / 2
   local a = 1
   return r, g, b, a
end;
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
*kinda side track*

Shouldn't this be easier with just the default RGB math? Or am I missing something about the original idea.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
What is the supposed final output of this filter?

Say, you were using five of the built-in images. Once you've subtracted number two from number one, you have a darker image with features from both. What do you do with the third, fourth and fifth image?
  Details E-Mail
Mehmet Sensoy
Mehmet Sensoy
Posts: 64
Filters: 10
Actually what I am trying to achieve is to make 5-10 level separation and using bomber component (or other) create luminosity based size or repeat difference. Say brighter areas particle size for 50 px and darker areas for 10 px.

For example there is a similar filter; https://filterforge.com/filters/471.html

But additionally I would like to add custom particle and other options.

By the way I'm doing luminosity separation like this ; https://filterforge.com/filters/13579.html

Do you think if it is possible to minimize node amount using map scripts and so...?

Thank you.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
I'm pretty sure this is faster using default FF components than the map script. Likely will depend on a bajillion factors, but this should be doable with default FF stuff. As far as I understand it, it'd be pretty flexible too.

It'd be cool to do stuff with the map script regardless.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Ok, I see. I'm still not understanding where subtracting a number of images from the main image fits into this. Maybe I'm thinking about a different kind of subtracting from what you are referring to. If you mathematically subtract one image from another, by the time you've subtracted two images from a source image you pretty much have a black image as a result.

  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
Here's my take on subtractive merging. When you subtract three images together, the result is no longer in the required 0-1 range for viewing. So I added some RGB math and a gamma component to bring the image back into range. In this example I am not doing any luminance masking.

Math meets art meets psychedelia.
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
Other things to note about this method. The order of subtraction is important and will drastically change the results. Typically at least one of the images will appear as a photo "negative". Here's the filter. No controls, just an illustration of the problem.

Subtractive Result.ffxml
Math meets art meets psychedelia.
  Details E-Mail
Mehmet Sensoy
Mehmet Sensoy
Posts: 64
Filters: 10
Hello,
I have attached file, it's not like what I want to achieve.
I want to make 10 level luminosity masking. Then attaching them to pattern components (for testing I have used checker component here..) Then multiblending them again. Like adaptive size tiling filter. So my main goal asking that question was because after luminosity masking and checker pattern some patterns overlap eachother.
Only way working is using double-size repeats; for example :
-100 and -80 levels : 64 repeat w/h
-80 and -60 levels : 32 repeat ...

But here I have faced with a problem that maximum repeat value is 100.
So even I started with 2...it goes 2-4-8-16-32-64-128(!) So impossible. (This technique worked for 5 level separation)

Please check my filter and help.
By the way may be there would be smarter way to separate levels if so please let me know.
Best Regards.

10 Level Separation.ffxml
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
I think there is an easier way to mask the levels. Here is a snippet showing another method.

Luminance Masking Snippet.ffxml
Math meets art meets psychedelia.
  Details E-Mail
Mehmet Sensoy
Mehmet Sensoy
Posts: 64
Filters: 10
Thank you Rick,
I applied your method and attached file. It's getting closer, I tried to do with 5 level separation because of the reason I've mentioned in my previous post. But with 10 levels it might give better results and also I would like to scatter image(s) as particles using that technique. Any ideas? Especially for 10 level separation and repeating issue (or size increments).

Thanks again.

5_Level_Luminosity_Based_Sized_Mosaic.ffxml
  Details E-Mail
Betis
The Blacksmith

Posts: 1207
Filters: 76
It's a very strange output but I do believe this is what you're after based on the filter you uploaded Mehmet.



Luminance Tiling.ffxml
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
Mehmet Sensoy
Mehmet Sensoy
Posts: 64
Filters: 10
Thank you Betis,
I'm going to check it right now, please check my latest attachment. If there would be a way to increase separation levels it would look more natural. And also as you may notice I again it's going somewhere else (but this one also looking good as well:) ) But in my first question I was wondering how to avoid overlapping tiles or mosaics. That was because I had asked subtraction methods. I guess for example on top layer - it would be darker areas and repeat amount would be 100 but when it's lighter repeat value might decrease. Till that part it's ok but I'm trying find a way to avoid overlaps.

5_Level_Luminosity_Based_Sized_Tiler.ffxml
  Details E-Mail
Mehmet Sensoy
Mehmet Sensoy
Posts: 64
Filters: 10
Thank you Betis,
I'm going to check it right now, please check my latest attachment. If there would be a way to increase separation levels it would look more natural. And also as you may notice I again it's going somewhere else (but this one also looking good as well:) ) But in my first question I was wondering how to avoid overlapping tiles or mosaics. That was because I had asked subtraction methods. I guess for example on top layer - it would be darker areas and repeat amount would be 100 but when it's lighter repeat value might decrease. Till that part it's ok but I'm trying find a way to avoid overlaps.

5_Level_Luminosity_Based_Sized_Tiler.ffxml
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
This latest filter (5 Level) produces halftoning! When you use the dot shape, it looks exactly like halftoning. So you have halftoning with a selectable shape for the dot.

Math meets art meets psychedelia.
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
This is a completely different take on this. I produced similar results with 1 bomber using the image luminosity to control the size of the particles directly at the bomber+ size input.

Math meets art meets psychedelia.
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
And here's the modified filter. Feel free to use it or discard it. smile8)

5_Level_luminosity-1bomber.ffxml
Math meets art meets psychedelia.
  Details E-Mail

Join Our Community!

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,533 Posts
+38 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

21 unregistered users.