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

Jump to content

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

#31 User is offline   ExRail 

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

Posted 12 March 2024 - 05:08 PM

View PostWeter, on 11 March 2024 - 06:38 PM, said:

Well done.


Thanks!
After messing around in the engine room of (Skyshader.fx / SceneryShader.fx) for 5 hours trying to shut the engine down,
it accrued to me that I should just go up to the control room and turn it off at the switch, in a manner of speaking,

I've just achieved another one on my list,
a big one since FS98 - separation of sky and ground haze, it's always irritated me
that I could not have fog on the ground without totally covering the sky.

WeatherType.Foggy
Attached Image: Sky_Ground_Fog_Seperated3.jpg
Attached Image: Sky_Ground_Fog_Seperated.jpg
Attached Image: Sky_Ground_Fog_Seperated2.jpg


Screenshots that are hard to reproduce without
adding a single float as opposed to a submersible :-)


ORTS.Simulation:: weather.cs
public class Weather
{
public float FogDistanceSky;

#######################
RunActivity:: weather.cs

case WeatherType.Foggy:
Weather.OvercastFactor = 0.15f; Weather.FogDistance = 77; Weather.FogDistanceSky = 4000;
break;

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

class SkyMaterial : Material
{
public override void Render(GraphicsDevice graphicsDevice, IEnumerable<RenderItem> renderItems, ref Matrix XNAViewMatrix, ref Matrix XNAProjectionMatrix)
{
SkyShader.SetFog(Viewer.Simulator.Weather.FogDistanceSky, ref SharedMaterialManager.FogColor);

.

#32 User is offline   Genma Saotome 

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

Posted 12 March 2024 - 08:50 PM

Gad Jan, I'm choking as I look at those screenshots. Positively toxic air pollution! Well done!

#33 User is offline   Genma Saotome 

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

Posted 12 March 2024 - 09:23 PM

View PostFS.E652 091, on 11 March 2024 - 06:54 AM, said:

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


One of my projects is the Cal-P in central California. No snow ever where the rails are but plenty of rain in the winter. I created the wet textures by adding a 25% opacity layer on top of the every-day texture and set the ESD_Alternative_Texture() value to snow. If the activity says snow it rains and everything looks wet.

For years I was asking for a /rain folder and an ESD_Alternative_Texture() value so things could be done "right". Carlo did it for me and IIRC I think he said the correct ESD value was (512).

Then I had a thought too far: How do I have a model that has both rain and snow textures? Or rain, snow and night textures? Reality has a lot of possible combinations that have to be dealt with. I've thought about this for a looong time and my current thinking is we need something like new rows of data in the .sd file for each model. It probably would need 3 columns of data on each line, as many lines as combinations you want to model. It might look like this:

Column1 is for seasons, values
  • Same for all seasons
  • Spring
  • Summer
  • Autumn
  • Winter

Column 2 is for terrain appearance:
  • Dry always
  • Wet from rain
  • Covered by snow


Column 3 is for lighting:
  • Same texture for 24 hours
  • Daylight only
  • Night time only


Examples:

Terrtex, all lighting conditions, needs 10 lines:


Spring / Dry / Same for 24 hours
Spring / Wet from rain / Same for 24 hours
Spring / Covered in snow / Same for 24 hours

Summer / Dry / Same for 24 hours
Summer / Wet from rain / Same for 24 hours

Autumn / Dry / Same for 24 hours
Autumn / Wet from rain / Same for 24 hours

Winter / Dry / Same for 24 hours
Winter / Wet from rain / Same for 24 hours
Winter / Covered in snow / Same for 24 hours


One very important difference between the above and how we think of it now: There is a complete disconnect between current precipitation as spec'd in the Activity and what the textures ill show. One might set the weather for falling snow but whether there is or is not any accumulation on the ground is a completely different question.


Rain, at any time on streets:

All seasons / Dry / Same for 24 hours
All seasons / Wet from rain / Same for 24 hours


A building w/ night lighting, dry, rain, snow needs 6 lines:

All seasons / Dry / Daytime
All seasons / Dry / Night Time

All seasons / Wet from rain / Daytime
All seasons / Wet from rain / Nighttime

All seasons / Covered with snow / Daytime
All seasons / Covered with snow / Nighttime


If that is what it takes then I expect a lot of new code will be needed. Who will do it? Beats me

#34 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 950
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 13 March 2024 - 12:26 AM

https://kephost.net/p/MTE1Mjk3OA.png

Hello.

The cars shown in the picture have their windows open in summer and autumn. They are closed during all other seasons. Both during spring and autumn snowfall. I use the ESD_Alternative_Texture ( 252 ) setting for this.
But the blue car is set to ESD_Alternative_Texture ( 512 ), which works fine in the NYMG version in rain, but the windows stay open in snowy seasons. So the 512 setting is a bit buggy. I will investigate this more thoroughly and document it so I can report it to Carlo.

https://kephost.net/p/MTE1Mjk3Nw.png

The cars use a complete folder structure as shown in the picture. Maybe this would be the solution?

Sincerely, Laci 1959

#35 User is offline   ExRail 

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

Posted 13 March 2024 - 08:06 AM

View PostGenma Saotome, on 12 March 2024 - 08:50 PM, said:

Gad Jan, I'm choking as I look at those screenshots. Positively toxic air pollution! Well done!


Thanks i guess, since toxicity was not on my mind, more like a northern winter cold morning fog.

I'm unlocking so many achievements that I've just rewarded my self a day off from work, so I can unlock some more.

Attached Image: Two_Cloudlayers_moving_differently.jpg

4 frame gif animation: the clouds are moving += & -= for the effect to be extra visible in 4 frames.
click on it if doesn't run.
Attached Image: OpenRails_TwoCloudlayers2.gif

Since the clouds get rendered to the same surface there will never be real 3D separation and changing the POV will not revile something behind,
so I'm going to need more that one dome for projection, and is thinking.
1 SkyDome texture, Moon and Sun.
2 high level clouds with speed and direction
3 low level clouds ------//------------

I've read the post above about wet texture and *.SD file format expansion, and I like it all.
But my current focus is making the default sim when running old routes looking better, wet texture and *.SD's require upgrading of Routs.

Edit: Updated with a 30 sec video.
Attached File  OpenSkies.zip (9.56MB)
Number of downloads: 19

#36 User is offline   FS.E652 091 

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

Posted 13 March 2024 - 09:58 AM

View PostGenma Saotome, on 12 March 2024 - 09:23 PM, said:

One of my projects is the Cal-P in central California. No snow ever where the rails are but plenty of rain in the winter. I created the wet textures by adding a 25% opacity layer on top of the every-day texture and set the ESD_Alternative_Texture() value to snow. If the activity says snow it rains and everything looks wet.

For years I was asking for a /rain folder and an ESD_Alternative_Texture() value so things could be done "right". Carlo did it for me and IIRC I think he said the correct ESD value was (512).

Then I had a thought too far: How do I have a model that has both rain and snow textures? Or rain, snow and night textures? Reality has a lot of possible combinations that have to be dealt with. I've thought about this for a looong time and my current thinking is we need something like new rows of data in the .sd file for each model. It probably would need 3 columns of data on each line, as many lines as combinations you want to model. It might look like this:

Column1 is for seasons, values
  • Same for all seasons
  • Spring
  • Summer
  • Autumn
  • Winter

Column 2 is for terrain appearance:
  • Dry always
  • Wet from rain
  • Covered by snow


Column 3 is for lighting:
  • Same texture for 24 hours
  • Daylight only
  • Night time only


Examples:

Terrtex, all lighting conditions, needs 10 lines:


Spring / Dry / Same for 24 hours
Spring / Wet from rain / Same for 24 hours
Spring / Covered in snow / Same for 24 hours

Summer / Dry / Same for 24 hours
Summer / Wet from rain / Same for 24 hours

Autumn / Dry / Same for 24 hours
Autumn / Wet from rain / Same for 24 hours

Winter / Dry / Same for 24 hours
Winter / Wet from rain / Same for 24 hours
Winter / Covered in snow / Same for 24 hours


One very important difference between the above and how we think of it now: There is a complete disconnect between current precipitation as spec'd in the Activity and what the textures ill show. One might set the weather for falling snow but whether there is or is not any accumulation on the ground is a completely different question.


Rain, at any time on streets:

All seasons / Dry / Same for 24 hours
All seasons / Wet from rain / Same for 24 hours


A building w/ night lighting, dry, rain, snow needs 6 lines:

All seasons / Dry / Daytime
All seasons / Dry / Night Time

All seasons / Wet from rain / Daytime
All seasons / Wet from rain / Nighttime

All seasons / Covered with snow / Daytime
All seasons / Covered with snow / Nighttime


If that is what it takes then I expect a lot of new code will be needed. Who will do it? Beats me



Your idea is beautiful, actually implementing it requires a good programmer, and I throw my hands up on this because I know little about it...
but couldn't we use shaders? that is, how do simulators like Train Sim World, for example, apply snowy or wet textures to the models?

#37 User is offline   Genma Saotome 

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

Posted 13 March 2024 - 11:02 AM

View PostLaci1959, on 13 March 2024 - 12:26 AM, said:

Hello.

The cars shown in the picture have their windows open in summer and autumn. They are closed during all other seasons. Both during spring and autumn snowfall. I use the ESD_Alternative_Texture ( 252 ) setting for this.
But the blue car is set to ESD_Alternative_Texture ( 512 ), which works fine in the NYMG version in rain, but the windows stay open in snowy seasons. So the 512 setting is a bit buggy. I will investigate this more thoroughly and document it so I can report it to Carlo.


I'm pretty sure the 512 value is only for rain, no other criteria has been bundled in. If you read thru my long post, above, the nature of the problem should become clear: to do things right we need, effectively, a 3 dimension matrix (i.e., seasons, ground, light) where many possible conditions could be true for a model.

#38 User is offline   ExRail 

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

Posted 13 March 2024 - 01:04 PM

View PostFS.E652 091, on 13 March 2024 - 09:58 AM, said:

Your idea is beautiful, actually implementing it requires a good programmer, and I throw my hands up on this because I know little about it...
but couldn't we use shaders? that is, how do simulators like Train Sim World, for example, apply snowy or wet textures to the models?


My impression from fiddling with them for a day or two:
Shaders can be passed a texture or two and be used to blend them, depending on values also passed on to them or the vertex dept value eg,
but what ever texture that should be loaded would still be logic, like day and night, weather and seasons.
But snow/rain accumulation (blending of base texture with snow/wet over time) as it snows or rain would be cool for sure.

I already knows what my dream shaders looks like, the one I want running my 2D/3D cab windows:
https://www.ighniz.com/wp-content/uploads/2019/12/RainShader.gif
but will properly have to settle for this:
https://www.shadertoy.com/view/ldSBWW
and only if I can take something that already made and adapt it.

I know my own SFML project uses gl shaders and I've played once with a finished made one that's about it.
But if there is a will there is a way, or you fake it like GTA San Andreas's wet reflecting roads,
made by copying the lights and flipping it 180' under the car, traffic light or streetlamp vs the camera.
https://youtu.be/0XVvCAoN4-0?t=34

#39 User is offline   Genma Saotome 

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

Posted 13 March 2024 - 02:17 PM

View PostExRail, on 13 March 2024 - 01:04 PM, said:

My impression from fiddling with them for a day or two:
Shaders can be passed a texture or two and be used to blend them, depending on values also passed on to them or the vertex dept value eg,
but what ever texture that should be loaded would still be logic, like day and night, weather and seasons.


There ya go again, reminding me of another thing I've been wanting... oh, for at least 10 years. If you look closely at walls, streets, etc in professional games you'll notice the base layer is pretty simple and it is tiled -- brick, asphalt, whatever, to which has been added at least 1 additional layer of something (and many have more than 1)... dirt, mud, weeds, whatever, that is also tiled but at a completely different size and angled orientation. This difference means that oddly shaped oil spot that looks a bit like a cat near the curb where the asphalt is lighter will not reappear near the curb in that lighter spot again but over in the second lane where the asphalt is darker at a distance quite different than the repetitive scaling distance of the road. That means you are far less likely to see the repeating pattern present in both textures.

Every road, every ballasted right of way, every wall, every roof should be a blend of at least two textures.




View PostExRail, on 13 March 2024 - 01:04 PM, said:

But snow/rain accumulation (blending of base texture with snow/wet over time) as it snows or rain would be cool for sure.


One more idea, predating OR by about 2 years: Make a copy of the route and use Route Ritter to raise the terrain by some fixed amount equal to a depth of snow you want for most places. Using the old MSTS editor, drop this elevated terrain for each road and track shape. Move the \snow textures over to \terrtex and review. If it looks good, save \tiles someplace safe. Now write a .bat file that moves everything in the original \tiles to a safe place and move a copy of the snow \tiles into the route folder. Another .bat file that restores normal terrain. Ask OR to do the same thing if the activity calls for snow on the ground.

It might be possible in TSRE but I've been very disappointed with its terrain editing features so I don't know if the above would still work.

#40 User is offline   ExRail 

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

Posted 14 March 2024 - 07:37 AM

View PostGenma Saotome, on 13 March 2024 - 02:17 PM, said:

There ya go again, reminding me of another thing I've been wanting... oh, for at least 10 years. If you look closely at walls, streets, etc in professional games you'll notice the base layer is pretty simple and it is tiled -- brick, asphalt, whatever, to which has been added at least 1 additional layer of something (and many have more than 1)... dirt, mud, weeds, whatever, that is also tiled but at a completely different size and angled orientation.


Using Open IV and GTA V textures as a reference, the above is clear(base,base with deviation + there normals), but below requires a screenshot.
I'll start with this: https://i.pinimg.com...e3cd79a26f5.png


View PostGenma Saotome, on 13 March 2024 - 02:17 PM, said:

This difference means that oddly shaped oil spot that looks a bit like a cat near the curb where the asphalt is lighter will not reappear near the curb in that lighter spot again but over in the second lane where the asphalt is darker.



View PostGenma Saotome, on 13 March 2024 - 02:17 PM, said:

One more idea, predating OR by about 2 years: Make a copy of the route and use Route Ritter to raise the terrain by some fixed amount equal to a depth of snow you want for most places. Using the old MSTS editor, drop this elevated terrain for each road and track shape. Move the \snow textures over to \terrtex and review. If it looks good, save \tiles someplace safe. Now write a .bat file that moves everything in the original \tiles to a safe place and move a copy of the snow \tiles into the route folder. Another .bat file that restores normal terrain. Ask OR to do the same thing if the activity calls for snow on the ground.
It might be possible in TSRE but I've been very disappointed with its terrain editing features so I don't know if the above would still work.


Would like to se a demo of that.
For starters I would like to see how blending of base and rain/snow texture look, vs just hard switching.

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