Page 1 of 1

How to dim a layer at nightfall?

Posted: Mon Nov 28, 2022 11:02 pm
by mexster
The title describes my issue. As the sun goes down i need less light output, and when the sun goes up again i need to go back to 100%.
So what i tried is
* draw a black rectangle "Nightfademask" over my visual.
* control its opacity with Weather->Time→Night position.
* When night starts (as Night Position goes from 0 to 0.1) i dim the mask from 0 to 20%

This works… partially.
Problem: after the night is over (Night Position jumps from 1 to 0 again while Day position begins to increase), my Opacity channel doesn't go back, it stays 20% which seems illogical to me.

Also, this would give me a nice slow fade after sunset, but it theoretically would jump back abruptly at sunrise.

So… this concept is flawed and it straight up doesn't seem to work for reasons i don't yet understand.

Please elucidate me: How would I do this properly? Can't we do a more complex mapping where, as night goes from 0…1 my opacity value can go from 0% to 20% and then back to 0%? Any way to use math expressions in control params perhaps?

Re: How to dim a layer at nightfall?

Posted: Wed Nov 30, 2022 2:17 pm
by franz
I think you're doing it correctly - except you could link your main quad's opacity directly to the Night Position, inverting the target in the control list -. When Night position goes back to 0, the quad should be full on.
I tested it here - by changing the location actually - , and it is working as expected.
There seems to be a bug on your side. Mac or Windows, MM version ?