BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Multiple Ambiant Lightings in Routes

3 posters

Go down

Multiple Ambiant Lightings in Routes Empty Multiple Ambiant Lightings in Routes

Post by 1969 St. Louis R-40M Tue Aug 03, 2021 12:31 pm

I'm considering making nighttime scenarios for my routes, but the problem is: the route has underground portions.
Why is it a problem? Well, currently the .AmbiantLight and other Lighting commands (.DirectionalLight and .LightDirection) are part of the .Route namespace, which applies to the whole route.
Let's say the route begins in an open portion, and I apply a Route.AmbiantLight 0;0;0 for example. The underground portion will be affected as well, unless the underground objects (tracks, tunnels and stations) are all EmissiveColor which is out of the question for me. And this is not only for nighttime scenarios, but for morning/evening scenarios too where sunrise and sunset situations will be simulated, and this time the lighting colour difference would be much more obvious underground.
Using .AmbiantLight for open portions is not a problem, since a few objects would need to be modified to simulate for example illuminated building windows, station platforms, canopies and such.

So my suggestion is:
Why not implementing the .AmbiantLight, .DirectionalLight and .LightDirection commands into the .Track namespace OR adding a position option in the XML Dynamic Lighting? This way we can apply different lighting options at different points in the route, separate the underground potions from the open portions of the route, and thus leave the underground portions unaffected by the commands. (We could also apply the dark lighting commands in certain tunnels as well if we wish them to be darker in some areas of the route, while keeping the default lighting at stations). Let's take an example where we exit a tunnel portal into an open portion where it's nighttime, so the command .AmbiantLight 0;0;0, is placed at the portal: In the tunnel, the lighting is default. As soon as the camera exits the tunnel, the lighting changes to the defined dark colour (0;0;0 in this case). In order to hide the sudden change (since, before reaching the portal, the outside portion will still be affected by the current default lighting) we can add a black .Fog command at the end of the portal until the camera reaches that point, something that is already possible.
In the opposite example, when we are entering a tunnel, the current lighting is dark, and as soon as the camera passes the tunnel portal, the lighting gets back to default. This time no .Fog commands are needed.

In conclusion, all I'm asking for is to have the .AmbiantLight, .DirectionalLight and .LightDirection commands in the .Track namespace OR position options in the XML Dynamic Lighting for future OpenBVE versions. I think this would be a very great idea for OpenBVE.

Also, excluding the problem I stated above, can the .Brightness 0 command make the train a bit darker in future OpenBVE versions? Currently the trains are not dark enough when the tunnels are dark themselves so the train just looks out of place.
1969 St. Louis R-40M
1969 St. Louis R-40M

Posts : 29
Join date : 2020-02-07

Back to top Go down

Multiple Ambiant Lightings in Routes Empty Re: Multiple Ambiant Lightings in Routes

Post by Midnight Express Ginga81 Thu Aug 05, 2021 6:21 am

I already suggestiones the same of your idea.
https://bveworldwide.forumotion.com/t2113-ambientlightdirectionallight-and-lightdirection-arewant-to-change-anytime#20714
We hope the change ambient light and lighting color anytime.

Midnight Express Ginga81

Posts : 106
Join date : 2016-09-25

Back to top Go down

Multiple Ambiant Lightings in Routes Empty Re: Multiple Ambiant Lightings in Routes

Post by leezer3 Thu Aug 05, 2021 12:15 pm

https://github.com/leezer3/OpenBVE/pull/683

Needed to get around to the other one, but there we go Smile

I've implemented (but not tested, may well not yet work quite right.....) both variants in the PR above. I'll try and get this properly tested / merged over the next few days.
Thus, you can either load a complete dynamic light set for any given track position, or alter the single light.

For the time being at least, these again can't mix and match.

leezer3

Posts : 1867
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gothpaladinus, Midnight Express Ginga81 and 1969 St. Louis R-40M like this post

Back to top Go down

Multiple Ambiant Lightings in Routes Empty Re: Multiple Ambiant Lightings in Routes

Post by 1969 St. Louis R-40M Sun Aug 08, 2021 8:39 am

Hopefully this will get soon implemented in the near future versions Very Happy!
1969 St. Louis R-40M
1969 St. Louis R-40M

Posts : 29
Join date : 2020-02-07

Midnight Express Ginga81 likes this post

Back to top Go down

Multiple Ambiant Lightings in Routes Empty Re: Multiple Ambiant Lightings in Routes

Post by leezer3 Fri Aug 13, 2021 1:37 pm

These should now be in the daily builds from today.

I'll update the documentation on the main site in a few minutes.
Edit:
Documentation on main site now has these in there.

leezer3

Posts : 1867
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gothpaladinus and Midnight Express Ginga81 like this post

Back to top Go down

Multiple Ambiant Lightings in Routes Empty Re: Multiple Ambiant Lightings in Routes

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum