Let there be lights

General discussion about RailWorks, your thoughts, questions, news and views!

Moderator: Moderators

skiddaw
Established Forum Member
Posts: 384
Joined: Thu Jul 23, 2009 5:33 pm
Location: Cheshire

Let there be lights

Post by skiddaw »

There has been some discussion on and off about the lack of headlights on locos ( most recently in the "what's the matter with RW2" thread).
This is not a big issue for Uk locos, particularly historic , where the lights are more for indication than to light the way ahead for the driver, but it has been mentioned that some european & US locos do use headlights.
The chinese locos from RWSO do have projected headlights in RW and I've recently noticed that the E189 locos by A Stauder do have working lights with a forward projecting beam and illuminate the track from the cab. A nice touch is that the red tail lights on the loco also shine on the track.
Anyone know any more locos which have similar lighting effects?
styckx
Very Active Forum Member
Posts: 3989
Joined: Mon Jul 27, 2009 8:33 pm

Re: Let there be lights

Post by styckx »

skiddaw wrote: The chinese locos from RWSO do have projected headlights in RW and I've recently noticed that the E189 locos by A Stauder do have working lights with a forward projecting beam and illuminate the track from the cab. A nice touch is that the red tail lights on the loco also shine on the track.
Anyone know any more locos which have similar lighting effects?
They aren't real lights. Imagine if you will a translucent sheet of paper. More translucent than tracing paper. Hold it up to a house, the house will appear white and lit up! Move the paper away and the house is dark again.

Now, lay that peice of paper at the bottom of the front of a locomotive so it's spread out across the tracks. That's how the `fake' lighting is done.
User avatar
gypbrc
Very Active Forum Member
Posts: 1813
Joined: Thu Feb 11, 2010 8:09 pm

Re: Let there be lights

Post by gypbrc »

Lighting effects are not particularly difficult to implement from an aesthetic point of view. For example, the simplest way of implementing this would be to place an object similar to that under a lamp at the front of the locomotive, so that it appears to project light onto the ground in front of the locomotive. The actual problem comes when you consider how this object needs to interact with the surroundings. Now, if routes were non-editable, then things would be rather easier, as you could program the track the lightbeam should take; but owing to RW's sandbox approach, this is rather more difficult to implement as the lightbeam could follow any path whatsoever. The light object need to have adjustable geometry and needs to interact with the geometry around itself so that it knows how to adjust.

This doesn't seem to be a particularly trivial problem.
User avatar
Shadders
Established Forum Member
Posts: 322
Joined: Sun Oct 14, 2007 7:58 pm

Re: Let there be lights

Post by Shadders »

Hello,

I may be being a bit thick here, but since RW supports dynamic shadows, why not dynamic lights? Since in order to cast a shadow, a light source has to exist.

Best regards,

Shad.
User avatar
Kromaatikse
For Quality & Playability
Posts: 2733
Joined: Fri Jun 12, 2009 5:39 pm
Location: Helsinki

Re: Let there be lights

Post by Kromaatikse »

In principle they could add a little routine to every material shader used in the game, to look for a lighting texture projected from the player's train and take that into account.

But that would only solve the problem for the player's train. There would be a separate projected texture for each AI train as well. The logistics of this quickly become mind-boggling if done naively.

A better solution is to use Deferred Rendering. But that's a bit of an advanced technique, and the engine almost certainly doesn't support it.
The key to knowledge is not to rely on others to teach you it.
bigphill2
Well Established Forum Member
Posts: 832
Joined: Thu Jun 04, 2009 10:31 am

Re: Let there be lights

Post by bigphill2 »

Hi guys
Theres a guy called Pike on trainsim.com that has added lights to most of the US locos. His website is http://pikesproducts.com/14201.html . Most of his stuff is freeware but 1 or 2 are very inexpensive . Maybe we can get him to tweek the UK stuff . Have a look and see what you think
Phill
Trainguy76
Very Active Forum Member
Posts: 2053
Joined: Mon May 25, 2009 3:28 pm
Location: Dreamland, USA.
Contact:

Re: Let there be lights

Post by Trainguy76 »

bigphill2 wrote:Hi guys
Theres a guy called Pike on trainsim.com that has added lights to most of the US locos. His website is http://pikesproducts.com/14201.html . Most of his stuff is freeware but 1 or 2 are very inexpensive . Maybe we can get him to tweek the UK stuff . Have a look and see what you think
Phill
styckx wrote: They aren't real lights. Imagine if you will a translucent sheet of paper. More translucent than tracing paper. Hold it up to a house, the house will appear white and lit up! Move the paper away and the house is dark again.

Now, lay that peice of paper at the bottom of the front of a locomotive so it's spread out across the tracks. That's how the `fake' lighting is done.
Same thing.
The Most Astounding Fact

