TRS19 PBR Parallax Issue: The Moire Effect

MSGSapper

Trainz route developer
TRS19 is having a problem with track that uses textures that are PBR parallax. This problem is the moire effect. I know this because many users using my <kuid:439337:103196> TRS19 SAP Track U.S. 132LB SG, FB, TP with Spikes, Shiny have reported experiencing it. Here is a screenshot of that track showing the problem:

Moire-Effect-Example-SS-1.jpg


The Moire Effect is often experienced in the video and image world as shown in this video:

YouTube video on why you get moiré and aliasing
https://www.youtube.com/watch?v=h3LJ43sgo84

I have experimented for many hours to try to find out what specifically is causing this problem. Here are the facts I have discovered so far:

1. With the exception of the Shader quality being set to Ultra, none of the other graphic settings in the Content Manager Performance section have any effect on it. If the Shader Quality is set to other then Ultra the problem goes away.

2. If a PBR texture does not make use of parallax the problem does not exist.

3. Shadows have no effect on the Moire effect.

4. It is not just happening with my track but can also be observed on some of the various built-in TRS19 Trk Jarrah versions that come with TRS19. I suspect that this will also apply to other non-ground content items that make use of PBR Parallax in their textures, especially splines.

5. In my case the moire effect, and how bad it is, seems to be tied directly to the ballast bed and how high it is, which leads me to believe that the issue revolves around the usage of PBR parallax in a texture. As a test I turned off parallax, by deleting the height map in the normal texture map for the ballast bed, and the result was that the moire effect completely disappears. Of course this is not an option with my track, which relies on parallax for the 3D ballast effect, and 3D ballast is the whole reason I created this track in the first place. BTW I also noticed that the moire effect does not appear on any of my track which does not have a ballast bed.

I searched the forums using the keyword moire and came up with a number of forum posts dating back to well before my release of my track where other track and content items using PBR parallax textures exhibited this same effect. As an example see this forum post:

https://forums.auran.com/trainz/showthread.php?148593-Shimmering-scenery&p=1732468#post1732468

What was interesting about that post is that the moire effect apparently went away when a TANE procedural track was placed nearby the TRS19 track. Here is the image from that post:

Moire-Effect.jpg


Also according to another post the moire effect was much less apparent in driver then it was in surveyor.

Here is a screenshot of the graphics settings I Use on my TRS19 (1920x1080 144hz no vertical sync) with my EVGA 1080 graphics card:

TRS19-Graphic-Settings-SS-1.jpg


For whatever its worth I did find the following explanation as for why moire appears in PBR, although I am not sure I understand it, nor am absolutely sure it applies here:

"Because mipmap levels are used to store the pre-integrated environment, they can't be used for texture minification, as they ought to. This can causes aliasing or moiré artifacts in high frequency regions or the environment at low roughness and/or distant or small objects. This can also impact performance due to the resulting poor cache access pattern."

The above explanation came from:

https://google.github.io/filament/Filament.html

I would really like to see this issue resolved once and for all for my new TRS19 procedural track users but at this point I think it will most likely need to be resolved by N3V, unless someone can furnish additional technical information on how to resolve it.

Bob
 
Thanks for the update. From my viewpoint, I would be happy with US style track (eg tie plates and spikes) irrespective of the ballast 3D-ness, without the moire.
 
Thanks for the update. From my viewpoint, I would be happy with US style track (eg tie plates and spikes) irrespective of the ballast 3D-ness, without the moire.

I use reskinned versions of Bob's Tane Track.

taned_115.jpg


The difference between the PBR 3d ballast isn't noticeable.

All train-sims have a moire problems with most of their tracks. Bob's Tane track is one that doesn't have moire.

Harold
 
Last edited:
Bob

An excellent analysis and I don’t doubt your conclusions. I was just surprised that the moire effect came from the ballast rather than all the parallel ties (sleepers). Were you also surprised?

Is there any point in making the ties less uniformly parallel to not only break up the moire pattern of the ties themselves, but also so they expose the underlying ballast less uniformly and break up its moire patterns that way?

A further thought. Since the moire effect is most prevalent in the distance, could you fix it by applying non-parallax PBR textures to the low LOD meshes?

Dean

.
 
Last edited:
Dean -
A further thought. Since the moire effect is most prevalent in the distance, could you fix it by applying non-parallax PBR textures to the low LOD meshes?
Excellent proposition! Would likely work.
Moiré fringes/ patterns on procedural track and inside cabs are my Number 1 gripes with both T:ANE and TRS19 in Driver mode. That and the lousy application of LoDs and distorted visibility of most assets at distance...
 
On your touchscreen smartphone, simply long-press the letter you want to accent to see the diacritical mark options.
On my PC, I have manually added the accent to the appropriate letter(s) and saved the word(s) as an auto-entry text substitution.
Can also be achieved via saved-auto-correct spell-check listings.
Most fonts will display the correct character when showing the Symbol options for the character-set. In Microsoft Word, highlight the letter and choose Insert Symbol (for the desired type-face) from the tool ribbon. and paste that into place.
Alternatively - on a one-off basis - look up the word in an online dictionary and copy-paste the correct version into your text string!
 
