[REL] Interior/Exterior/Day/Night/Sunrise/Sunset Separation

share shaders here
  • Author
  • Message
Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: [REL] Interior/Exterior/Day/Night/Sunrise/Sunset Separat

no, you suppose to set those value to match enbseries.ini setting.
consider it as manual way to sync/pass enbseries's TOD to fx.

as far as I can tell, there isn't any accuracy issue unless using extreme value like overlapping dawn/dusk .
(for example, sunrise at 5, sunset at 19, dawn/dusk duration at 6, dawn/dusk overlaps between 23~01)
I suppose tod night time is for that occasion ( might be something like min(dawn/dusk - night, duration))but I didn't implement the additional computation.

also a macro example for simple DNI
reference on preprocessor operator: https://msdn.microsoft.com/en-us/library/wy090hkc.aspx

//DNI, no size limitation
#define DNI(parm) lerp(lerp( parm##_N, parm##_D, ENightDayFactor), parm##_I, EInteriorFactor)
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
*sensei*
Posts: 286
Joined: 20 Sep 2012, 00:20
Location: the perfect system

Re: [REL] Interior/Exterior/Day/Night/Sunrise/Sunset Separat

Thanks, kingeric1992.

I have incorporated your method and re-uploaded the enbeffect.fx file. Everything works beautifully in all my tests.

I have credited you for your work, and my file size thanks you as it is much more efficient than typing out lerp lines like I was.

Also, I LOVE the method for constructing the variable names out of constant suffixes. That isn't available in most programming languages, but it makes calling those functions dead sexy.

Cheers. 8-)

Offline
Posts: 4
Joined: 26 Aug 2015, 01:23

Re: [REL] Interior/Exterior/Day/Night/Sunrise/Sunset Separat

Phinix wrote:Thanks, kingeric1992.

I have incorporated your method and re-uploaded the enbeffect.fx file. Everything works beautifully in all my tests.

I have credited you for your work, and my file size thanks you as it is much more efficient than typing out lerp lines like I was.

Also, I LOVE the method for constructing the variable names out of constant suffixes. That isn't available in most programming languages, but it makes calling those functions dead sexy.

Cheers. 8-)
Dear Uber-Modders. With great respect I'd like to ask you a couple of questions that could save me a tonne of work if I'm just being silly.

1) Does the work you're discussing here allow you to change the [Time of Day] settings/values in-game, dynamically? What I mean is, can you have a script running that changes the TOD settings periodically without having to call up the ENB config menu in-game?

2) If not, is it possible to do what I'm asking?

Reason: I have some "simple" equations into which you can plug the day of the year and location (latitude) to calculate the TOD settings based on seasonal changes and latitude within Skyrim. This includes length of twilight and accommodates far-northern locations with seasonal extremes resulting in "midnight sun" and "noonday night". A second set of equations calculates the position of the sun in the sky according to hour, day, latitude, and longitude, but that might be going too far.

Anyway, given my current workload it might take me several years to learn enough about modding to implement this, but I think it would be cool to have seasonally adjusted daylight hours, updated day-to-day or when crossing cells, throughout Skyrim. At the moment I just edit my TOD settings each session according to the day of the year in-game.

Thanks for any advice (including "Forget it!" if that's what you'd recommend ;) ),
-m

Offline
*sensei*
Posts: 286
Joined: 20 Sep 2012, 00:20
Location: the perfect system

Re: [REL] Interior/Exterior/Day/Night/Sunrise/Sunset Separat

Hi Mikey,

I really like that idea for a mod, especially if it also changes atmospheric colors a bit and other things like grass, leaves, and snow cover to match. I thought about doing something like this at one point but just never got back to it.

I believe what you are suggesting could be partially achieved through a combination of .ESO mod and shader code. I am currently in the hospital with 22 electrodes glued to my scalp, so I don't have all my links, though I should be out tomorrow.

Thing is, to do it right would require a TON of work and some changes to the ENB code.

Basically the method would be similar to what Jawz uses to pass interior/dungeon separation information to the ENB shader code. You would need to have some custom image space values for I believe the Fade setting, and set the shader separation values based on those results. The bulk of the work would then be switching to a duplicate set of climate value (I think this is set regionally) whenever the seasons change. To be honest I don't know if Skyrim lets you do that on the fly, but that would cover the custom separation at least.

The problem is the [TIMEOFDAY ] values do not have their variables exposed in ENB so all the "vanilla" ENB values have to be set manually. Perhaps if we offer Boris firstborns (wait, that was Sheson), he will add those to the global variables, but that might involve some recoding where they are initialized.
Post Reply