Train lights

View previous topic View next topic Go down

Train lights

Post by Dexter on Fri May 18, 2012 8:21 am

I would like to test a hypothesis on train lights - just asking if anyone already made it, so I eventually don't have to experiment with that.

Idea:
On a train, we only want to see the effect of the headlight in -let's say- dark areas such as tunnels, pass under bridges etc. Of course the light cannot be eliminated completely even when travelling along the route on passages without any shadows / darker places, but I was thinking about how to minimalise the unwanted light effect.

Solution to experiment with:
I have established a hypothesis that if I create a a mesh for the light such as this

Code:
CreateMeshBuilder,
AddVertex, -0.13,-0.13,0
AddVertex, -0.13,0.13,0
AddVertex, 0.13,0.13,0
AddVertex, 0.13,-0.13,0
AddFace, 0,1,2,3
SetColor,255,255,255,0

I have an invisible face (the coordinates are irrelevant at the moment), to which I can apply
Code:
SetEmissiveColor,255,255,255
SetBlendMode,Additive

In my opinion, by adjusting the alpha parameter in the first face, I could be able to control the light intensity (luminescence, which is something different from its color) - am I correct in this one?
Also, which type of geometric object you find most suitable for reproducing a beam of rays? Considering the glass of the headlight is usually concave (talking about direction bulb -> outer word), it should more or less act as a concave lens... so a truncated circular cone should be fine?


Last edited by Derryck on Fri May 18, 2012 1:56 pm; edited 1 time in total
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by lonelyinardwick on Fri May 18, 2012 1:50 pm

Do you mean (e.g.) light being reflected onto the ground, to which you want to minimise when out in the bright open?

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Train lights

Post by Dexter on Fri May 18, 2012 1:53 pm

Exactly.
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by lonelyinardwick on Fri May 18, 2012 2:12 pm

My advice is: I wouldn't worry about it too much. But if you're really ambitious, then I would suggest creating a duplicate mesh and a null texture, and do one mesh with SetAdditive and the other mesh with SetAdditive and/or the value of SetColor's 4th column at say.. 150. As for the null texture, place that in the daytime column of the nighttime mesh.

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Train lights

Post by Dexter on Fri May 18, 2012 2:17 pm

Yes... is actually the tunnel considered a place to apply night textures? What are the conditions - fog? Brightness?
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by lonelyinardwick on Fri May 18, 2012 2:21 pm

Derryck wrote:Yes... is actually the tunnel considered a place to apply night textures? What are the conditions - fog? Brightness?
Up to you. Wink

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Train lights

Post by Dexter on Fri May 18, 2012 2:23 pm

But how to write it in the route... I mean, I know how to use the .fog command, but how to tell the sim to apply the nightcab. Wink
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by lonelyinardwick on Fri May 18, 2012 2:26 pm

Derryck wrote:But how to write it in the route... I mean, I know how to use the .fog command, but how to tell the sim to apply the nightcab. Wink
.Brightness ?

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Train lights

Post by Dexter on Fri May 18, 2012 2:29 pm

I don't know, I have never tried that before, that's why I'm asking... it is not very helpful answering question with another question. Smile
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by lonelyinardwick on Fri May 18, 2012 2:34 pm

Derryck wrote:I don't know, I have never tried that before, that's why I'm asking... it is not very helpful answering question with another question. Smile
Okay. Brightness is for Brightness, Fog is for Fog. If you define a reduced brightness from A to B in a route, it'll make your cab and exterior simulated darker. Fog command just adds fog, that I wouldn't recommend if the tunnel is short, especially if your rolling stock contains 3D interior, because the fog (as currently simulated) would just go right through it. It's about time to add Brightness, Derryck.

Ps. If you really want fog, I'd suggest try copying some codes from the NWM or LU. Just don't add it deliberately. ;-)

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Train lights

Post by Dexter on Fri May 18, 2012 2:43 pm

You see? You can be helpful. Thanks!Very Happy
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by lonelyinardwick on Fri May 18, 2012 2:43 pm

