Elvas Tower: Headlights in OR - Elvas Tower

Jump to content

  • 7 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Headlights in OR was Awaiting OR v1.0 Rate Topic: -----

#31 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 December 2014 - 01:27 PM

Here some picture to discuss on (Marias Pass, standard Milepost 1173.10 to Milepost 1166.15 path):
MSTS at midnight:
Attached Image: Lights_on_midnight_MSTS.jpg
OR at midnight:
Attached Image: Lights_on_midnight_OR.jpg
The external lighting is comparable. On the OR picture also the front mountain is partly illuminated; I wonder if this is natural, but it's not so significant.

Now MSTS at 10 AM, summer, clear weather:
Attached Image: Lights_on_10AM_MSTS.jpg
OR at noon (sorry for the 2 hours difference...), summer, clear weather:
Attached Image: Lights_on_noon_OR.jpg

The lighting of OR seems quite unnatural. It significantly modifies the brightness of the surroundings, even if the sun is shining. The brightness of the cone of light pixels can't be the same at day and night, because the eye perceives the same level of luminosity much more in the night than at day. Maybe this is not too complicated to be adjusted in the code.

#32 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 12 December 2014 - 03:52 PM

Hi Folks,

Re: Sphere of light on a Steam Locomotive Tender.

Been playing around with some of my new found information from this thread... Weather conditions work like a champ... However - I am unable to get a sphere/cone of light work on anything except the steam locomotive being driven... I tried everything I could think of - but - when the sphere is attached to the tender - it will not light... Here is one of the many configurations I tried - any suggestions ??? Anyone know of a locomotive that is setup and works - that I could use as a model ???

Locomotive Lighting Code
	Lights	( 	8
		Light (
			comment( Sphere of light - NIGHT )
			Type 	( 1 )
			Conditions	(
				Headlight 	( 3 )
				Unit 		( 2 )
				TimeOfDay 	(2) 
			)
			Cycle	( 0 )
			FadeIn	( 0.5 )
			FadeOut	( 0.5 )
			States	(	1
				State	(
					Duration 	( 0.0 )
					LightColour ( 96f0e296 )
					Position 	( 0.0 3.75 7.0 )
					Transition 	( 0 )
					Radius 		( 75.0 )
					Angle 		( 10.0 )
					)
				)
		)
		Light	(
			comment( Sphere of light - RAIN )
			Type	( 1 )
			Conditions	(
				Headlight	( 3 )
				Unit 		( 2 )
				Weather 	(2) 
			)
			Cycle	( 0 )
			FadeIn	( 0.5 )
			FadeOut	( 0.5 )
			States	(	1
				State	(
					Duration 	( 0.0 )
					LightColour ( 96f0e296 )
					Position 	( 0.0 3.75 7.0 )
					Transition 	( 0 )
					Radius 		( 75.0 )
					Angle 		( 10.0 )
					)
				)
		)
		Light (
			comment( Sphere of light - SNOW )
			Type	( 1 )
			Conditions (
				Headlight ( 3 )
				Unit ( 2 )
				Weather (3) 
			)
			Cycle	( 0 )
			FadeIn	( 0.5 )
			FadeOut	( 0.5 )
			States	(	1
				State	(
					Duration ( 0.0 )
					LightColour ( 96f0e296 )
					Position ( 0.0 3.75 7.0 )
					Transition ( 0 )
					Radius ( 75.0 )
					Angle ( 10.0 )
				)
			)
		)
		Light (
			comment( HEAD LIGHT DISK )
			Type		( 0 )
			Conditions	(
				Headlight ( 3 )
				Unit ( 2 )
			)
			FadeIn	( 0.5 )
			FadeOut	( 0.5 )
			Cycle		( 0 )
			States	(	1
				State	(
					Duration ( 0.0 )
					LightColour ( ddf4ebb6 )
					Position ( 0 3.2 8.185 )
					Azimuth ( -5.0 0.0 5.0 )
					Transition ( 0 )
					Radius ( 0.8 )
				)
			)
		)
		Light (
			comment( CLASS LIGHT STAR FWD - OFF )
			Type		( 0 )
			Conditions	(
				Headlight ( 1 )
				Unit ( 2 )
				TimeOfDay (2)
			)
			FadeIn	( 0.5 )
			FadeOut	( 0.5 )
			Cycle		( 0 )
			States	(	1
				State	(
					Duration ( 0.0 )
					LightColour ( ddf4ebb6 )
					Position ( 1.05 4.3 7.3 )
					Azimuth ( -5.0 0.0 5.0 )
					Transition ( 0 )
					Radius ( 0.25 )
				)
			)
		)
		Light (
			comment( CLASS LIGHT STAR OUT - OFF )
			Type		( 0 )
			Conditions	(
				Headlight ( 1 )
				Unit ( 2 )
				TimeOfDay (2)
			)
			FadeIn	( 0.5 )
			FadeOut	( 0.5 )
			Cycle		( 0 )
			States ( 1
				State (
					Duration ( 0.0 )
					LightColour ( ddf4ebb6 )
					Position ( 1.17 4.3 7.19 )
					Azimuth ( -5.0 90.0 5.0 )
					Transition ( 0 )
					Radius ( 0.25 )
				)
			)
		)
		Light (
			comment( CLASS LIGHT PORT FWD - OFF )
				Type		( 0 )
				Conditions	(
							Headlight ( 1 )
							Unit ( 2 )
							TimeOfDay (2)
						)
				FadeIn	( 0.5 )
				FadeOut	( 0.5 )
				Cycle		( 0 )
				States	(	1
							State	(
									Duration ( 0.0 )
									LightColour ( ddf4ebb6 )
									Position ( -1.05 4.3 7.3 )
									Azimuth ( -5.0 0.0 5.0 )
									Transition ( 0 )
									Radius ( 0.25 )
								)
						)
			)
		Light	(
			comment( CLASS LIGHT PORT OUT - OFF )
				Type		( 0 )
				Conditions	(
							Headlight ( 1 )
							Unit ( 2 )
							TimeOfDay (2)
						)
				FadeIn	( 0.5 )
				FadeOut	( 0.5 )
				Cycle		( 0 )
				States	(	1
							State	(
									Duration ( 0.0 )
									LightColour ( ddf4ebb6 )
									Position ( -1.17 4.3 7.19 )
									Azimuth ( -5.0 270.0 5.0 )
									Transition ( 0 )
									Radius ( 0.25 )
								)
						)
			)
	)


