Elvas Tower: Dynamic weather - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Dynamic weather WeatherChange activity event Rate Topic: -----

#11 User is offline   BasilP 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 32
  • Joined: 12-January 15
  • Simulator:Open Rails
  • Country:

Posted 04 June 2015 - 07:30 AM

The ability to change precipitation in OR is good. It is good that it can be changed manually as you go.

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 User is offline   edwardk 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,350
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 04 June 2015 - 11:57 AM

View PostCsantucci, on 02 June 2015 - 11:14 AM, said:

Re weather type in effect a better choice could be made than the one I did. As Weather type is already present in the Activity file as int, I will use that format. That will be then converted in an enum, as already used in OR.
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 User is offline   edwardk 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,350
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 04 June 2015 - 12:51 PM

I also want to add some information concerning precipitation intensity. Changing the precipitation box by breaking it down to length, width, and height opened up the ability to using a higher precipitation intensity value. The first question I would ask is "MaxIntensityPPSPM2" still actually needed? Right now, MaxIntensityPPSPM2 is used as a max setting that can't be exceeded so as long as this is set high enough, intense precipitation is possible. Of course we have to keep in mind the computer's ability to process such a weather set up. One snow condition as an example is a white out condition. Even if this can be achieved which I admit would be great, the resources needed would probably drag the frame rates down.

Edward K.

#14 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,488
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 06 June 2015 - 07:17 AM

View Postedwardk, on 04 June 2015 - 12:51 PM, said:

The first question I would ask is "MaxIntensityPPSPM2" still actually needed?

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 User is offline   edwardk 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,350
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 07 June 2015 - 12:29 AM

I asked a question which was a bit too obvious. At one point I was questioning the need, but not now. I am now set with what I have so once Carlos is ready, I will provide the patch file.

Edward K.

#16 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 June 2015 - 06:25 AM

I am quite advanced in implementing the feature, but in these days I'm busy in real life things, so I have few time to progress.

#17 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 June 2015 - 07:54 AM

A first demo is attached here. It is based on a revised release of the specification, that is attached at the blueprint.
Here
Attached File  Runactivities.zip (1.39MB)
Number of downloads: 605
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
Attached File  Testweather.zip (2.46K)
Number of downloads: 626
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 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,488
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 07 June 2015 - 12:10 PM

View PostCsantucci, on 07 June 2015 - 07:54 AM, said:

A first demo is attached here. It is based on a revised release of the specification, that is attached at the blueprint.
Here
Attachment 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 User is offline   edwardk 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,350
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 07 June 2015 - 01:10 PM

Is there a possibility that I can have a patch file to test what you have with what I did?

Edward K.

#20 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 June 2015 - 11:33 PM

View PostJames Ross, on 07 June 2015 - 12:10 PM, said:

I think you're missing Orts.Formats.Msts.dll (and possibly other changed files):

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.

  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users