Previous topicNext topic

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

Questions, comments, feedback, etc.
Post Reply
Analog Being
Posts: 12
Joined: Tue Apr 21, 2020 3:50 pm

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

Post 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
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

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

Post by Sadler »

Do you mean something like this?
00000000.png
00000000.png (48.04 KiB) Viewed 4524 times
Analog Being
Posts: 12
Joined: Tue Apr 21, 2020 3:50 pm

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

Post 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.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

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

Post 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 4516 times
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

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

Post by Magic »

Use the HueSaturation module and set the Saturation parameter to -1. This makes the input monochrome.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

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

Post by Sadler »

ezgif-1-85abbde1c411.gif
ezgif-1-85abbde1c411.gif (390.41 KiB) Viewed 4507 times
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

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

Post 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 4506 times
Analog Being
Posts: 12
Joined: Tue Apr 21, 2020 3:50 pm

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

Post 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 :)
Post Reply