PBR Texture issues

gds

TRS-UK
I am finding a lot of distortion issues with the PBR textures, including black gaps in terrain and some very weird stretching that makes the ground look like it is moving. Is this normal?

It even affects the built in Kickstarter route.
 
It has been normal for me. Worse with textures that have pronounced 3-D effect. I've had many issues with terrain height around track and building foundations. Assets appear to be floating sometimes. I like to use unballasted track to look like it's semi-buried in dirt, cinders and so on, where it has been nearly impossible. It can be made to work, but it has been very combative for me.

Good Luck,
smyers
 
Last edited:
Yeah, that happens if the terrain is 45 degrees to 90 degrees (like how it is for bridges for example). Only way to fix it is gradually smoothing it out or just don't use PBR textures for that kind of terrain work :D
 
gds,

You are not the only person to see this, so in a sense it is normal, but it's not good.

From my own exchanges with N3V about unwanted distortions and movement of PBR textures on 3D objects, the answer came back that it was due to "excessive" parallax depth in the texture, which I think is controlled by how dark the texture's normal map alpha channel is. It should be a similar situation for PBR ground textures. I'm not sure how it can be avoided when we are relying on the very same parallax effect to give the texture its 3D depth effect in the first place.

In my case, the so-called answer was to lighten the normal map alpha image to such an extent that the parallax depth effect was almost not there, which was quite self-defeating really.

I can only point to properly designed game engines like in Ghost Recon, Far Cry, Assassin's Creed etc., which have been using PBR ground textures for years without showing these strange issues. So it should be possible to eliminate the problem, but it may be in the hands of N3V, not us as users.

.
 
Last edited:
Hi All
This is an issue that is intrinsic to Parallax Occlusion Mapping or 'POM' (not PBR, which is the method used to light/render objects).

Unfortunately, Parallax Occlusion Mapping does not handle changes to the angle of the surface well, especially on sharper changes (ie above about 30 degrees).

This is an issue faced by any game engine that uses Parallax Occlusion Mapping, not just Trainz. Unfortunately there are no solutions that we have been able to find for this at this time.

