Filtering Light?

Started by WAS, July 22, 2018, 09:52:47 PM

Previous topic - Next topic

WAS

I swear I've seen this before with stained glass, and glass in general. How does one filter the colour of light through a semi transparent object?

Hannes

You need to create a copy of your glass card to filter the light.
First disable cast shadows in your original glass card. Then make your copied glass card invisible and leave cast shadows on. Disable all your shaders in the copied one and create a simple default shader with the negative color of your red glass's color (some green is the complementary color of your red) in the opacity color slot.
I created a localised cloud to get some godrays as well. Just for fun...

WAS

#2
Quote from: Hannes on July 23, 2018, 10:53:56 AM
You need to create a copy of your glass card to filter the light.
First disable cast shadows in your original glass card. Then make your copied glass card invisible and leave cast shadows on. Disable all your shaders in the copied one and create a simple default shader with the negative color of your red glass's color (some green is the complementary color of your red) in the opacity color slot.
I created a localised cloud to get some godrays as well. Just for fun...

I see, well, that is definitely interesting. I made this scene for a quick test for both stained glass I wanted to do, and also light filtering for the underwater scene. I'm not sure how to translate for the water scene still but love that this is achievable. the only issue for glass is displacement really doesn't like to show.

These sort of instances also is where I really wish every shader made with a location was redone to accept a vector input. :( Something that would make scene building with tons of objects and SSS's a lot easier to work with. Matt's excuse that "they're old" and code hasn't been opened in years is depressing. :P

Matt

Just because milk is white doesn't mean that clouds are made of milk.

WAS

#4
Quote from: Matt on July 23, 2018, 01:09:22 PM
Quote from: WASasquatch on July 23, 2018, 12:55:42 PM
Matt's excuse that "they're old" and code hasn't been opened in years is depressing. :P

Do you mean this?

https://planetside.co.uk/forums/index.php/topic,24159.msg244769.html#msg244769

That's similar, but no, I believe I actually already asked about vector input as locations and you mentioned along those lines, it had been over a decade since you even opened the code or something and you'd likely not return to them anytime soon. No real biggy, just when you use a lot of SSS's and stuff, that rely on central locations, it'd be so convenient. You could even manipulate the vector for other locations based on central locs.