Page 1 of 1

Can I program a Polygon to filter out colors behind it?

Posted: Wed Jul 15, 2020 5:05 pm
by Analog Being
I'm making a prism visualizer (like Pink Floyd's Dark Side of the moon; visualized).

It's essentially all completed, but I need to find a way to have the portion of the 'rainbow' coming from inside the prism to be filtered black/white. The portion outside of the prism will remain colored, as they are naturally.

Basically, what I'm looking for is just a triangle 'window' that does nothing but remove color inside, not outside.

Is this possible? I hope I explained this well enough :P

Re: Can I program a Polygon to filter out colors behind it?

Posted: Wed Jul 15, 2020 10:58 pm
by Sadler
Do you mean something like this?
00000000.png
00000000.png (48.04 KiB) Viewed 4528 times

Re: Can I program a Polygon to filter out colors behind it?

Posted: Thu Jul 16, 2020 12:02 am
by Analog Being
Almost. That looks more like a white polygon with some transparency to fade the colors/black; which may actually work.

What I'm trying to achieve (if possible) is a polygon that filters into a monochrome affect.

Preferably, the blacks wont be affected/faded at all, and colors would be a shade of white/gray.

Re: Can I program a Polygon to filter out colors behind it?

Posted: Thu Jul 16, 2020 7:43 am
by Sadler
What I think you need is a weighted monochrome, though this doesn't come with Magic.

Try this: https://editor.isf.video/shaders/5e7a7f ... 18206dde8e
weighted mono - intensity 0.8
weighted mono - intensity 0.8
00000000.png (17.76 KiB) Viewed 4520 times

Re: Can I program a Polygon to filter out colors behind it?

Posted: Thu Jul 16, 2020 4:03 pm
by Magic
Use the HueSaturation module and set the Saturation parameter to -1. This makes the input monochrome.

Re: Can I program a Polygon to filter out colors behind it?

Posted: Thu Jul 16, 2020 5:38 pm
by Sadler
ezgif-1-85abbde1c411.gif
ezgif-1-85abbde1c411.gif (390.41 KiB) Viewed 4511 times

Re: Can I program a Polygon to filter out colors behind it?

Posted: Thu Jul 16, 2020 6:18 pm
by Magic
Ah yes, I suppose if all the colors are already fully saturated then you'd need that. I was thinking more like this:
Capture.PNG
Capture.PNG (424.21 KiB) Viewed 4510 times

Re: Can I program a Polygon to filter out colors behind it?

Posted: Thu Jul 16, 2020 7:02 pm
by Analog Being
Thank you guys! I love how quickly everyone chimed in to help.

I managed to find another method to do this (before seeing your comments). I'm going to play around now with your other suggestions. I think "my way" may be too resource-intensive.

https://i.imgur.com/zTEUykV.jpg

Eric, I'm really enjoying your visualizers. Thank you for sharing them! I'm having a lot of fun tweaking it :)