Page 1 of 1
Light Cones
Posted: Tue Oct 26, 2010 10:24 am
by buffy500
I may have mentioned this before, but is there anyone who has figured out how to stop MSTS randomly lighting up bits of the train when using a light cone (ie for main night headlights) ?
I've tried as many variations on the lighting spec as I can think of, including taking MSTS Default as an example and I can't make it work without throwing light all over random faces of the train ruining the effect.
The current setting, (which fails badly) is
Code: Select all
Light (
comment( Sphere of light )
Type ( 1 )
Conditions (
Headlight ( 3 )
Unit ( 2 )
TimeOfDay ( 2 )
)
Cycle ( 0 )
FadeIn ( 0.5 )
FadeOut ( 0.5 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffffff )
Position ( 0 1.55 11.60 )
Transition ( 0 )
Radius ( 40.0 )
Angle ( 15.0 )
Re: Light Cones
Posted: Tue Oct 26, 2010 11:19 am
by jbilton
Hi Dave
You could try increasing the distance of the cone from the loco
Position ( 0 1.55 31.60 )
You may have to alter the angle as well.
Cheers
Jon
Re: Light Cones
Posted: Tue Oct 26, 2010 1:33 pm
by buffy500
Jon
It started off well, but as you move the camera it reappears. I guess its a MSTS issue or maybe something broken by MSTSBin
I've never really understood what the angle changes, so its hard to play with it if you don't know what it does.
Re: Light Cones
Posted: Tue Oct 26, 2010 2:49 pm
by jbilton
Hi Dave
Well I've always thought the angle was in degrees from the horizontal ....I think I read that somewhere.
However according to
http://forums.trainsim.com/vbts/archive ... 19201.html
Its the shape of the cone ?..... 180 being a half circle.
I've had some success in the past by raising the height of the cone and then steepening the angle.
Position ( 0 21.55 101.60 )
Transition ( 0 )
Radius ( 40.0 )
Angle ( 35.0 )
Cheers
Jon
Re: Light Cones
Posted: Tue Oct 26, 2010 6:15 pm
by rlmathers
Hi Dave, try the following:
Light (
comment( Sphere of light )
Type ( 1 )
Conditions (
Headlight ( 3 )
Unit ( 2 )
)
Cycle ( 0 )
FadeIn ( 0.5 )
FadeOut ( 0.5 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffffaa )
Position ( 0.0 0.0 0.0 )
Transition ( 0 )
Radius ( 100.0 )
Angle ( 10.0 )
)
)
)
Light (
comment( Headlight Bright Front )
Type ( 0 )
Conditions (
Headlight ( 3 )
Unit ( 2 )
)
FadeIn ( 0.5 )
FadeOut ( 0.5 )
Cycle ( 0 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffffaa )
Position ( x y z )
Azimuth ( 0.0 0.0 0.0 )
Transition ( 0 )
Radius ( 0.4 )
)
)
)
Headlight position x y z to suit the model.
If this fails to correct the light, I am afraid it is down to the model being created with lit surfaces.
buffy500 wrote:
I've never really understood what the angle changes, so its hard to play with it if you don't know what it does.
Angle(n) (Cone lights only) the radius of the cone, in degrees.
Kindest regards
Ray
Re: Light Cones
Posted: Tue Oct 26, 2010 8:03 pm
by jimmyladd
I've always used this and found the the forwards light has to be in the loco itself otherwise it lights up the outside of it.
Light (
comment( Sphere of light - forward )
Type ( 1 )
Conditions (
Headlight ( 3 )
Unit ( 0 )
TimeOfDay ( 2 )
)
Cycle ( 0 )
FadeIn ( 0.25 )
FadeOut ( 0.5 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffffff )
Position ( 0 3.5 8 )
Transition ( 0 )
Radius ( 80.0 )
Angle ( 15.0 )
)
)
)
Light (
comment( Sphere of light - reverse )
Type ( 1 )
Conditions (
Headlight ( 2 )
Unit ( 0 )
TimeOfDay ( 2 )
)
Cycle ( 0 )
FadeIn ( 0.25 )
FadeOut ( 0.5 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffffff )
Position ( 0 3.5 -100 )
Transition ( 0 )
Radius ( 80.0 )
Angle ( 15.0 )
)
)
)
Re: Light Cones
Posted: Tue Oct 26, 2010 10:49 pm
by rlmathers
Only one cone type (1) is required.
The `Lights` glow type (0) can then be defined and the direction being controlled by Azimuth(min centre max)
This specifies the heading (rotation about the Y-axis) of glow lights.
Azimuth ( 0.0 0.0 0.0 ) forward
Azimuth ( 180.0 180.0 180.0 ) reverse
Re: Light Cones
Posted: Wed Oct 27, 2010 2:25 am
by buffy500
Putting the light 'in' the model has, to a minor degree made a difference.
The light no longer shows up on the outside of the lead car, but it does show up on all the others depending on camera angle.
Model with no headlight on.
Same model, same location, slightly different camera position with a light cone being used.
Forward and rearward facing faces get lit depending where the camera is positioned.
As you can see from the 1st screen shot, there are no external bright surfaces, with 10 years building models, I have that covered

