it is not a BTB bug, is more likely an anti-aliasing problem or a texture sampling problem.
@Barbje_Keller:
a direct x effect usually specifies a set of parameters for each texture
which defines how a texture is to be handled, these are called sampling parameters, all together forming a sampler".
you'll see them in fx files looking like this:
Code:
sampler2D diffuseMap = sampler_state
{
Texture = (diffuseTexture);
AddressU = WRAP;
AddressV = WRAP;
MinFilter = ANISOTROPIC;
MagFilter = ANISOTROPIC;
MipFilter = ANISOTROPIC;
MIPMAPLODBIAS = -2.0f;
MAXMIPLEVEL = 0;
MAXANISOTROPY = 2.0f;
};
you can find a full description of all the parameters in
direct x documentation but in this case what you should care about is
AddressU and
AddressV; these two parameters are, simply put, controlling what happens at the "edge" of the texture.
in an ideal situation, with a 256x256 texture the UVs in range 0.0-1.0 will cover the texture from pixel 0 to 255 so borders should never be an issue; in real world however, due to mipmaps and due to anti-aliasing the things get literally fuzzy when UVs are reaching the edges, ie. 0.0 and 1.0.
in these cases the hardware has several options on how to read from texture, usually tiled textures are warped as it happens in the effects you are using now for RBR.
WRAP means the texture is repeated at the edge which is fine only when the texture is symmetric , your textures however are not symmetric so tilling the left edge near the right edge will create a mess just like the "lines" in your screen shots.
what you can do is use different sampling and for that you can change the
Code:
AddressU = WRAP;
AddressV = WRAP;
into
Code:
AddressU = Border;
AddressV = Border;
or
Code:
AddressU = Mirror;
AddressV = Mirror;
in your fx files. this solution is simple but involves quite alot of manual editing of material files.
another solution is to offset the UVs so the border would never be reached; in programs like max you can do that by simply dragging the UV verts in the UVMapping editor but you can do something with similar effect in BTB too by scaling and offsetting in material editor.
what you need first is to figure out how big is a "texture pixel"(texel), ie. with a 256x256 you'll get 1/256 = 0.004(approx) so if you want to offset 2 texels, one on each side of the texture, you first need to scale down:
X Scale = (1 - 0.004 - 0.004) = -0.992
to eliminate the borders
and then shift back(negative offset):
X offset = -0.004.
to recenter the UV over texture.
this method basically shrinks the UVs but you'll notice one texel is not enough in most of the cases, you'll probably need at least 4, in which case you also need to alter your textures, ie. make the 3-4 rows at the edge identical.
note. original RBR tracks are using a similar method, the UVs are shrunk by more or less one texel but that fails because the multi-sampling used in anti-aliasing theses days screws that basically forcing the hardware to read and blend regions of texture which were never intended to be accessed, and as a result tiles are "bleeding" over each over at the edge creating the famous lines on road "bug".(original RBR effects are also using POINT sampling instead of LINEAR or ANISOTROPIC filtering which also change things a bit but it also creates the "blocky" and low res. look of ground textures)
ideally, decals should be used for those skid marks you're doing there but decals are also tricky and will create a whole new set of problems and artifacts.