Tender Lighting Code
	Lights ( 3
  		Light (
			Comment ( Sphere of light - NIGHT REV)
			Type		( 1 )
			Conditions	(
				Headlight ( 1 )
				)
			Cycle	( 0 )
			FadeIn	( 0.5 )
			FadeOut	( 0.5 )
			States	(	1
				State	(
					Duration ( 0.0 )
					LightColour ( fff0e296 )
					Position ( 0.0 3.75 27.0 )
					Transition ( 0 )
					Radius ( 75.0 )
					Angle ( 10.0 )
				)
			)
		)
		Light (
			Comment ( Red Light )
			Type ( 0 )
			Conditions (
				Headlight ( 0 )
				Unit ( 3 )
			)
			FadeIn ( 0.5 )
			FadeOut ( 0.5 )
			States ( 1
				State (
					Duration ( 0.0 )
					LightColour ( FFee0010 )
					Position ( 1.28 3.78 -6.95 )
					Azimuth ( -180 -180 -180 )
					Transition ( 0 )
					Radius ( 0.20 )
				)
			)
		)
		Light (
			Comment ( Red Light )
			Type ( 0 )
			Conditions (
				Headlight ( 0 )
				Unit ( 3 )
			)
			FadeIn ( 0.5 )
			FadeOut ( 0.5 )
			States ( 1
				State (
					Duration ( 0.0 )
					LightColour ( FFee0010 )
					Position ( -1.26 3.78 -6.95 )
					Azimuth ( -180 -180 -180 )
					Transition ( 0 )
					Radius ( 0.20 )
				)
			)
		)
	)


Regards,
Scott

#33 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 12 December 2014 - 04:43 PM

