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
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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

#21 User is online   James Ross 

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

Posted 08 June 2015 - 09:59 AM

View PostCsantucci, on 07 June 2015 - 11:33 PM, said:

Yes, you're right; I have added such file in the .zip file of my above post. Sorry for the inconvenience.

Thanks, it's working fine now.

View PostCsantucci, on 07 June 2015 - 11:33 PM, said:

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.

You should be able to do this in the shader, either with pure transformations or with a rain and snow texture and blending the two as well. For example, the current "float particleSize" can be changed in to "float2 particleSize" and used to change the width and height of the particles separately as needed (it's actually hard-coded to 1 in PrecipitationMaterial.SetState).

Basically, if you can describe a reasonable simple transformation from one to the other that works in an image editor, it will likely work in the shader too. :derisive:

An alternative is having a rain, snow and just one or two intermediate textures and making each particle use a (weighted) random one based on the liquidity value. That's probably more complex though.

#22 User is offline   Csantucci 

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

Posted 09 June 2015 - 11:38 AM

I'm sorry, but because of lack of know-now I'm not able to manage the transition from rain to snow through the shaders. By the way I'm not fully sure it would be the best way to solve the problem. Nevertheless, if someone provides a version of my patch using shaders for that, preserving the actual look and feel, I have nothing against it. :)
So here is the patch of the solution I consider ready for publication (using the additional textures)
Attached File  Weatherchange6.zip (5.12K)
Number of downloads: 597
It does not include the additional textures, as they can't be managed by a Tortoise patch. They are within the Runactivities.zip file of my preceding post.
This version has better management of fog distance, for smoother transition at smaller distances (parabolic instead of linear interpolation), as well as better interaction between manual and activity weather commands.
Updated runactivity and activity files have been attached to my preceding post. In the activity file the fog distance transition has been divided in two events (both for distance decrease and distance increase), which further improves smooth fog distance change.

#23 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 09 June 2015 - 04:04 PM

Looks nice, but the rain and the snow seems to dissapear some height over the terrain.
In my opinion, good approximation, but needs more work.

Regards.

#24 User is offline   Csantucci 

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

Posted 09 June 2015 - 10:23 PM

View PostRTP, on 09 June 2015 - 04:04 PM, said:

Looks nice, but the rain and the snow seems to dissapear some height over the terrain.
...

Thanks. The standard release of OR behaves the same way, and it's beyond my scope to modify that.

#25 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 13 June 2015 - 11:53 AM

Carlos,

Just wanted to let your know that I was able to incorporate your work into mine and all is looking good. I will upload the patch once I finished testing.

Edward K.

#26 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 13 June 2015 - 12:02 PM

View PostRTP, on 09 June 2015 - 04:04 PM, said:

Looks nice, but the rain and the snow seems to dissapear some height over the terrain.
In my opinion, good approximation, but needs more work.

Regards.


Its possible this is like this because with the current process, precipitation starts just above the player train. My work changes this by increasing the starting height of the precipitation. I will be uploading a patch along with a new set of executable once I am finished testing.

Edward K.

#27 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 13 June 2015 - 04:09 PM

Here it is. My work merged with the work from Carlos. Included are the executables and the patch file.

Edward K.

Attached File(s)



#28 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 13 June 2015 - 04:46 PM

Looks much better.

Regards.

#29 User is offline   Csantucci 

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

Posted 13 June 2015 - 11:44 PM

Hi Edward,
I get an out of memory crash with your version, both using your exes and rebuilding the project using the patch, see attached logfile
Attached File  OpenRailsLog.zip (2.98K)
Number of downloads: 609
This version of the logfile does not include the line numbers, however from the rebuilt version I noticed that the crash occurs at line 185 of Precipitation.cs .
Take into account that I have a 32 bit Windows and my OR has a 2 GB memory maximum, even if I use RunactivityLAA.exe

It must also be noted for other people that your .zip file is not complete: referring to the executables it needs the previous installation of my .zip file (in yours the 10 additional rain textures and modified file Orts.Formats.Msts.dll are missing); referring to the patch file patches to Runactivity.csproj and ACTFile.cs are missing.

#30 User is online   James Ross 

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

Posted 14 June 2015 - 01:59 AM

View Postedwardk, on 13 June 2015 - 11:53 AM, said:

Just wanted to let your know that I was able to incorporate your work into mine and all is looking good. I will upload the patch once I finished testing.

Why are you merging things? You're not allowed to commit them together because they're separate features.

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