Glow lights disappear when camera is far away

Bug #1313265 reported by Edward Keenan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
Low
Edward Keenan

Bug Description

One issue which may have been around for a while now is with the glow lights/headlights on both the player train and the AI train. Its easier to see this on the player train. When you turn on the headlights and switch to external view, you will notice that all glow lights connected with the headlight process will be on if you are basically right there on top of the train so to speak. As you pan out from the player train, the individual glow lights will basically go out, leaving the visible cone light. The last time I saw this issue was some time ago when work on the distant mountain process was being done and this particular option was chosen. The glow lights did work though otherwise. I will attempt to check the old versions to see when this changed, unless the reason for this issue is already known.

Edward K.

Tags: graphics
Revision history for this message
James Ross (twpol) wrote :

Is the headlight's light cone import here or not? I don't see any reason it should be.

summary: - Headlight Issue.
+ Glow lights disappear when camera is far away
tags: added: graphics
Changed in or:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Edward Keenan (edwardk) wrote :

James,

I brought up the cone light to paint a picture on how odd it looks to have the glow lights/headlights out, but the only visible light being the cone light. Other than that, yes the issue is with the glow lights, not the cone light.

Edward K.

Revision history for this message
Edward Keenan (edwardk) wrote :

If you look at the front of the locomotive close, all glow lights are visible. Slowly back away until all glow lights are out then shift your camera view so that you are now looking straight down at the locomotive. You will notice that the glow light texture is still visible, but only from an angle.

Edward K.

Revision history for this message
Edward Keenan (edwardk) wrote :

I found the fix for this issue. The line below was taken from the Vertex Shaders block in the SceneryShader.fx file and pasted into the same block in the LightGlowShader.fx file and the glow lights are now functioning normally. If there are no issues, I will submit
this fix.

                                                // Apply a small z-bias so that lights are always on top of the shape.
                                        Out.Position.z *= 0.9999;

Edward K.

Revision history for this message
Edward Keenan (edwardk) wrote :

Fix committed.

Edward K.

Revision history for this message
Edward Keenan (edwardk) wrote :

Disregard fix committed. Previous fix had to be reversed due to issues from the fix. Recent tests uncovered issue with view distant setting that is causing the glow light issue. It seems that when view distance is set at 6500, the issue with glow lights exists. Any setting at 6000 and below is fine. This bug report will remain open.

Edward K.

Revision history for this message
Edward Keenan (edwardk) wrote :

I am going to post my final summary of this issue. This issue existed in V1547 and back. This was the last issue that did not have the option to control the view distance. In this version, the default used is 2000 and by changing the default value in the code to 6500 and higher, I was able to reproduce the issue. With this in mind you have 2 options. The first is to leave the view distance at 6000. The issue is not present. The second option is to add the above Z-bias option to LightGlowShader.fx. You can do this only if you are not experiencing any side affects.

Edward K.

Revision history for this message
Edward Keenan (edwardk) wrote :

As of V2327, this problem is now history. The problem was that the render process was using XNASkyProjection which was limited to 6100 instead of Viewer.Camera.XnaProjection which uses ViewingDistance. This explains the problem when ViewingDistance was set above 6000. I also noticed that light cone was also using XNASkyProjection so that was switched over as well. The odd part is that the light cone worked w/o issues. Anyways, fix committed.

Edward K.

Changed in or:
status: Triaged → Fix Committed
James Ross (twpol)
Changed in or:
assignee: nobody → Edward Keenan (edwardk)
milestone: none → 1.0
Revision history for this message
Edward Keenan (edwardk) wrote :

This has been fixed many versions ago.

Edward K.

Changed in or:
status: Fix Committed → Fix Released
Revision history for this message
James Ross (twpol) wrote :

It came after 0.9 so it's not officially been released; when the next stable release comes out we'll bulk-change Fix Committed to Fix Released.

Changed in or:
status: Fix Released → Fix Committed
James Ross (twpol)
Changed in or:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.