Texture Flickering at Junctions

acelejalde

Urban Transit Developers
Is there any way to eliminate the texture flickering that occurs when you create a junction? On mcq's U-BAHN tracks and tunnels, there is no flickering, but on my BART & NYCTA custom tracks, whenever I go to lay a diverging route or junction, the textures flicker together.

Is there any way to eliminate this problem? P.S. If there are any suggestions that involve fixing the mesh, I use Sketchup Pro.

-A :wave:
 
If the tops of the sleepers/ties, ballast, etc., are completely flat, then the reason that you are seeing the flickering is because, since two or more polygons are overlapping (e. g., the tops of the ties), the textures flicker, because the computer can not render two overlapping polygons properly. If the polygons are not parallel, but are overlapping or are too close to each other (e. g., the difference between the polygons' orientations is too small), then the computer will also have trouble rendering them correctly, except at close viewing distances (i. e. they may render correctly up close, but as you zoom out, they start flickering). However, if the angle difference in orientation between the overlapping polygons is sharp enough, then they should not flicker inside an adequate viewing distance.

Below is a diagram (taken from the TRS2006 Content Creators Guide, version 2.0, page 385) of a simple type of track mesh, internal to Trainz, that was common in earlier versions of Trainz, known as "chunky mesh" track, where the ties are part of the texture map for the ballast portions of the mesh, instead of seperate objects:

8d29e500fa9662199fb87b345add6219.jpg


Notice how the ballast slopes up to a peak point between the rails, marked in the diagram as "D+0.05m". That peak is called a "crown" I believe, and its purpose is to keep the ballast polygons from overlapping completely in cases in Trainz where one track mesh overlaps another, such as at diamond crossings and junctions. If the ballast top is completely flat, as opposed to sloped like on a chunky-mesh track with a crown, then at junctions and crossings, the ballast polygons for the seperate tracks will be overlapping completely, causing the textures to flicker. Note that the sharper the angle of the crown, the further the viewing distance can be before the textures start flickering.

Road splines may also have crowns for the same reasons as chunky-mesh track.

Anyway, I assume that your track is a 3-D track, where the ties are seperate parts of the mesh from the ballast. You will probably still want to design the ballast where polygons will not overlap perfectly where track meshes cross, similar to how the crown on a simple track or road spline (e. g., chunky-mesh track) prevents it. The ties might be a bit harder, sicne you will likely want to have flat ties.

One other solution to texture flickering is to use solid-color texture maps on the overlapping polygons. Here, the solid color on one polygon matches almost perfectly to absolutely perfectly with the solid color on the overlapping polygon(s), so the flickering is less noticable to completely invisible. However, with ties on a track, you may want a detailed wood, concrete, etc., texture for the ties, so this solution may not apply to you.

Considering how often it seems that people use flat-tie track in current versions of Trainz, I wonder if the flickering problem has been fixed to some extent in such versions. :confused:

Hope this helps to some extent. :)

Regards.

Images hosted by http://hostthenpost.org/.
 
Excellent explanation. As a real engineer, I always thought the crowning was to properly simulate the water runoff. Nice to see the secondary use as an anti-flicker device. :cool:

Will have to revisit some of my tracks to make sure they all conform. :eek:
 
Excellent explanation. As a real engineer, I always thought the crowning was to properly simulate the water runoff. Nice to see the secondary use as an anti-flicker device. :cool:

Will have to revisit some of my tracks to make sure they all conform. :eek:

Me as well. Thanks Retro again, for the great feedback!

-A :wave:

EDIT: Retro & Martin---do you think the picture below is a significant enough crown to be an anti-flickering device? I found editing my existing mesh not that hard at all. I want to make sure this looks good enough before replacing ALL of my meshes. I color coded and labeled it, because you really couldn't see the lines very well after I took this snapshot in Sketchup Pro.

CrowningTrack.jpg


Thanks!
 
Last edited:
Is the red line the bottom of a cross section or the horizontal extension of the ballast?

Reason I ask is your dimension of 0.25 to the top of the crown. Since the top of rail in Trainz is 0.3, the difference in the diagram between the crown and rail head appears to be more than 0.05.
 
0.3 to top of rail

Not always, some track for eg CHN concrete 01 must be higher, causing wagons and locos to be visible in map view only. Replace with standard height rail and they appear again.
 
@Martin: that is the cross-section. the sides of the ballast, slope downward so *technically* it can be considered the bottom-most portion of the ballast
 
Back
Top