Elvas Tower: Skydomes - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Skydomes Rate Topic: -----

#1 User is offline   caldrail 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 588
  • Joined: 14-April 08
  • Gender:Male
  • Country:

Posted 25 July 2017 - 03:15 AM

I don't know if this has been discussed before, but with the number of excellent skydome images appearing on train-sim one has to wonder whether OR should be so limited to one. Would it be possible to use the season/weather code to select images from a list for instance, or even better, use these proactively? Thus you might see clear blue skies or the heaviest grey raincloud with ease.

#2 User is offline   BB25187 

  • Fireman
  • Group: Status: Active Member
  • Posts: 138
  • Joined: 09-December 12
  • Gender:Male
  • Simulator:OpenRails MSTS
  • Country:

Posted 02 October 2017 - 02:45 AM

Hello,

During the past few days, I spent time investigating the rendering of the weather in ORTS.

As a starting point, I installed the very nice Skydome textures proposed by Claus Visby Overgaard (cvo2010).

Though, I was not totally happy: those files provide a nice rendering, for two main reasons:
  • It may be difficult to align the ambient light in the simulator and the ambiance of the texture. This is especially true for texture which represent cloudy weather.
  • The combination of the SkyDome with the default rendering of clouds (texture Clouds01.png) is relatively poor. This is partly due to the tiled way the texture is mapped on this sphere: it prevents any use of a texture representing structured clouds, which may otherwise end up in an unrealistic orientation and location. THis is why this texture is so touchy to use, especially if one compared with the texture of the skydome!


After some investigations, I obtained a configuration which allows to continuously modify the rendering of the sky and ambient light, from a clear weather with few small clouds to a heavy cloudy weather. I make use of two diffrent textures extracted from the files proposed by Claus Visby Overgaard: one for clear weather, the other for heavy cloudy weather.
The image below were obtained during a unique session, by just adjusting clouds (CTRL+/CTRL-) and fog (MAJ+/MAJ-).
http://imageshack.com/a/img922/3049/x76iqV.jpg
http://imageshack.com/a/img923/5372/gTQW8T.jpg
http://imageshack.com/a/img922/5350/KcJLoP.jpg
http://imageshack.com/a/img923/402/ljU0Bn.jpg
http://imageshack.com/a/img924/6105/K9ZNZ0.jpg
http://imageshack.com/a/img924/290/5DD7qR.jpg
http://imageshack.com/a/img923/6628/2VgS9m.jpg
http://imageshack.com/a/img922/9510/sKjwGc.jpg

The changes to do this are pretty simple:
  • The texture to be used for clear weather representation must be assigned to the SkyDome1.png
  • The texture to be used for heavy cloudy weather representation must be assigned to the Clouds01.png. It must be modified to limit its opacity to 60 to 70%.
  • The shader SkyShader.fx must be changed (no need to recompile) so the sphere which support the cloudy texture behaves like the skydome one: no tiling, use of a polar texture, ... To do so, only lines 228 and 229 must be changed from:
    	float2 TexCoord = float2(In.TexCoord.x * 4 + WindDisplacement.x, In.TexCoord.y * 4 + WindDisplacement.y);
    	float4 cloudColor = tex2D(CloudMapSampler, TexCoord);

    Into:
    	float4 cloudColor = tex2D(CloudMapSampler, In.TexCoord);
    	float2 TexCoord = float2((1.0 - In.TexCoord.x) + Time, In.TexCoord.y);

    Note that I am still investigating the wind displacement aspect.


The illustration above makes use of the two images below (Skydome1.png on the left, Clouds01.png on the right - for this later, the image below does not reflect the 70% opacity used in the actual texture):
http://imageshack.com/a/img922/254/pffmkZ.jpghttp://imageshack.com/a/img922/9721/bBSjLj.jpg

Best regards

Page 1 of 1
  • 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