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

Multicolor .Brightness Commands

2 posters

Go down

Multicolor .Brightness Commands Empty Multicolor .Brightness Commands

Post by Inamak17 Tue Jul 18, 2023 2:01 am

In some areas, specifically tunnels, there could be lights of different colors (blue emergency exit lights, or orange lights etc). Would it be difficult to implement a .Brightness command that can be used with RGB values? 

ex:

.Brightness 255;255;255 
                  (R) (G)  (B)

Inamak17

Posts : 9
Join date : 2020-04-01

Back to top Go down

Multicolor .Brightness Commands Empty Re: Multicolor .Brightness Commands

Post by leezer3 Tue Jul 18, 2023 10:26 am

Hmm...

Are you specifically wanting this to apply to the panel only?

It's only a simple multiplicative blend, so I don't see an immediate issue to adding it, although it would want a new command, something like **Track.RGBBrightness**
Obviously, brightness commands only work with 2D panels too.

See also:
https://openbve-project.net/documentation_hugo/en/routes/xml/dynamiclight.html

Changing the ambient light / directional light values mid-route.
(Doesn't link too well to the middle of a massive documentation page)

Track.AmbientLight RedValue; GreenValue; BlueValue
RedValue: An integer ranging from 0 to 255 representing the red component of the ambient light. The default value is 160.
GreenValue: An integer ranging from 0 to 255 representing the green component of the ambient light. The default value is 160.
BlueValue: An integer ranging from 0 to 255 representing the blue component of the ambient light. The default value is 160.
This command defines the ambient light color to be used from this point onwards. All polygons in the scene are illuminated by the ambient light regardless of the light direction.


Track.DirectionalLight RedValue; GreenValue; BlueValue
RedValue: An integer ranging from 0 to 255 representing the red component of the directional light. The default value is 160.
GreenValue: An integer ranging from 0 to 255 representing the green component of the directional light. The default value is 160.
BlueValue: An integer ranging from 0 to 255 representing the blue component of the directional light. The default value is 160.
This command defines the directional light to be used from this point onwards. The polygons in the scene are only fully illuminated by the directional light if the light direction points at the front faces. If pointing at back faces, no light is contributed. Route.LightDirection should be set to specify the light direction.


Track.LightDirection Theta; Phi
Theta: A floating-point number representing the angle in degrees which controls the pitch of the light direction. The default value is 60.
Phi: A floating-point number representing the angle in degrees which controls the planar rotation of the light direction. The default value is about -26.57.
This command defines the light direction from this point onwards. This is the direction the light shines at, meaning the opposite direction the sun is located at. First, Theta determines the pitch. A value of 90 represents a downward direction, while a value of -90 represents an upward direction. With those extremes, the value of Phi is irrelevant. A value of 0 for Theta represents a forward direction originating at the horizon behind. Once the pitch is defined by Theta, Phi determines the rotation in the plane. A value of 0 does not rotate, a value of 90 rotates the direction to the right and a value of -90 rotates to the left. A backward direction can be both obtained by setting Theta and Phi to 180 and 0 or to 0 and 180, respectively. Values in-between allow for more precise control of the exact light direction.

leezer3

Posts : 1960
Join date : 2011-08-23

http://www.bvecornwall.co.uk

BPI-919 Andris likes this post

Back to top Go down

Multicolor .Brightness Commands Empty Re: Multicolor .Brightness Commands

Post by Inamak17 Tue Jul 18, 2023 5:56 pm

Thanks, I'll look into that command. I think it would be nice to have this work in the panel as well!

Inamak17

Posts : 9
Join date : 2020-04-01

Back to top Go down

Multicolor .Brightness Commands Empty Re: Multicolor .Brightness Commands

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