Elvas Tower: Sky dome and cloud layer testing - Elvas Tower

Jump to content

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

Sky dome and cloud layer testing Probably more practical than domes with painted clouds Rate Topic: ***** 1 Votes

#21 User is offline   FS.E652 091 

  • Conductor
  • Group: Status: Active Member
  • Posts: 275
  • Joined: 22-April 14
  • Gender:Male
  • Location:Sicily
  • Simulator:ORTS
  • Country:

Posted 07 March 2024 - 05:08 PM

View Postrailguy, on 07 March 2024 - 07:32 AM, said:

That first screenshot has a fantastic sky. Also, not to derail the thread, but what route(s) is/are those and where might they be available? They look quite interesting. Thanks.


Thanks Weter for the reply

The route is my non-commercial Freeware DLC project, with the possibility of downloading via Link, i can send you more infos via Message so we do not going OFF-Topic! :-D

Thanks also for the Skies! i've maked many others from sunrise to sunset versions...!
i've already sent the Starmap to pschlik, so i think he will be on the nex unstable version with the signal light glow..!

#22 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,934
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 08 March 2024 - 12:56 AM

I beg pardon:

Quote

IIRC, it's commercial project

I was wrong!

#23 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 09 March 2024 - 07:38 PM

Just some nice shots, now that I can play with one weather without effecting the others.

Attached Image: Clouds_Clear.jpg
Attached Image: Clouds_Haze.jpg
Attached Image: MorningHaze.jpg
Attached Image: Clouds_Haze2.jpg
Attached Image: Clouds_Snow.jpg
Attached Image: Clouds_Sno2w.jpg

Haze:
There seams to be some time of the day where haze behaves different and is not covering the top part, witch is great.
Vehicle Simulator(hangsim.com) is using two types of haze in it's weather system, a top and button: https://www.hangsim....elp/weather.jpg
something I would prefer to also have in Open Rails, Rain and Snow weather don't look much without haze but it totally covers the sky/clouds at the point where ground coverage is at a good place.
Oh: And having illumination of especially vegetation in debug key +/- would be great. I've still not determent if it's the texture that are to bright or the lighting in lat pic.

#24 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 10 March 2024 - 04:12 PM

Do we have worm signs?
Attached Image: DesertWeather.jpg
Attached Image: DesertWeather2.jpg

We do, in the weather selection of this menu:
Attached Image: Menu.jpg
witch are in this program:
Attached File  OpenRails_Unstable_WeatherExt3.zip (59.86MB)
Number of downloads: 34

-----------------------------------------------------

Clear in back to being clear, Rain and Snow also have the same parameters as normal just with other dome/cloud textures.

I've added 3 new weather types Few, cloudy and Desert, and made 2K/4K prof of concept textures.

Only tested in exploration mod. Sound files still point to clear.sms

Weather type extension code.

MainForm.cs

public MainForm()
{
                var Weathers = new[] {
                    new KeyedComboBoxItem(0, catalog.GetString("Clear")), 
                    new KeyedComboBoxItem(1, catalog.GetString("Snow")),  
                    new KeyedComboBoxItem(2, catalog.GetString("Rain")),  
                    new KeyedComboBoxItem(3, catalog.GetString("Few")),   
                    new KeyedComboBoxItem(4, catalog.GetString("Cloudy")),
                    new KeyedComboBoxItem(5, catalog.GetString("Desert")),
                };

#######################################################################################

ActivityFile.cs

      public enum WeatherType { Clear = 0, Snow, Rain, Few, Cloudy, Desert }


#######################################################################################
Sky.cs

 public SkyMaterial(Viewer viewer)

            // ExRail: Weather texture selector
            switch (Viewer.Simulator.WeatherType)
            {
                case Orts.Formats.Msts.WeatherType.Clear:
                    SkyTexture   = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDomeClear.png"));
                    CloudTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "CloudsClear.png"));
                    break;
                case Orts.Formats.Msts.WeatherType.Rain:
                    SkyTexture   = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDomeRain.png"));
                    CloudTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "CloudsRain.png"));
                    break;
                case Orts.Formats.Msts.WeatherType.Snow:
                    SkyTexture   = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDomeSnow.png"));
                    CloudTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "CloudsSnow.png"));
                    break;
                case Orts.Formats.Msts.WeatherType.Few:
                    SkyTexture   = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDomeFew.png"));
                    CloudTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "CloudsFew.png"));
                    break;
                case Orts.Formats.Msts.WeatherType.Cloudy:
                    SkyTexture   = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDomeCloudy.png"));
                    CloudTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "CloudsCloudy.png"));
                    break;
                case Orts.Formats.Msts.WeatherType.Desert:
                    SkyTexture   = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDomeDesert.png"));
                    CloudTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "CloudsDesert.png"));
                    break;
            }