Hi Csantucci,

As for light cones/spheres in your pictures - for better results - turn the intensity of the light down - as per my examples above - I am using an intensity of 96 (Hex) [ LightColour ( 96f0e296 ) ] and it yields some of the best lights I've ever seen in a train sim at night... Mine is for a steam engine so you might want to use just a tad more intensity for modern diesels... For daylight operation use a condition of [ TimeOfDay (2) ] to turn OFF the sphere/cone - - - I think you'll like the results much better...

Regards,
Scott

#34 User is offline   steved 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,871
  • Joined: 19-December 09
  • Gender:Male
  • Location:South of here
  • Simulator:ORMG
  • Country:

Posted 12 December 2014 - 07:30 PM

This is some of the best information to come along in a long time.
I adjusted the lighting parameters on a couple of engines and I have to say I couldn't be happier.
I agree with Dave. Need to keep the code as is for OR. I don't want to go back and have to change it again.
While a utility to automate this would be good, it really doesn't take much to achieve startling results.
Just cut the brightness down to 30-50% and the radius to around 5-6.
Sweet

Thanks
Steve

Now all I need is some diesel smoke scented incense and I'll be in hogger heaven.

#35 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 December 2014 - 12:02 AM

Scott,
thank you for your precious suggestions.
However, my point is different: what I would like to achieve is that people have an acceptable lighting effect in OR without needing to tweak the light parameters of all their engines. So I would welcome an OR code change towards this.
This would not prevent people to tweak their parameters, if they like it, to improve and improve further the lighting effects.

#36 User is offline   JohnnyS 

  • Conductor
  • Group: Status: Active Member
  • Posts: 287
  • Joined: 05-May 11
  • Gender:Male
  • Simulator:OR/MSTS
  • Country:

Posted 13 December 2014 - 12:35 AM

View PostCsantucci, on 13 December 2014 - 12:02 AM, said:

Scott,
thank you for your precious suggestions.
However, my point is different: what I would like to achieve is that people have an acceptable lighting effect in OR without needing to tweak the light parameters of all their engines. So I would welcome an OR code change towards this.
This would not prevent people to tweak their parameters, if they like it, to improve and improve further the lighting effects.


Hi, The light needs a little refinement, like Vincent's (BB25187's) treatment of the fog. Looking at your first two screenshots, In my opinion the brightness needs to be toned down a very small amount and the projected light circle needs more diffusion, the transition between lit and unlit areas is too abrupt.

#37 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 13 December 2014 - 03:32 AM

Hi Csantucci,

Oops - sorry - I knew you were one of the developers and I was wondering about your meaning when I was typing my response - but - you're right - I did misunderstand... I've got it now - thanks for all you guys do !
;)

Regards,
Scott

#38 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 December 2014 - 04:24 AM

View PostCsantucci, on 13 December 2014 - 12:02 AM, said:

However, my point is different: what I would like to achieve is that people have an acceptable lighting effect in OR without needing to tweak the light parameters of all their engines. So I would welcome an OR code change towards this.
This would not prevent people to tweak their parameters, if they like it, to improve and improve further the lighting effects.


Please feel free to adjust the brightness in daylight - it's long been "known" as too bright. ;)

I'd suggest doing the opposite of the ambient light adjustment, since that's what affects our perceived brightness, plus I think the headlight is pretty good at night.

#39 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 December 2014 - 04:55 AM

Thank you James,
I'll have a try. If you give me a short hint on where to look at, you spare me some time ;)

#40 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 December 2014 - 05:13 AM

View PostCsantucci, on 13 December 2014 - 04:55 AM, said:

Thank you James,
I'll have a try. If you give me a short hint on where to look at, you spare me some time ;)


_PSApplyHeadlights in SceneryShader.fx is the code - I think basically you just need to adjust 'shading'. 'HeadlightPosition.w' is how the game controls the light brightness for fading it in and out (when you turn the light on/off). You could alter that directly (in SharedMaterialManager.UpdateShaders) or by applying more calculations in the shader code (see how _PSGetAmbientEffect works).

  • 7 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users