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.
  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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

#1 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 June 2015 - 12:39 PM

A blueprint https://blueprints.l...er-change-event has been generated to specify a WeatherChange activity event. I repeat here the specification.

Following block can be added within an Event Block (be it a Location or a Time event) of an .act file:

ORTSWeatherChange (
ORTSTransitionTimeS ( double )
ORTSWeatherType ( double )
ORTSOvercast ( float )
ORTSFog ( float )
ORTSPrecipitationIntensity ( float )
)

The weather changes consequentially.
The event can also include an ORTSContinue ( 0 ) line, therefore not displaying messages and not suspending activity execution.
Manual commands related to weather interrupt the weather change triggered by the above events.
If a new WeatherChange event is triggered before the action of the preceding has terminated, the old one is interrupted.

MSTS operation is not damaged by the WeatherChange events.
Editing the .act file with the MSTS AE after inclusion of WeatherChange events clears them, so they should be backed up separately.
Opening with the MSTS AE an .act file with WeatherChage events and packaging it without editing it generates an .apk file that contains such events.

Using the location event it is possible to have another weather e.g. when climbing uphill or exiting a continental divide tunnel; using the time event it is possible to have weather changing during the day.

Implementation work not yet started.

#2 User is offline   Driver 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 108
  • Joined: 14-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 01 June 2015 - 10:40 PM

View PostCsantucci, on 01 June 2015 - 12:39 PM, said:

A blueprint https://blueprints.l...er-change-event has been generated to specify a WeatherChange activity event. I repeat here the specification.

Following block can be added within an Event Block (be it a Location or a Time event) of an .act file:

ORTSWeatherChange (
ORTSTransitionTimeS ( double )
ORTSWeatherType ( double )
ORTSOvercast ( float )
ORTSFog ( float )
ORTSPrecipitationIntensity ( float )
)

The weather changes consequentially.
The event can also include an ORTSContinue ( 0 ) line, therefore not displaying messages and not suspending activity execution.
Manual commands related to weather interrupt the weather change triggered by the above events.
If a new WeatherChange event is triggered before the action of the preceding has terminated, the old one is interrupted.

MSTS operation is not damaged by the WeatherChange events.
Editing the .act file with the MSTS AE after inclusion of WeatherChange events clears them, so they should be backed up separately.
Opening with the MSTS AE an .act file with WeatherChage events and packaging it without editing it generates an .apk file that contains such events.



Will this also work in timetable mode?

#3 User is offline   James Ross 

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

Posted 02 June 2015 - 08:41 AM

View PostDriver, on 01 June 2015 - 10:40 PM, said:

Will this also work in timetable mode?

Timetable mode doesn't use activity files, so it'll need a separate implementation.

#4 User is offline   James Ross 

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

Posted 02 June 2015 - 08:49 AM

View PostCsantucci, on 01 June 2015 - 12:39 PM, said:

ORTSWeatherChange (
ORTSTransitionTimeS ( double )
ORTSWeatherType ( double )
ORTSOvercast ( float )
ORTSFog ( float )
ORTSPrecipitationIntensity ( float )
)

I am generally happy to try exploring these kinds of ideas. Being able to tie it in to other activity events through the usual means seems very useful, as does the transition time.

Shouldn't ORTSWeatherType be int or string with limited values?

I think we'll also need to double-check how precipitation intensity is working related to real life. :)

#5 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 June 2015 - 11:14 AM

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).

#6 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 02 June 2015 - 04:16 PM

Please set it up so the visual effects may be evoked as a solo effect -- meaning someone can create commands for only wind w/o having to use precipitation as well. Ditto for cloud cover.

The route I work on (The Cal-P) has ~1/3 of the mainline located in a natural wind tunnel: >50km/hr blowing east is standard afternoon wind in the summer months; The west end sees high fog most mornings until noon and a light eastward breeze in late afternoon whereas the inland east end sees little wind, no clouds, and the brightest sun etc. etc. It's quite varied from one end to other and so KUJU's approach of managing it all as a route-wide effect would never serve. All of those natural effects occur w/o rain or snow from May into October.

#7 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 June 2015 - 10:20 PM

Dave,
it is foreseen that it will be possible to have solo effects.

#8 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 03 June 2015 - 02:51 PM

Can the trigger be a time of day instead of an action by the player?

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 03 June 2015 - 09:16 PM

You can use time event, that is events that start at a predetermined time interval from activity start.

#10 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 03 June 2015 - 09:54 PM

Great! Sounds like everything is all lined up!

#11 User is offline   BasilP 

  • Apprentice
  • Group: Posts: 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: Posts: Elite Member
  • Posts: 1,354
  • 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: Posts: Elite Member
  • Posts: 1,354
  • 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 offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,514
  • 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: Posts: Elite Member
  • Posts: 1,354
  • 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.

  • 4 Pages +
  • 1
  • 2
  • 3
  • 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