#######################################################################################
Weather.cs

public WeatherControl(Viewer viewer)
        {
            Viewer = viewer;
            Weather = Viewer.Simulator.Weather;

            var pathArray = new[] {
                Program.Simulator.RoutePath + @"\SOUND",
                Program.Simulator.BasePath + @"\SOUND",
            };

            ClearSound = new List<SoundSourceBase> {
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_in.sms"), false),
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_ex.sms"), false),
            };
            RainSound = new List<SoundSourceBase> {
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "rain_in.sms"), false),
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "rain_ex.sms"), false),
            };
            SnowSound = new List<SoundSourceBase> {
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "snow_in.sms"), false),
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "snow_ex.sms"), false),
            };
            FewSound = new List<SoundSourceBase> {
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_in.sms"), false),
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_ex.sms"), false),
            };

            CloudySound = new List<SoundSourceBase> {
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_in.sms"), false),
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_ex.sms"), false),
            };

            DesertSound = new List<SoundSourceBase> {
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_in.sms"), false),
                new SoundSource(viewer, Events.Source.MSTSInGame, ORTSPaths.GetFileFromFolders(pathArray, "clear_ex.sms"), false),
            };

            WeatherSounds.AddRange(ClearSound);
            WeatherSounds.AddRange(RainSound);
            WeatherSounds.AddRange(SnowSound);
            WeatherSounds.AddRange(FewSound);
            WeatherSounds.AddRange(CloudySound);
            WeatherSounds.AddRange(DesertSound);

        public void SetInitialWeatherParameters()
        {
            // These values are defaults only; subsequent changes to the weather via debugging only change the components (weather, overcastFactor and fogDistance) individually.
            switch (Viewer.Simulator.WeatherType)
            {
                case WeatherType.Clear:  Weather.OvercastFactor = 0.05f; Weather.FogDistance = 20000; break;
                case WeatherType.Rain:   Weather.OvercastFactor = 0.7f;  Weather.FogDistance = 1000;  break;
                case WeatherType.Snow:   Weather.OvercastFactor = 0.6f;  Weather.FogDistance = 500;   break;
                case WeatherType.Few:    Weather.OvercastFactor = 0.17f; Weather.FogDistance = 20000; break;
                case WeatherType.Cloudy: Weather.OvercastFactor = 0.18f; Weather.FogDistance = 6000;  break;
                case WeatherType.Desert: Weather.OvercastFactor = 0.03f; Weather.FogDistance = 8000;  break;
                default: break;
            }
        }

        public void UpdateWeatherParameters()
        {
            Viewer.SoundProcess.RemoveSoundSources(this);
            switch (Viewer.Simulator.WeatherType)
            {
                case WeatherType.Clear: Weather.PrecipitationLiquidity = 1; Weather.PricipitationIntensityPPSPM2 = 0; Viewer.SoundProcess.AddSoundSources(this, ClearSound); break;
                case WeatherType.Rain: Weather.PrecipitationLiquidity = 1; Weather.PricipitationIntensityPPSPM2 = 0.010f; Viewer.SoundProcess.AddSoundSources(this, RainSound); break;
                case WeatherType.Snow: Weather.PrecipitationLiquidity = 0; Weather.PricipitationIntensityPPSPM2 = 0.0050f; Viewer.SoundProcess.AddSoundSources(this, SnowSound); break;
                case WeatherType.Few: Weather.PrecipitationLiquidity = 1; Weather.PricipitationIntensityPPSPM2 = 0; Viewer.SoundProcess.AddSoundSources(this, FewSound); break;
                case WeatherType.Cloudy: Weather.PrecipitationLiquidity = 1; Weather.PricipitationIntensityPPSPM2 = 0; Viewer.SoundProcess.AddSoundSources(this, CloudySound); break;
                case WeatherType.Desert: Weather.PrecipitationLiquidity = 1; Weather.PricipitationIntensityPPSPM2 = 0; Viewer.SoundProcess.AddSoundSources(this, DesertSound); break;
                default: break;
            }
        }

        void UpdateSoundSources()
        {
            Viewer.SoundProcess.RemoveSoundSources(this);
            switch (Viewer.Simulator.WeatherType)
            {
                case WeatherType.Clear: Viewer.SoundProcess.AddSoundSources(this, ClearSound); break;
                case WeatherType.Rain: Viewer.SoundProcess.AddSoundSources(this, RainSound); break;
                case WeatherType.Snow: Viewer.SoundProcess.AddSoundSources(this, SnowSound); break;
                case WeatherType.Few: Viewer.SoundProcess.AddSoundSources(this, FewSound); break;
                case WeatherType.Cloudy: Viewer.SoundProcess.AddSoundSources(this, CloudySound); break;
                case WeatherType.Desert: Viewer.SoundProcess.AddSoundSources(this, DesertSound); break;
                default: break;
            }
        }