Re: Light Cones
Posted: Wed Oct 27, 2010 9:40 am
by douglee
Hi Dave,
First as most know I do not build models, so know next to nothing about this, nevertheless.
The second vehicle's front is illuminated. Could this be reflection of the Headlight off of the vehicle in front.
I do not even know if reflection is part of the parameters.
This is probably no help but I have, by looking at things differently, unintentionally found solutions in the past.
Good luck
Doug
Re: Light Cones
Posted: Wed Oct 27, 2010 11:07 am
by buffy500
douglee wrote:Hi Dave,
First as most know I do not build models, so know next to nothing about this, nevertheless.
The second vehicle's front is illuminated. Could this be reflection of the Headlight off of the vehicle in front.
I do not even know if reflection is part of the parameters.
This is probably no help but I have, by looking at things differently, unintentionally found solutions in the past.
Good luck
Doug
It certainly looks as if its reflecting from the surface, but it also reflects off the rear facing surfaces, nothing else in MSTS shows any 'reflection' so I have to think its not intentional, and given that its reflecting from an area where the light is something like 300m away so its not a good look.
Re: Light Cones
Posted: Wed Oct 27, 2010 11:58 am
by douglee
Hi Dave,
As I said. I know nussing!
Sorry I could not be of any help.
Good luck
Doug
Re: Light Cones
Posted: Wed Oct 27, 2010 3:16 pm
by rlmathers
buffy500 wrote:
Forward and rearward facing faces get lit depending where the camera is positioned.
As you can see from the 1st screen shot, there are no external bright surfaces, with 10 years building models, I have that covered

Are the interiors lit, model texture/s, I ask because if there is any leeching to the exterior these will be lit from the sphere of light source.
Re: Light Cones
Posted: Wed Oct 27, 2010 5:03 pm
by rlmathers
Thanks to Doug, I had a rethink, tried different routes with same consist.
No `reflections`, so this apparition seems to be route dependent, the sphere of light is lighting other textures, track or objects along the route which in turn `relect` on the model as it passes.
The only solution to this is to have precise\limited lighting definitions for the model/s.
ie. reduced radii and angle.
Re: Light Cones
Posted: Wed Oct 27, 2010 5:21 pm
by douglee
Hi All,
I read these tech forums in the hope that I'll learn something (Hasn't worked yet

) but it looks as if I was almost right. Don't worry I'll not let it go to my head.
Good luck
Doug
Re: Light Cones
Posted: Thu Oct 28, 2010 2:30 am
by buffy500
In the end, this appears to work ok(ish)
Code: Select all
Position ( -1 0 20 )
Transition ( 0 )
Radius ( 20.0 )
Angle ( 5.0 )