Genma Saotome, on 26 September 2018 - 02:51 PM, said:
In the ideal any date that is used to determine the sun's location relative to the earth's annual journey should be a new parameter brought in with each activity.
It depends on how sophisticated the current sun position calculation.
(For example my case i have gps coordinate difference between msts and orts. Not big but it is there)
As i see right now date it is derived from season setting (getting day of the year then convert into month, then sets 21th day of that month)
I know there is no date only season setting in the activity file (i guess that is why the decision was like this at that time)
mstsskyseasonType = (int)MSTSSkyViewer.Simulator.Season;
date.ordinalDate = mstsskylatitude >= 0 ? 82 + mstsskyseasonType * 91 : (82 + (mstsskyseasonType + 2) * 91) % 365;
// TODO: Set the following three externally from ORTS route files (future)
date.month = 1 + date.ordinalDate / 30;
date.day = 21;
date.year = 2017;
So my recommendation:
- get the date of windows date
- set it somewhere in the program UI
- set the parameter somewhere else (activity file, route file)
Once we sorted the sun's position. As second step we need to move forward the sky and environment&ambient coloring at sunset/sunrise that was also env file feature in msts (maybe it is shader or program issue)