... .-.-.- - .-.-.- .- .-.-.- -.-- .-.-.-
jimmyshand
Very Active Forum Member
Posts: 2391
Joined: Fri Sep 02, 2005 8:08 am

Re: Let there be lights

Post by jimmyshand »

If it's as mindbogglingly complex as some of you suggest then how come 10 years ago MSTS had it working fine from the very first mk1 release??? Personally I'm not that bothered about headlights but I don't think people should be hiding behind science to try to defend "what can't be done" when quite clearly it can be done as other products testify. Same goes for BVE and it's motion effects and superelevation. Why shouldn't we be pushing for the same in RW?
transadelaide
Very Active Forum Member
Posts: 2659
Joined: Mon Nov 23, 2009 12:30 pm
Location: Adelaide, South Australia

Re: Let there be lights

Post by transadelaide »

If I got a dollar for every time I read somebody whining about superelevation in RW I could buy all the DLC in the catalogue. It's no more than eye candy that would not even be noticed by most users.
Image
Trainguy76
Very Active Forum Member
Posts: 2053
Joined: Mon May 25, 2009 3:28 pm
Location: Dreamland, USA.
Contact:

Re: Let there be lights

Post by Trainguy76 »

jimmyshand wrote:If it's as mindbogglingly complex as some of you suggest then how come 10 years ago MSTS had it working fine from the very first mk1 release??? Personally I'm not that bothered about headlights but I don't think people should be hiding behind science to try to defend "what can't be done" when quite clearly it can be done as other products testify.
They have said that they have done it, but weren't pleased with it.

My theory is MSTS uses an editor and a "play" program, so it is not a "sandbox" program. The routes are pre-calculated in MSTS and permanent. In RailWorks the locations of scenery could change instantly with the world editor. So it's more difficult to calculate.

Same goes for BVE and it's motion effects and superelevation. Why shouldn't we be pushing for the same in RW?
Because it's complex to do...

It's relatively simple with single track, but with creating junctions it would be like trying to get a square peg in at round hole.
The Most Astounding Fact

... .-.-.- - .-.-.- .- .-.-.- -.-- .-.-.-
Trainguy76
Very Active Forum Member
Posts: 2053
Joined: Mon May 25, 2009 3:28 pm
Location: Dreamland, USA.
Contact:

Re: Let there be lights

Post by Trainguy76 »

transadelaide wrote:If I got a dollar for every time I read....
If I had a dollar for every time I read this phrase... :wink:
The Most Astounding Fact

... .-.-.- - .-.-.- .- .-.-.- -.-- .-.-.-
bigphill2
Well Established Forum Member
Posts: 832
Joined: Thu Jun 04, 2009 10:31 am

Re: Let there be lights

Post by bigphill2 »

Hi all
Same thing or not its a pleasant improvement on nothing . Its a good start so to speak
Phill
User avatar
Kromaatikse
For Quality & Playability
Posts: 2733
Joined: Fri Jun 12, 2009 5:39 pm
Location: Helsinki

Re: Let there be lights

Post by Kromaatikse »

I believe MSTS did per-vertex lighting by calculating it on the CPU - quite typical for DX6 games, Freespace 2 did the same. That meant it could technically deal with an number of lights as long as the CPU horsepower could keep up. But this is one of the reasons it looked sub-par and didn't scale to newer machines' capabilities.

Nowadays the quality and performance bars are much higher, which require per-pixel lighting done on the GPU. This requires different techniques which are harder to implement.
The key to knowledge is not to rely on others to teach you it.
USRailFan
Very Active Forum Member
Posts: 4226
Joined: Wed May 14, 2003 8:07 am
Location: Norway

Re: Let there be lights

Post by USRailFan »

Kromaatikse wrote:I believe MSTS did per-vertex lighting by calculating it on the CPU - quite typical for DX6 games
MSTS was (is) a DX7 game...
User avatar
adam3544
Well Established Forum Member
Posts: 954
Joined: Mon Oct 24, 2005 7:10 pm

Re: Let there be lights

Post by adam3544 »

Locked

Return to “[RW] General RW Discussion”