Dynamic backgrounds
3 posters
Page 1 of 1
Dynamic backgrounds
- Code:
<?xml version="1.0" encoding="utf-8"?>
<openBVE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
//Inital image
<Background>
<Time>00.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>night.png</Texture>
<TransitionTime>3200</TransitionTime>
</Background>
//on 05:00, start fading it to sunset image
<Background>
<Time>05.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>evening.png</Texture>
<TransitionTime>3600</TransitionTime>
</Background>
//on 06:00, start fading it to a blue sky image
<Background>
<Time>06.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>day.png</Texture>
<TransitionTime>1800</TransitionTime>
</Background>
//on 16:00, start fading it to sunset image
<Background>
<Time>16.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>evening.png</Texture>
<TransitionTime>5400</TransitionTime>
</Background>
//on 17:30, start fading it to night sky
<Background>
<Time>17.30</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>night.png</Texture>
<TransitionTime>1800</TransitionTime>
</Background>
</openBVE>
I am trying to utilize the new dynamic backgrounds feature.
The route starts at 17:32, and the background is night. (The image defined on the first section). Isn't it supposed to be evening?
I just can't figure out why it's doing that. If I however wait for 24 hours, it would display a sunset image. Then fade out until 18:00
My best guess is since the start time is 17:32, the 16:00 image is not loaded (since it wasn't elapsed in the first place). And the game just uses the first image(?)
I am confused whats the correct approach, and is this even meant to be used with more than 2 backgrounds?
Any help would be appreciated, thanks
Re: Dynamic backgrounds
This should work with more than one, no problem.
I think the issue is most likely that you're starting in the middle of a transition, although I'll have to test properly later on in the week.
Try starting the night background at 17.35 & I think the transition will likely work as you expect.
I think the issue is most likely that you're starting in the middle of a transition, although I'll have to test properly later on in the week.
Try starting the night background at 17.35 & I think the transition will likely work as you expect.
Re: Dynamic backgrounds
Nope, tried 17.35 and the sky is still night (both before and after 17.35)
(Dunno why it says "The message is too long" when I posts my image)
(Dunno why it says "The message is too long" when I posts my image)
Re: Dynamic backgrounds
At the starting simulation, I have to change to sunset background image.
I think that the Dynamic background(also lighting), not need have't write all day.
I want to change background quickly, so, I wrote TransitionTime to 1.
after transitiontime set to 1800, I changed night background perfectly.
This route starts 17:52, and change to the night background time is as about 18:20.
I think that the 'Time' is change start time.
And by the TransitionTime minutes, background is transformation smoothly.
Before the start time, we have to set default background by Transitiontime is 1.
I solved the problem in this way.
I think that the Dynamic background(also lighting), not need have't write all day.
I want to change background quickly, so, I wrote TransitionTime to 1.
after transitiontime set to 1800, I changed night background perfectly.
This route starts 17:52, and change to the night background time is as about 18:20.
I think that the 'Time' is change start time.
And by the TransitionTime minutes, background is transformation smoothly.
Before the start time, we have to set default background by Transitiontime is 1.
I solved the problem in this way.
- Code:
<?xml version="1.0" encoding="utf-8"?>
<openBVE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Background>
<Time>17.30</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>./sky3-sunset.png</Texture>
<TransitionTime>1</TransitionTime>
</Background>
<Background>
<Time>17.50</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>./sky3-night.png</Texture>
<TransitionTime>1800</TransitionTime>
</Background>
</openBVE>
Midnight Express Ginga81- Posts : 154
Join date : 2016-09-25
Re: Dynamic backgrounds
So I changed the first background (00.00) to 23.59 and it solves the problem, never thought it's that simple
The updated code is as follows:
Though I noticed that there's no transition at all between 05.00 and 06.00, can someone successfully reproduce it?
The updated code is as follows:
- Code:
<?xml version="1.0" encoding="utf-8"?>
<openBVE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Background>
<Time>23.59</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>night.png</Texture>
<TransitionTime>1800</TransitionTime>
</Background>
<Background>
<Time>05.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>evening.png</Texture>
<TransitionTime>3600</TransitionTime>
</Background>
<Background>
<Time>06.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>day.png</Texture>
<TransitionTime>1800</TransitionTime>
</Background>
<Background>
<Time>16.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>evening.png</Texture>
<TransitionTime>5400</TransitionTime>
</Background>
<Background>
<Time>17.32</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>night.png</Texture>
<TransitionTime>1800</TransitionTime>
</Background>
<Background>
<Time>18.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>night.png</Texture>
<TransitionTime>7400</TransitionTime>
</Background>
</openBVE>
Though I noticed that there's no transition at all between 05.00 and 06.00, can someone successfully reproduce it?
Re: Dynamic backgrounds
3600sec=60minute.
So I think 5:00 to 6:00 is overlapping.
I think if you change 3600 to for examle 3000, I think perhaps it change.
So I think 5:00 to 6:00 is overlapping.
I think if you change 3600 to for examle 3000, I think perhaps it change.
Midnight Express Ginga81- Posts : 154
Join date : 2016-09-25
LXQt likes this post
Re: Dynamic backgrounds
Midnight Express Ginga81 wrote:3600sec=60minute.
So I think 5:00 to 6:00 is overlapping.
I think if you change 3600 to for examle 3000, I think perhaps it change.
Opps sorry, logic error there. It's all fine now
Gothpaladinus and Midnight Express Ginga81 like this post
Similar topics
» Dynamic Lighting & Backgrounds, based upon the time of day
» Route backgrounds problem
» Animated Model Plugin: Dynamic Texture Update
» Route backgrounds problem
» Animated Model Plugin: Dynamic Texture Update
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum