Logarithmic Sun Intensity
- Freak2121
- Posts: 60
- Joined: Fri Sep 08, 2017 6:14 am
Logarithmic Sun Intensity
So, this is something that has been bugging me for a while, I just didn't know exactly how to describe it. The sun intensity curve in Daggerfall Unity, over the course of the day, is kinda bad. Mornings are unnaturally dark and gradually ramp up to peak brightness at noon, before falling off in the same manner. It's very jarring IMO. It's not because it's faulty or a bad curve or anything, technically it's correct, but it's just that it's mapping sun-intensity in a linear, 1:1 fashion. Human eyes, however, perceive brightness differences logarithmically. It's why the morning doesn't look very dark compared to noon, or why when you're indoors and look at a sunlit tree through your window, it doesn't appear literally 50 times brighter than your well lit room, even though it is.
Here's two graphs to show the difference:
Linear:
Logarithmic:
As you can see, with a linear light curve, it takes four hours under a linear curve to reach an apparent brightness which would only take 30 minutes under a logarithmic curve.
So, what I'm asking is, is it possible to implement a logarithmic light curve, and can anyone do it?
Here's two graphs to show the difference:
Linear:
Logarithmic:
As you can see, with a linear light curve, it takes four hours under a linear curve to reach an apparent brightness which would only take 30 minutes under a logarithmic curve.
So, what I'm asking is, is it possible to implement a logarithmic light curve, and can anyone do it?
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: Logarithmic Sun Intensity
Do we know where this is in the code? I know very little about this side of the engine. The lerping to create whatever curve we need for a natural sun rise, sun set light cycle is easy to do. I use lerping curves every where in my combat mods.
https://chicounity3d.wordpress.com/2014 ... ike-a-pro/
https://chicounity3d.wordpress.com/2014 ... ike-a-pro/
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
- Freak2121
- Posts: 60
- Joined: Fri Sep 08, 2017 6:14 am
Re: Logarithmic Sun Intensity
It's right here.
- pango
- Posts: 3359
- Joined: Wed Jul 18, 2018 6:14 pm
- Location: France
- Contact:
Re: Logarithmic Sun Intensity
Hi Freak2121,
Well, in theory should it matter, given you also look at the game thru your eyes?
But you don't only see DFU world, at the same time you also see the UI, not to mention everything else in your field of vision around your screen, so it's just that the model you suggest is not sufficient.
By the way, concerns about light curve have already been discussed elsewhere.
Well, in theory should it matter, given you also look at the game thru your eyes?
But you don't only see DFU world, at the same time you also see the UI, not to mention everything else in your field of vision around your screen, so it's just that the model you suggest is not sufficient.
By the way, concerns about light curve have already been discussed elsewhere.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
- Freak2121
- Posts: 60
- Joined: Fri Sep 08, 2017 6:14 am
Re: Logarithmic Sun Intensity
In theory, yes. But I don't have an HDR display nor does the game support HDR, so one can't really rely on their eyes to naturally adjust. A standard display just doesn't have the range for it.
I mean, even just setting the light curve like this is enough to get it the day-night transition looking natural, at least in my opinion.But you don't only see DFU world, at the same time you also see the UI, not to mention everything else in your field of vision around your screen, so it's just that the model you suggest is not sufficient.
The sky and the world begins lighting up just before sunrise, and once the sun is up it quickly transitions to near-full brightness.
Implementing a new model of lighting might fix it in the future but there can be a pretty easy fix right at this moment. I just don't know how to make a such a mod for Unity.
That's good to know, thanks.By the way, concerns about light curve have already been discussed elsewhere.
-
- Posts: 256
- Joined: Thu Nov 21, 2019 9:27 pm
- pango
- Posts: 3359
- Joined: Wed Jul 18, 2018 6:14 pm
- Location: France
- Contact:
Re: Logarithmic Sun Intensity
The point is different, but technically questions are related, and I think a lot of the answers are also shared: goal to match classic, move to linear colorspace that will require revisiting light curve in any case.Lokkrin Zhataros wrote: ↑Mon Jan 04, 2021 6:55 pm The issue I brought up in that topic has little to nothing to do with the light curve from Sunrise to Sunset. It was about the light 'intensity' at Peak Daylight during particular weather/time of day that in my opinion is unnaturally bright. So not related to this topic.
And as you said that may result in the need for a mod, if lighting can't both match classic (or close enough) and at the same time look natural enough to some players.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
-
- Posts: 256
- Joined: Thu Nov 21, 2019 9:27 pm
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: Logarithmic Sun Intensity
Mods or ingame options:
Daylight curve - classic/advanced (with tooltip explanation when you hover cursor over it)
Daylight curve - classic/advanced (with tooltip explanation when you hover cursor over it)
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Logarithmic Sun Intensity
DFU's daylight curve is not linear. It's a hand-tuned curve to try and match classic's brightness peaks in morning and afternoon as closely as possible. Below is the curve used ingame. It has a sharper ramp up and down in morning and afternoon, and a more gradual curve during middle of day. This curve is found in SunlightManager component on Exterior/SunlightRig/SunLight object.
It would be a rather easy curve to change by a mod if anyone wants to.
It would be a rather easy curve to change by a mod if anyone wants to.