#######################################################################################
RouteFile.cs

public string ENVFileName(SeasonType seasonType, WeatherType weatherType)
        {
            // ExRail Weathertypes expansion - ignore extra WeatherTypes to avoid conflicting with ENV file/parsing
            if (((int)weatherType) > 2)
                weatherType = WeatherType.Clear;


#25 User is offline   Genma Saotome 

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

Posted 10 March 2024 - 06:47 PM

It would be better if your experimental code was uploaded to the library instead of attaching it to a post.

That said I think what you are trying to do is a good idea. Does it also modify brightness or does that remain an independent variable?

A much larger issue is what to do about alternative textures. For example, how do you have snow on the roof of a building under slightly cloudy skies? And when the sun goes down? Wet roads, with or without current rainfall? With a night texture too. OR do you see this proposed feature as something wholly independent from the textures on models?

#26 User is offline   FS.E652 091 

  • Conductor
  • Group: Status: Active Member
  • Posts: 275
  • Joined: 22-April 14
  • Gender:Male
  • Location:Sicily
  • Simulator:ORTS
  • Country:

Posted 11 March 2024 - 06:54 AM

Genma, you've opened a nice tricky point: Wet Textures...!

i've done a track texture for Rain Conditions, howewher it never worked :-\ i can attach it so it can be useful for the future! :-D
by my way it can be bring in consideration the fact to implement a wet texture for Rainy or Snowy Conditions too

#27 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,934
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 11 March 2024 - 07:02 AM

Hi, Baldo.
Carlo Santucci's NYMG does support wet textures for rainr condition, IIRC.

#28 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 11 March 2024 - 08:21 AM

View PostGenma Saotome, on 10 March 2024 - 06:47 PM, said:

It would be better if your experimental code was uploaded to the library instead of attaching it to a post.

That said I think what you are trying to do is a good idea. Does it also modify brightness or does that remain an independent variable?


I post it here To inspire modders and creators to start experimenting for them self also, I mean
the worst case is you unpack the source code again if you screw up.
This should have been Erick's idea with the amount of effort he put into a single skydome / textures.
And because I don't know where else to post/discuss it, what library?


The only modification are those in the code posted, so no brightness or haze color at this time
Weather.OvercastFactor (opacity of cloud texture)
Weather.FogDistance (Haze levels)
Weather.PrecipitationLiquidity = 1 (Snow /rain flag?)
Weather.PricipitationIntensityPPSPM2 = 0 (particle count)

View PostGenma Saotome, on 10 March 2024 - 06:47 PM, said:

A much larger issue is what to do about alternative textures. For example, how do you have snow on the roof of a building under slightly cloudy skies? And when the sun goes down? Wet roads, with or without current rainfall? With a night texture too. OR do you see this proposed feature as something wholly independent from the textures on models?


Seasons are still season and it's the route designers that determine if winter has snow texture on the ground and buildings or not by providing a WINTERSNOW folder?

If a snow or wet texture folder get selected it must be from some flag, looking at the difference from the classic 3 weathers,
it can only be PrecipitationLiquidity or some statement if(Weather == WeatherType.Snow) then snow and load from snow folder.
Edit: it is PrecipitationLiquidity PricipitationIntensityPPSPM2 than sets snow and rain, and I now have snowfall in the cloudy weather settings - not that i want that.

  case WeatherType.Clear:  Weather.OvercastFactor = 0.05f; Weather.FogDistance = 20000; break;
  case WeatherType.Rain:   Weather.OvercastFactor = 0.7f;  Weather.FogDistance = 1000;  break;
  case WeatherType.Snow:   Weather.OvercastFactor = 0.6f;  Weather.FogDistance = 500;   break;

  case WeatherType.Clear: Weather.PrecipitationLiquidity = 1; Weather.PricipitationIntensityPPSPM2 = 0; ... 
  case WeatherType.Rain: Weather.PrecipitationLiquidity = 1; Weather.PricipitationIntensityPPSPM2 = 0.010f; ...
  case WeatherType.Snow: Weather.PrecipitationLiquidity = 0; Weather.PricipitationIntensityPPSPM2 = 0.0050f; ...



This is hopeful an extension that's not effecting anything else, maybe someone has a activity to test.
Attached Image: Summer_4.jpg

So far I'm not really proposing much, more like playing around seeing what is possible, learning the code.

#29 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,934
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 11 March 2024 - 08:36 AM

Does that work for You?
https://www.elvastow...ction=submit&c=
However, I think, YOU are right: the code is posted here to discuss and inspire - not to just reuse.
Only privelaged members could download from libraries, what is not an aim here, as I can guess.

#30 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 11 March 2024 - 02:12 PM

"so no brightness or haze color at this time"

Another achievement unlocked - Haze Color Control.
Attached Image: Desert_SandStorm_HazeColorControl.jpg
Default gray
Attached Image: Desert_SandStorm_HazeColorControl`_Default.jpg

I've Added a new color witch I set in the weatherType definition to the preferred color, it's used in function FogDay2Night instead of 255.
So orange for desert so it could look like a sandstorm.

Matrials.cs

public static Color FogColor = new Color(110, 110, 110, 255);
public static Color WeatherFogColor = new Color(255, 255, 255, 255);

Weathers.cs

case WeatherType.Desert:
Weather.PrecipitationLiquidity = 1;
Weather.PricipitationIntensityPPSPM2 = 0;
Viewer.SoundProcess.AddSoundSources(this, DesertSound);
SharedMaterialManager.WeatherFogColor = new Color(198, 177, 136);
break;

Sky.cs
static void FogDay2Night(float sunHeight, float overcast)
{

SharedMaterialManager.FogColor.R = (byte)(floatColor.X * SharedMaterialManager.WeatherFogColor.R);
SharedMaterialManager.FogColor.G = (byte)(floatColor.Y * SharedMaterialManager.WeatherFogColor.G);
SharedMaterialManager.FogColor.B = (byte)(floatColor.Z * SharedMaterialManager.WeatherFogColor.B);

  • 9 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