Animated river A way to make water move in Openrails
#11
Posted 03 August 2017 - 05:50 AM
The objects shown in the image are all copies of a 100 metre square, the original is the light grey one. I have copied it and reskinned it with several water textures from my "Envfiles".
What I am trying to do has partially worked.
I have succeeded in getting a river to flow over the surface of an object. I think that if I make the base layer and the river the same texture it will avoid the delay waiting for the river to fill up.
Then I would like to cover the river with a semi transparent layer allowing the movement to show through. This has not gone at all to plan.
The 2 squares that cover the river are from upper layers in the water environment and from reading Michael Vone's guide they should be semi transparent.
I have looked at the .s file for the square and the env file for water and notice that the line:
named_shader ( TexDiff ) might be different in the env file and in River2.s. Changing "TexDiff" to "BlendATex" or "BlendATexDiff" does change the transparency. It makes the squares invisible.
Any help with this would be appreciated.
Garry
What I am trying to do has partially worked.
I have succeeded in getting a river to flow over the surface of an object. I think that if I make the base layer and the river the same texture it will avoid the delay waiting for the river to fill up.
Then I would like to cover the river with a semi transparent layer allowing the movement to show through. This has not gone at all to plan.
The 2 squares that cover the river are from upper layers in the water environment and from reading Michael Vone's guide they should be semi transparent.
I have looked at the .s file for the square and the env file for water and notice that the line:
named_shader ( TexDiff ) might be different in the env file and in River2.s. Changing "TexDiff" to "BlendATex" or "BlendATexDiff" does change the transparency. It makes the squares invisible.
Any help with this would be appreciated.
Garry
#12
Posted 03 August 2017 - 08:09 AM
Hi Garry,
It would be interesting to try putting one of the river2 components as the overlay to see if that works. The river2 shape is semi-transparent. You should already have the shape and textures in the right place, so you would need to add an entry in the route's ref file. Something like this would work.
Static (
Class ( "River" )
Filename ( "River2.s" )
Align ( None )
Description ( "River2" )
)
Geoff
It would be interesting to try putting one of the river2 components as the overlay to see if that works. The river2 shape is semi-transparent. You should already have the shape and textures in the right place, so you would need to add an entry in the route's ref file. Something like this would work.
Static (
Class ( "River" )
Filename ( "River2.s" )
Align ( None )
Description ( "River2" )
)
Geoff
#13
Posted 03 August 2017 - 08:41 AM
Hi Geoff
River2.s as an object is in the foreground left, covering the river and part of the base square. It does not have any transparency that I can see. In the background is a river of 100 metre squares. I tried copying your river2.s as river3 and changing the texture to the one you can see, but it was invisible even when I changed the TexDiff entry.
I don't like my big squares, when they overlap they flicker too much. I will try them later with a smaller size, but the problem is that the river I want to fill is 60 metres wide and about 1500 metres long, and it is right beside the track.
Garry
River2.s as an object is in the foreground left, covering the river and part of the base square. It does not have any transparency that I can see. In the background is a river of 100 metre squares. I tried copying your river2.s as river3 and changing the texture to the one you can see, but it was invisible even when I changed the TexDiff entry.
I don't like my big squares, when they overlap they flicker too much. I will try them later with a smaller size, but the problem is that the river I want to fill is 60 metres wide and about 1500 metres long, and it is right beside the track.
Garry
#14
Posted 03 August 2017 - 09:19 AM
Thats pretty cool. Although would it not be easier to code ORTS for moving rivers?
Robert
Robert
#15
Posted 03 August 2017 - 12:07 PM
#16
Posted 03 August 2017 - 12:50 PM
Hi Garry,
Have you tried looking at it in Openrails? I noticed that the texture disappears in the Editor, but is still visible in OR.
Geoff
Have you tried looking at it in Openrails? I noticed that the texture disappears in the Editor, but is still visible in OR.
Geoff
#17
Posted 03 August 2017 - 12:53 PM
SP 0-6-0, on 03 August 2017 - 09:19 AM, said:
Thats pretty cool. Although would it not be easier to code ORTS for moving rivers?
Robert
Robert
Well, I don't know how much work there would be in coding, and when it might get done. Meanwhile, we might just find something that works for now.
Once you are set up with the shape files, it's pretty easy to do this. Even if they coded something in for rivers, you would still have to define a path and direction of flow,
Geoff
#18
Posted 03 August 2017 - 03:39 PM
It seems to me like it'd be "good enough" until the OR engine can get to a point where it can simulate water. With several layers of very transparent textures (which would minimize the perception of flickering), I'd imagine the effect could be fairly convincing.
#19
Posted 04 August 2017 - 08:21 AM
Hi Geoff
I have made some progress, as shown in these 2 OpenRails screenshots.
My river is flowing between retaining walls, with the base of 100 metre squares with a dark river bottom texture laid between. I have made these "terrain objects" and placed the ruler as instructed for animated people -- stick to everything SHIFT+Q. The line between the ruler posts was just below the surface of the river bottom so I lowered this with a few CTRL+3 strokes. Above this I have placed another 100 metre square with a water top texture. I have succeeded in making this semi-transparent by following the tutorial on the steam4me site
http://msts.steam4me...pdv_alpha1.html and _alpha3.html
The second image shows a river made of the same water top squares, the first image shows your river2.s pieces.
Garry
I have made some progress, as shown in these 2 OpenRails screenshots.
My river is flowing between retaining walls, with the base of 100 metre squares with a dark river bottom texture laid between. I have made these "terrain objects" and placed the ruler as instructed for animated people -- stick to everything SHIFT+Q. The line between the ruler posts was just below the surface of the river bottom so I lowered this with a few CTRL+3 strokes. Above this I have placed another 100 metre square with a water top texture. I have succeeded in making this semi-transparent by following the tutorial on the steam4me site
http://msts.steam4me...pdv_alpha1.html and _alpha3.html
The second image shows a river made of the same water top squares, the first image shows your river2.s pieces.
Garry
#20
Posted 04 August 2017 - 09:58 AM
Hi Garry,
That does look like good progress. I would bet that looks good when moving.
Geoff
That does look like good progress. I would bet that looks good when moving.
Geoff