Tracks "ghost" image above treewall

I recently uploaded my new track: Bryar Motorsport Park

Some have noticed (including myself) a faint "ghost" line above the tree tops on the tree wall in-game. The first image shows the treewall in KS editor, and these ghost lines are clearly visible.

One obvious candidate for root-cause would be the top of UV islands extending just above the top of the image texture, and thus those islands picking-up the bottom of the image texture.

The first picture shows the UV map for one section of tree wall; the islands (as an example) where a faint "ghost" can be seen in-game, and where one could expect the island to be mis-aligned with the image texture are towards the right, far way from the image texture (which is at 2D cursor).
But those islands are not mis-aligned with the image texture, as shown in the second image, where I've moved one of those islands (at the right) towards the left (i.e. towards the image texture), and you can see the island is fully-aligned with the image texture. Based on this I should not be having this issue, and yet I am.:(
Any thoughts or ideas?

treeline_KSE.png

UV treeline 2.png


UV treeline.png


For reference:
[MATERIAL_0]
NAME=treeLine_dds
SHADER=ksGrass
ALPHATEST=1
VAR_0_NAME=ksAmbient
VAR_0_FLOAT1=0.31
VAR_1_NAME=ksDiffuse
VAR_1_FLOAT1=0.33

[model_FBX: bryar_treewall_perimeter_new.fbx_Bryar_treewall_1_Bryar_treewall_1]
ACTIVE=1
PRIORITY=0
VISIBLE=1
TRANSPARENT=0
CAST_SHADOWS=1
RENDERABLE=1
 
Last edited:
I had this same issue with camera_facing spectators. If you leave a 4 pixel gap at the top you'd think that would be sufficient to prevent the ghost lines, but I think the issue is with the number of mipmaps you save in your .dds

If you leave a 4 pixel gap at the top of a 1024 high texture, that becomes 2 pixels in the first mipmap, 1 pixel in the 2nd (which is down to 256 by now). Any subsequent mipmaps don't leave enough blank pixels, in theory.

I might be wrong, but this is the way I see it.
 
I had this same issue with camera_facing spectators. If you leave a 4 pixel gap at the top you'd think that would be sufficient to prevent the ghost lines, but I think the issue is with the number of mipmaps you save in your .dds

If you leave a 4 pixel gap at the top of a 1024 high texture, that becomes 2 pixels in the first mipmap, 1 pixel in the 2nd (which is down to 256 by now). Any subsequent mipmaps don't leave enough blank pixels, in theory.

I might be wrong, but this is the way I see it.
Thanks for the insight.
I think you identified the issue. I increased the gap at top and it appears to be mitigate the issue.
 
Last edited:
Thanks for the insight.
I think you identified the issue. I increased the gap at top and it appears to be mitigate the issue.
Another thing that weirdly works without remapping the texture is adding a few lines of alpha channel at the BOTTOM of the DDS.
If the tree line DDS is very wide you'll need to add quite a few lines.
No idea why it works, it just does.
 
Just pull the UV down as close to the tree tops as you can. You would also benefit from varying the scale on X and location on X to randomize the tree walls a bit more.
 
Just pull the UV down as close to the tree tops as you can. You would also benefit from varying the scale on X and location on X to randomize the tree walls a bit more.
Thanks LilSki - for the record, couldn’t have done this w/o your tracks as tutorials
Can you elaborate what you mean by; “varying the scale on X and location on X to randomize the tree walls”. I don’t understand how I would implement this advice.
 
Thanks LilSki - for the record, couldn’t have done this w/o your tracks as tutorials
Can you elaborate what you mean by; “varying the scale on X and location on X to randomize the tree walls”. I don’t understand how I would implement this advice.
When you have a bunch of tree walls with the same texture you need to randomize the UV a bit.

Here is bad example

1650642477439.png


Then all you have to do is select each row and move and scale the UV on the X axis a bit and you get something like this.

1650642534871.png


Within the UV editor you have X and Y axis. Y being vertical in your case and X being horizontal. So just select all the UV points in the UV editor and scale them a bit on X and also move them around on X to randomize each row a bit to avoid the pattern.
 
Back
Top