Strange line on the road

Hy, I have strange effect with my texture on the road. Lines - between different textures... :frown:
pr12.gif

pr11.gif

pr1.gif


In BTB, this don't seen. :mad: I try everything but not have result without it
pr15b.jpg

pr14.jpg

I'm sure that don't leave any line on textures pictures, this is effect from BTB... Any body can help me!?!
 
There will be very slight transparency on the outer edge of your texture.
What your best off doing is
1. create a new layer (in your dds file)
2. fill it with the most common colour (a sandy colour)
3. put that layer underneath your track texture
4. merge the 2 layer
5. put it back into BTB and see the difference

I had the same thing.
 
It might mean - check the textures again in Photoshop (or anything you use) - if there are any thin transparent areas/lines. So, convert from dds back to psd or check your original pictures?
I know that when I crop pictures which are on single layers (and the whole picture is not flatten), Photoshop leaves a single pixel line of transparency at the borders. Look there - at the borders.
 
  • jharro

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.
 
Oh, yes, I remember - I was producing some landscape texture for the wall - with transparency at the top - after export I had thin dark line there... So, I did some small offset and it solved the problem. Some thin lines like these can be seen also when using SObjects from GB XPack (trees/forests).
 
It might mean - check the textures again in Photoshop (or anything you use) - if there are any thin transparent areas/lines. So, convert from dds back to psd or check your original pictures?
I know that when I crop pictures which are on single layers (and the whole picture is not flatten), Photoshop leaves a single pixel line of transparency at the borders. Look there - at the borders.

You are not right. If witness the more closely. See that line is not empty. Without any transparency. They repeat the opposite edge of the texture - about 1px
 
It happens when you resize a layer in ps or gimp or what ever graphics program you use.
I just duplicate the layer, then merge, duplicate again and merge, etc. Just repeat the process till the transparent edge is gone.
 
I have the same thing with croping to new (smaller) size - if there is e.g. a background layer with solid color and transparent tree layer over it, when I crop from huge photo to say 512x125, the background layer has transparent edges (Photoshop).
More - I used to work with DDS Converter 2 to make .dds's - if there are both an alpha channel and transparent edges on the bgr solid layer, DDS Converter even does not allow to convert. I think similar thing says the DDS plugin in Photoshop (to many channels).
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 260 15.4%
  • < 2 years

    Votes: 170 10.1%
  • < 3 years

    Votes: 168 10.0%
  • < 4 years

    Votes: 125 7.4%
  • < 5 years

    Votes: 231 13.7%
  • < 10 years

    Votes: 200 11.9%
  • < 15 years

    Votes: 125 7.4%
  • < 20 years

    Votes: 98 5.8%
  • < 25 years

    Votes: 77 4.6%
  • Ok, I am a dinosaur

    Votes: 230 13.7%
Back
Top