Elvas Tower: Water as a shapefile - Elvas Tower

Jump to content

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

Water as a shapefile

#1 User is offline   Genma Saotome 

  • Owner and Admin
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Owner
  • Posts: 11,829
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 12 September 2017 - 09:53 AM

I'm looking to do an experiment with water in a route, specifically substituting a shape file for the water layers in a tile. The shapefile would be constructed w/ multiple layers, just like a tile's water. It's my understanding that the water layers has a special shader(2), of which I know very little. My questions:

Is there a simple way to edit a .s file so the OR software knows to use the water shader on it?
Are there multiple shaders involved, as in one per water layer?
Is there any way to get very high reflectivity in the top layer such that the color of shoreline objects is seen in the water (e.g., green shade trees)?

#2 User is offline   longiron 

  • Open Rails Developer
  • Group: Elite Member
  • Posts: 2,790
  • Joined: 25-July 08
  • Gender:Male
  • Location:Manasquan, NJ
  • Simulator:Open Rails, MSTS editors
  • Country:

Posted 12 September 2017 - 10:41 AM

Dave,

You may be able to use other MSTS shaders to get the effect you are looking for - such as specular for the reflective effect. However, getting good looking and behaving water in a game is a pretty complex task as shown in the unity docs: https://docs.unity3d...OWTO-Water.html

#3 User is offline   James Ross 

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

Posted 12 September 2017 - 10:41 AM

View PostGenma Saotome, on 12 September 2017 - 09:53 AM, said:

Is there a simple way to edit a .s file so the OR software knows to use the water shader on it?

The water material in OR uses the general scenery shader, but pre-configured for UV wrapping, and alpha blending enabled. This should match the MSTS "BlendATex" shader name, "Wrap" texture addressing mode, and lighting model -5 (might be labelled Specular 0) if I'm reading this right. Doing this with a shape may not 100% replicate it as the code is separate, so there might be some differences I've missed, but hopefully it'll be close enough to test.

View PostGenma Saotome, on 12 September 2017 - 09:53 AM, said:

Are there multiple shaders involved, as in one per water layer?

Nope, just the one material/shader.

View PostGenma Saotome, on 12 September 2017 - 09:53 AM, said:

Is there any way to get very high reflectivity in the top layer such that the color of shoreline objects is seen in the water (e.g., green shade trees)?

Unfortunately not, that's one of the shaders we don't have but it would be good to add (but it's complex). You can try the specular lighting models (-6 and -7) for now.

#4 User is online   Garry 

  • Hostler
  • Group: Active Member
  • Posts: 50
  • Joined: 09-March 15
  • Gender:Male
  • Simulator:Open Rails + TSRE5
  • Country:

Posted 15 September 2017 - 05:16 AM

If you have a look at the thread on animated river you will see that "mrmosky" started off with a moving object with a water texture. I had problems with the way I tried to develop this into a multi layer moving river, but I think that I have overcome this now.
I am going through some final testing, and writing the documentation, and I hope to upload the final files to uktrainsim soon.

Basically the river consists of a 100m square with 2 layers. The bottom layer has an opaque dark rippled texture, the top layer (0.5 metre higher) has the same texture but in a lighter shade and is semi-transparent.
Between the 2 layers is a 3rd layer laid using the "walking people" technique as a carspawner. This moving layer has the same opaque texture as the bottom layer but the movement shows through the top layer.
What I have produced seems to work OK for my large slow moving river, but I think it could be developed a lot further. Instead of just 2 layers there could be many more given seasonal textures. This would enable the top 2 layers to be used when the river is full in spring, but the bottom layers used when the river is low in summer. The upper layers could have an invisible texture in summer.

It might be possible to make smaller river pieces and place these on a slope with a white water effect and rocks sticking through to simulate a mountain steam. Bigger pieces might be used in lakes and seas.

Garry

#5 User is offline   Genma Saotome 

  • Owner and Admin
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Owner
  • Posts: 11,829
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 15 September 2017 - 09:25 AM

View PostGarry, on 15 September 2017 - 05:16 AM, said:


It might be possible to make smaller river pieces and place these on a slope with a white water effect and rocks sticking through to simulate a mountain steam. Bigger pieces might be used in lakes and seas.

Garry


Am totally spoiled by the open seas in Naval Action. A 14 second clip on Youtube is enough to show why. This 27 second clip might be even better.

Be sure to view these at full screen size. NA is an open world game using the Unity engine.

p.s. note the subtle rain. IMO much more effective than what we see in OR.

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