np!

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Train lights

Post by graymac on Fri May 18, 2012 4:59 pm

Track, .brightness is likely the key to your solution.
It is a means by which the daytime and nighttime image textures are blended, with 255 value being total day and 0 value being total night.

I notice that you do not use .brightness in tunnels on FirstBrno. Check out NMW or Ballyfeckin to see how it is applied.
I also noted an anomaly on one Czech loco travelling a route with .brighness valuuses used. The actual windscreen on the loco turned blue (transparency color) in parallel with the prevailing bightness value.
avatar
graymac

Posts : 1741
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Train lights

Post by Dexter on Fri May 18, 2012 5:11 pm

Which class was that, 151?
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by busheyheath on Fri May 18, 2012 5:49 pm

I use brightness on all of my routes. It only affects the cab, but it looks rather realistic (bridges, stations, tunnels...
avatar
busheyheath

Posts : 294
Join date : 2012-01-05
Location : Netherlands

Back to top Go down

Re: Train lights

Post by graymac on Fri May 18, 2012 6:21 pm

Which class was that, 151?
I don't think so. I just tried that to see but I can't get it to move so it probably wasn't that one. I did mail you about it last week, I think you replied its one of Don's? The latest 163 doesn't do it.
avatar
graymac

Posts : 1741
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Train lights

Post by Dexter on Fri May 18, 2012 7:05 pm

graymac wrote:I did mail you about it last week, I think you replied its one of Don's? The latest 163 doesn't do it.

Ah you mean Vince's. The latest 163 doe not yet have a night panel. I'll have to work on it. Very Happy
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by graymac on Fri May 18, 2012 10:23 pm

I'll have to work on it.
Right! There's always plenty of jobs to do, we never seem to run out of work here. Pity the pay is lousy Very Happy
avatar
graymac

Posts : 1741
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Train lights

Post by Dexter on Sat May 19, 2012 8:28 am

Yes, even a bakhshish is a truckload of money compared to our wage... Very Happy
avatar
Dexter

Posts : 1827
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Train lights

Post by buckysam on Thu May 31, 2012 4:57 am

Derryck wrote:
I would like to test a hypothesis on train lights - just asking if anyone already made it, so I eventually don't have to experiment with that.

Idea:
On a train, we only want to see the effect of the headlight in -let's say- dark areas such as tunnels, pass under bridges etc. Of course the light cannot be eliminated completely even when travelling along the route on passages without any shadows / darker places, but I was thinking about how to minimalise the unwanted light effect.

Solution to experiment with:
I have established a hypothesis that if I create a a mesh for the light such as this

Code:
CreateMeshBuilder,
AddVertex, -0.13,-0.13,0
AddVertex, -0.13,0.13,0
AddVertex, 0.13,0.13,0
AddVertex, 0.13,-0.13,0
AddFace, 0,1,2,3
SetColor,255,255,255,0

I have an invisible face (the coordinates are irrelevant at the moment), to which I can apply
Code:
SetEmissiveColor,255,255,255
SetBlendMode,Additive

In my opinion, by adjusting the alpha parameter in the first face, I could be able to control the light intensity (luminescence, which is something different from its color) - am I correct in this one?
Also, which type of geometric object you find most suitable for reproducing a beam of rays? Considering the glass of the headlight is usually concave (talking about direction bulb -> outer word), it should more or less act as a concave lens... so a truncated circular cone should be fine?
Actually, Anthony has already done that with his Cl 323 Unrefurbished in which at night, you can see the headlights in front of you, but only in the cab view. And the 1995 Tube stock from TCS has lights in front of it in tunnels, but they are the opposite, strangely and very ironicly, Rolling Eyes they can only be seen from the outside of the cab. That to this still amazes me how that even happened. But I would love it if more trains had this feature.

buckysam

Posts : 150
Join date : 2012-05-28
Age : 21
Location : Kentucky USA

Back to top Go down

Re: Train lights

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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