Hi All
The Moiré effect is simply being caused by conflicting light/dark areas taking up the same pixel space (basically the light and dark pixels alternate, because they're trying to display at the same time).

The TANE track in the above screenshots still shows some moiré, but to a lesser degree as there is less contrast between the sleeper and ballast textures.

I fought with this for years with my VR tracks as we have fairly light bluestone ballast, with fairly dark grey (or light red!) red gum sleepers.

A few of the options I found, explored, or at least thought of, were:

*Reduce LOD before the moire takes effect so that the sleepers become part of the ballast mesh. - This looks bad, as the 3D sleepers become 2D texture way too early.

*Swap the high res ballast texture to a lower res ballast texture, with sleepers textured on, before the moire occurs. The lower mip of this texture 'blurs' the sleepers, resulting in less contrast between the sleepers and the ballast. - This can work well, but adds an extra material fairly early, and doesn't work so well with procedural track in junctions.

*Make the ballast texture, within the range of the sleepers only, darker in lower LODs. This again should help reduce the contrast. OTOH it still means adding an extra material in the LODs.

*Paint the side faces of the sleepers a different colour, so that they are half way between the sleeper top and the ballast. May or may not work, and may or may not look good.

*Make the ballast sit closer to the top of the sleepers. Having laid track, and hand tamped/packed/boxed in track, this isn't too far off reality. By making them closer you reduce the 'gap'/contrast a bit, and help reduce the moiré. Again still depends on how contrasty the sleepers and ballast are.

*Make a lower lod remove the sides (but not ends or top) of the sleepers. This allows for more ballast to be seen, but at the same time causes a 'gap' under the sleeper. If anything, I'd expect this to just offset the moire to further out...

But in the end, it really is an issue caused by contrast, and hard lines, at longer distances, and viewing angle.

This is definitely where the 'art' of content creation comes in, as every track will require a different solution. Or may require tweaking of the texture colours to help them blend better in the distance.

Regards
 
Raised trackbed helps!
That was my track screenshot in the first post, so after that I made a testboard of different track types , the best results were from a track that had a more filled in ballast...

Best track was SAM Trk PS series....

PS, to get a é on a PC, use Alt Gr + the letter you want, áéíóú

Moie%C3%A9.jpg
 
The TANE track in the above screenshots still shows some moiré, but to a lesser degree as there is less contrast between the sleeper and ballast textures.
There is no moire in the Elstoko track from TANE that Bob's track is based either.

ek3a10.jpg


3d PBR track is highly over rated and really for operational purposes unnecessary.

If the game is used for train-simming rather than screenshot simulation PBR track is a waste of resources.

Harold
 
Last edited:
Let me address the various replies with these points:

1. If you use PBR parallax textures in your non-ground textures you will most likely see the Moiré effect in the meshes, especially any that are splines. This issue isn't just about track.

2. The whole point toward my purchasing of TRS19 was the 3D PBR textures that were made possible in that release. That was the major attraction as it adds greatly to the realistic look of track, structures and scenery. PBR also handles shadows very realistically eliminating the need to have to provide them in your content items as we used to have to do. If you are not going to use the PBR 3D textures then what was the point in getting the vastly more expensive TRS19 release?

3. The ties may play a part in this but the 3D ballast seems more the issue based on my test. I think some of the points Zec made are probably valid here on the ballast and perhaps the ties.

4. Creating that 3D textured track was a real nightmare project for me that consumed over two months of my time, and almost seven days a week. Reaching the required balance on the height of the ballast bed, ties, track, etc was extremely difficult to do. A very tiny difference in height of any one of these rendered the whole track unusable in testing. By comparison the SAP ProTrack project was a piece of cake. Is it no wonder that I do not want to make changes to it unless it is absolutely required? Based on the comments and advice here I can live with the Moiré effect if the only alternative is to make major changes to my track just to get rid of it.

5. Those who don't like the 3D textured track don't have to use it. You can use any of the 2D textured procedural track that is out there, including my popular SAP Protrack U.S. 132LB track which was released earlier this year. As for me I really like the 3D PBR Parallax textures on my track. It really makes the ballast look pretty real. The new 3D PBR track also has a much better and more realistic winter snow mode then my SAP ProTrack does. Here is a close up screenshot of my track to show you what I mean:

Track-SS-1.jpg


Now here is screenshot of the same location showing my SAP Protrack:

Track-Example-SS-2.jpg


I believe my 3D texture U.S. track actually comes closest to matching what you see on the game menu screens as shown below;

TRS19-Game-Screen-3.jpg


There is some irony here that what is shown in the game menu screen is not matched by any of the built-in TRS19 track.

While my SAP ProTrack U.S. 132LB Track looks pretty darn good, the ballast does look flat and unrealistic. If you like that better, then by all means use it, or any other 2D textured track of your choice.

All my routes that I intend to upgrade to be fully TRS19 compliant will use my PBR Parallax track, regardless of the Moiré effect. Of course users can change that if they desire to do so for their own use. While I agree that the Moiré effect is distracting, if you are in surveyor mode, it is hardly noticeable when you are actually driving a train at ground level. It is only when you are flying overhead that the Moiré effect becomes a noticeable problem.

Bob
 
Last edited:
ek3a10.jpg


3d PBR track is highly over rated and really for operational purposes unnecessary.

If the game is used for train-simming rather than screenshot simulation PBR track is a waste of resources.

Harold

I agree completely. In addition to the moire effect, the PRB rails and ballast "run away or disappear" a short distance from the viewer. This is totally unrealistic.
 
In regards to the Moiré, do you see this if you lay the ballast spline on it's own (ie as a regular spline, not as part of a procedural track spline).

If not, then this proves that the moiré is being caused as I explained.

As I said, this is something I've battled for many years on my own content, particularly due to the high contrast between sleepers and ballast.

The track shown in Harold's screenshot has sleepers and ballast that are almost, but not quite, the same brightness and colour. This means there is very little contrast between them, and hence is much less likely to cause moiré. Having more diffuse light (ie less sun, and more ambient light) will also change how moiré occurs to some degree, depending on the textures/etc at play.

The fact that the parallax height mapped ballast increases the gap between the top of the sleepers and the top of the ballast will also increase the chance of moiré occurring at some angles. One option might be to change to an alternate ballast material without a height map at a lower LOD, which might help reduce the moiré effect. But that's just a thought.

In regards to components disappearing at a short distance, this entirely comes down to two factors. First is the LOD levels chosen by the track's creator, and second is the 'scenery detail' setting and 'max draw distance' setting in Trainz.

For performance reasons, some creators may bring lower LODs in much earlier than other creators. Tracks are particularly performance intensive, especially in big yards, and as such some track creators may design their track's LOD to make it performance friendly in larger yards.

The 'scenery detail' setting will then also change LOD distances somewhat. At the highest settings, you will be at or very close to the creator's chosen LOD transitions. At any settings below maximum, the LOD transitions will occur earlier. This is how the detail is reduced.

Regards
 
The fact that the parallax height mapped ballast increases the gap between the top of the sleepers and the top of the ballast will also increase the chance of moiré occurring at some angles. One option might be to change to an alternate ballast material without a height map at a lower LOD, which might help reduce the moiré effect. But that's just a thought.
ZecMurphy - Yes; this is what Dinorius_Redundicus surmised in his query in post #4 above...
Reckon that would work, though it would add complexity to the track creator's task and additional meshes/ file sizes.
 
From a 7 month user of TSR19 only..... This "moire" effect really harms the Driving experience for me. So much so, I'm going to learn how to replace track on routes just to to get the "smoothest" rendering rail I can. As far as realism, quality of track and track bed is not an issue for me. There are so many more things that "lessen" the Driving experience before trackage comes into the picture. Trackage just isn't an issue at point. But of course, that is only from my viewpoint here.... and usually my views are pretty off base....
 
MSGSapper said: If you are not going to use the PBR 3D textures then what was the point in getting the vastly more expensive TRS19 release?
There are probably other reasons but why pay 69 USD when you can get a regional version for 39 (or 29 on sale)? I held out - I don't want or need the extra routes. I rarely run most of the built in routes anyhow. I keep hoping they fix the steam locos and I guarantee you it won't be a backwards compatible fix. I test out each new version. After the TANE kickstarter my wallet doesn't open as fast or as much but I try to do my bit no matter how small to help the cause.

Track based on ElStoko's TANE versions (based on Andi Smith's work) can be modified and reskinned with tools I currently use and with predictable results and doesn't have this problem to any great extent. A lot of TANE procedural track is pretty good if lod doesn't jump in and wipe out the illusion. N3V's oak PT has some annoying moire effects in TANE IMO and the Auran 36ng track that I think was based on it is just the same.

hminky said: 3d PBR track is highly over rated and really for operational purposes unnecessary.

If the game is used for train-simming rather than screenshot simulation PBR track is a waste of resources.
I'm in Harold's camp on this one.

Bob Pearson
 
A lot of TANE procedural track is pretty good if lod doesn't jump in and wipe out the illusion. N3V's oak PT has some annoying moire effects in TANE IMO and the Auran 36ng track that I think was based on it is just the same.

Bob Pearson
I adjusted the LOD's on this track by moving the later LOD's down in order. Originally the track disappeared at the second swithstand.

track-lod0
{
mesh-asset <kuid:67375:103112>
mesh "track_lod0.im"
}

track-lod1
{
mesh-asset <kuid:67375:103112>
mesh "track_lod0.im"
}

track-lod2
{
mesh-asset <kuid:67375:103112>
mesh "track_lod0.im"
}

track-lod3
{
mesh-asset <kuid:67375:103112>
mesh "track_lod1.im"
}

taned_096.jpg


Available at:

http://www.banbyggarna.se/stl/scenery/track/page1.html

Notice the lack of moire.

Harold
 
Back
Top