If a solution does become available, then this may be looked into (so long as it doesn't cause other worse issues!), however in the mean time it will either require you to work with this or use non parallax textures, or textures with a smaller parallax effect, on areas where the terrain changes angle sharply.

One thing to remember is that parallax height maps push 'down' from the mesh or terrain surface. So any value less than 255,255,255 will push 'in' (this is why making the height map lighter will reduce it's effect, and reduce any imperfections from it). If you only want to apply the height map to a specific portion of a texture, then make the rest of the texture pure white to bring it back out to the 'default' height. This also applies to ground textures; you can set a 'flat' height by making the height map white (or another value; RGB=128,128,128 should make it the same height as non PBR/parallax ground textures, but may introduce some distortion again).

In the case of terrain, to give an ability to have 'height' and 'depth', we actually raise the terrain by half the maximum parallax amount when PBR ground textures are painted onto a route.

Regards
 
Last edited:
One thing to remember is that parallax height maps push 'down' from the mesh or terrain surface. So any value less than 255,255,255 will push 'in' (this is why making the height map lighter will reduce it's effect, and reduce any imperfections from it).
Does the scale setting affect the vertical displacement (as well as the horizontal scaling)?
 
Hi SailorDan
The 'scale' control for ground textures does not appear to affect the maximum depth range of the parallax height map.

I've included a couple of screenshots that show this.

2019-05-06 145122.jpg
2019-05-06 145129.jpg

Regards
 
The 'scale' control for ground textures does not appear to affect the maximum depth range of the parallax height map.
Pity. That would be a handy way to control the ground displacement where necessary, such as immediately under the track. Of course, it would be at the cost of the depth effect, but at least would be under user control. An alternative is two versions of the ground texture - one with PBR and one without, but I suspect that the transition would still be an issue.
 
One thing to remember is that parallax height maps push 'down' from the mesh or terrain surface. So any value less than 255,255,255 will push 'in' (this is why making the height map lighter will reduce it's effect, and reduce any imperfections from it). If you only want to apply the height map to a specific portion of a texture, then make the rest of the texture pure white to bring it back out to the 'default' height. This also applies to ground textures; you can set a 'flat' height by making the height map white (or another value; RGB=128,128,128 should make it the same height as non PBR/parallax ground textures, but may introduce some distortion again).

In the case of terrain, to give an ability to have 'height' and 'depth', we actually raise the terrain by half the maximum parallax amount when PBR ground textures are painted onto a route.

I noticed the above part and as I read it, that means that any 'POM' texture/material - on a mesh, or on the terrain - will always be from surface and down/inward going. In case of the terrain that means Trainz itself as a program raise the grid square half the amount the painted on grid 'POM' texture/material specify.
-> Is that correct understood?

Linda
 
If you only want to apply the height map to a specific portion of a texture, then make the rest of the texture pure white to bring it back out to the 'default' height.

If the terrain is raised by half the maximum parallax amount then the default height would be (128,128,128), not pure white. You suggest this later, but again refer to it as 'white' when it is actually mid grey.
 
If the terrain is raised by half the maximum parallax amount then the default height would be (128,128,128), not pure white. You suggest this later, but again refer to it as 'white' when it is actually mid grey.

You're correct Bob. I can easily understand the confusion though, because normal-alpha channel's effect depends on whether the PBR texture is on a 3D mesh or a groundtexture, as in the blue text of this little summary;

m.pbrmetal


Albedo - RGB - sets the colour of the surface. Alpha not allowed. Opaque only.

Normal - RGB(A)
RGB - defines small surface bumps by normals.
(A) - optional parallax height map.
-Mesh textures: Black=deep, White=surface.
-Ground textures: Black=Deep, Grey128=Surface, White=Raised

Always generate the normal map from the parallax height map to keep them "in sync".


Parameters - RGBA
R=emissive. Black=no emission, White=maximum emission.
G=roughness. Black=smooth reflective, White=rough matte
B=ambient occlusion. Black=shadows occluded, White=no occlusion
A=metallicity. Black=non-metallic, White=metallic
 
Last edited:
I have mentioned this problem before about the visual deformity caused by these textures when used on angled surface edges.
I hope that the Devs find a workable solution, on the flat they are great.

As a result I have researched alternative non-PBR textures and have made a visual guide for those seeking suitable textures to use for now.
The guide is for textures that I use on my routes, there will be more in CM, I will add more as I discover them.

https://forums.auran.com/trainz/sho...ment-Textures-(non-PBR)-Reference-Board-TRS19.
 
I can easily understand the confusion though, because normal-alpha channel's effect depends on whether the PBR texture is on a 3D mesh or a groundtexture, as in the blue text of this little summary;

.. and of course the value is 128, not (128,128,128). I think I will have to examine a series of ground textures to see whether this is actually the way they were created, as it might explain why some seem to have a distorting effect much greater than their observed height displacement would suggest. But since the last update hosed my data base, it might be a while.
 
I've brought up this issue before as well...even made a video showcasing it. N3V isn't concerned in the slightest about fixing it, cause they say it simply can't be done. Unfortunately it's one of the caveats of using these textures that "can't" be remedied.
 
Hi All

To clarify, I was replying both in relation to ground textures and 3D geometry. That said, some further testing from me, in my spare time, has highlighted a couple of things...

In the case of 3D geometry, as in the case of Dinorius_Redundicus' model mentioned a while back, white is the 'default' height.

In the case of ground textures, white is the default height for PBR/parallax ground textures (ie if you make a ground texture without a height map, it will be raised up to the 'white' level.). Technically 128,128,128 is the 'middle' height of the height map, somewhat close to the older legacy materials height. But this is less relevant than we thought before...

After a quick test, I have noted two things...

1) The terrain itself changes when a TRS19 ground texture is applied.

2) The parallax 'distortion' on sharply angled terrain does not occur when the height map is pure white (RGB=255,255,255). It does occur when it is 128,128,128, but to a lesser degree than some full parallax textures.

1 is actually important here... A height map set to 255,255,255 actually blends 'perfectly' (in relation to height differences) with TANE and earlier ground textures. A height map set to 128,128,128 actually sits below the TANE ground texture.

So if you are making a PBR ground texture, and do not want any height mapping, set your height map to pure white. There /is/ a difference between a height mapped texture, and one set to 255,255,255 though. But it is about as bad as mixing two different height mapped textures together IMO.


As to the issues with parallax ground textures, it is not that we aren't concerned about fixing it. More that so far no game devs (including companies with massive budgets, something we are a little more restricted with!) have shown a method of POM that works over a sharp change in geometry. The only work around that gets suggested for other games/engines is to cut the geometry in for those areas (so on the edge of a bridge wall, you cut in the mortar lines to form a 3D divot that then gets blended with the height map); this is something I came across a little earlier today tbh. This simply isn't an issue for ground textures though, as it cannot be done automatically (potentially it could, but with a large performance cost currently), but it might be an option for those making 3D meshes, such as brick walls, or similar.

I will also re-iterate that we need to refer to this correctly.

The distortion is specifically due to the POM (Parallax Occlusion Mapping, also called Parallax Height Maps in Trainz), not PBR itself. It just happens that we introduced POM at the same time as PBR, so they are somewhat together, but you can still make PBR ground textures without specifically making a height map (just make it pure white, to avoid the 'distortion').

PBR itself, which is the rendering method for all materials in TRS19 now (items made for TANE or earlier, or to TANE and earlier specs, will be using legacy material emulation which may not always be perfect), provides some great control over the reflectivity/specularity of the texture, in a way that IMO works far better than previous in most cases.

Regards
 
Selective disabling of the POM effect?

The distortion is specifically due to the POM (Parallax Occlusion Mapping, also called Parallax Height Maps in Trainz), not PBR itself.

Is there a way to programatically provide the option to disable POM on any terrain with an angle of over 30 degrees, or would that be prohibitive performance-wise (or perhaps even defeat the purpose of the POM effect)?
 
While I appreciate your knowledge and experience on the topic, guys, all this stuff is academic to the average user (like me) who just wants to build a simple route without unforeseen obstacles. Is the 3-D effect really worth the trouble? As Zecrail suggested, that PBR is better is subjective. Different yes, but better? It's like saying an SP 4-8-4 is "better" than an NYC 4-8-4. The T:ANE routes being made today by users right here look fantastic in most cases. And there's much less fighting with it to work. All of the height mapping issues explained above may not have been considered when existing PBR textures were created, possibly making them obsolete already. Anyway, just rambling, I don't really know, nor do I want to know the technology behind the app just to watch trains go around the layout.

Best to All,
smyers
 
I like some of the new PBR textures, but don't like some of the side effects mentioned above. So I just set the Shader Quality to "Standard" in settings. This allows me to use these textures, but without the 3D effects which prove to be troublesome in many cases.
 
However, a big selling point of TRS2019 was PBR textures. Now it seems it's a disadvantage. It's very confusing to new route builders (at least to me.) Most all of the texturing tutorials won't work properly unless they were designed for TRS2019.
 
Back
Top