Dynamic weather WeatherChange activity event
#11
Posted 04 June 2015 - 07:30 AM
I think it would be nice to not only set the season and precipitation at the beginning of an explore or timetable session but to also have sliders for overcast, fog, and precipitation at the beginning of the session.
I do like the idea of having progressive weather changes.
Thanks
Basil
#12
Posted 04 June 2015 - 11:57 AM
Csantucci, on 02 June 2015 - 11:14 AM, said:
Referring precipitation intensity maybe I'll try to integrate Edward's patch, if he agrees. It would be nice also to have a smooth transition from rain to snow, but that requires fine graphics work.
Another parameter that could be added is wind (intensity, direction, variance - meaning intensity and direction are not constant).
I have no problem here. Just let me know when you need it. The type of work that needs to be done is applying some random action to the individual particles. Wind would of course push the precipitation in a certain direction, but as it is now, the particles fall the same way.
Edward K.
#13
Posted 04 June 2015 - 12:51 PM
Edward K.
#14
Posted 06 June 2015 - 07:17 AM
edwardk, on 04 June 2015 - 12:51 PM, said:
We need some sort of maximum to be defined, for at least two obvious reasons:
- The audio volume is based on current/maximum intensity.
- The user can dynamically change the intensity and there needs to be a limit to avoid breaking things (like running out of space in the vertex buffer).
#15
Posted 07 June 2015 - 12:29 AM
Edward K.
#16
Posted 07 June 2015 - 06:25 AM
#17
Posted 07 June 2015 - 07:54 AM
Here
Runactivities.zip (1.39MB)
Number of downloads: 609
a file to be unpacked within the OR program folder is attached. It includes the two Runactivity exes, as well as 10 additional raindrop/snowflake textures (see revised specification).
Here
Testweather.zip (2.46K)
Number of downloads: 630
a packaged demo activity for route Japan1 is attached.
After starting the activity don't run the train; instead, select camera view 4 and watch: you will get messages about what is happening; first the weather will become cloudy, then also foggy, then it will start raining, than the rain will slowly become snow (new OR feature), then the snow will slowly stop, the fog will disappear and finally the weather will return clear.
The weather changes are triggered by time events. The activity includes also location events, that are not significant for this demo.
Referring to the transitions from rain to snow and vice-versa, first of all 10 new types of precipitation textures have been introduced, that represent intermediate precipitiation types from rain to snow. Moreover a smooth transition has been introduced for the two parameters that distinguish rain to snow, i.e. wind speed and particle speed/duration.
I add here also a comment on wind in OR. There are two winds in OR: one is used to "shift" precipitation particles, and the other one is used to "shift" exhaust particles. The two winds have no relationship, which does not seem so nice.
There are still improvements needed, particularly referring to fog distance change speed: at near distances fog distance varies too fast. It seems also to me that in the rain to snow transition there are small "trains" of 2 to about 5 raindrops/flakes falling from the same position. Also some reset conditions after execution of these events have to be managed better.
P.S. Updated copy of Runactivities.zip
9/6/2015 P.P.S. Updated copy of activity and of Runactivities.zip
19/6/2015 P.P.P.S Updated copy of activity that didn't unzip correctly
#18
Posted 07 June 2015 - 12:10 PM
Csantucci, on 07 June 2015 - 07:54 AM, said:
Here
Runactivities.zip
a file to be unpacked within the OR program folder is attached. It includes the two Runactivity exes, as well as 10 additional raindrop/snowflake textures (see revised specification).
I think you're missing Orts.Formats.Msts.dll (and possibly other changed files):
System.MissingFieldException: Field not found: 'Orts.Formats.Msts.Event.ORTSWeatherChange'. at ORTS.Viewer3D.WeatherControl.Update(ElapsedTime elapsedTime) at ORTS.Viewer3D.World.Update(ElapsedTime elapsedTime) at ORTS.Viewer3D.Viewer.Update(RenderFrame frame, Single elapsedRealTime) at ORTS.Processes.GameStateViewer3D.Update(RenderFrame frame, Double totalRealSeconds) at ORTS.Processes.UpdaterProcess.Update() at ORTS.Processes.UpdaterProcess.DoUpdate()
Look at which source files you've changed and whichever directories under \Source they are in, those are the names of the files you'll need to package up for testing.
Based on your descriptions, it sounds pretty good. I am fairly sure we could do without all those raindrop/snow transition images, though, probably through a combination of blending and stretching.
P.S. Don't forget to update the "Implementation" status in the blueprint when you start coding. We can probably move on from Discussion to Review for the "Definition" too.
#19
Posted 07 June 2015 - 01:10 PM
Edward K.
#20
Posted 07 June 2015 - 11:33 PM
James Ross, on 07 June 2015 - 12:10 PM, said:
Yes, you're right; I have added such file in the .zip file of my above post. Sorry for the inconvenience.
I'm not sure it is easy to me and convenient to perform the transition from rain to snow without the additional raindrop textures. I created them by stretching of course, and by changing the alpha curve.
I will update the blueprint status.
To edward: pls. let me improve a bit the code, and then I will ask you to post your patch and I will post mine.