• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Strange Ground Texture Problem

Status
Not open for further replies.
Level 2
Joined
Oct 6, 2016
Messages
4
My tileset has seams even though it seems seamless everywhere else. Can someone tell me how to avoid this?


EQw3uMC.png


c6174bdf-524e-4f7f-8879-8e2cfece5a81

0SVdM3Z.png

gC8Fkx8.jpg


am I missing something?
 
Last edited:
Level 17
Joined
Jan 18, 2010
Messages
1,122
Welcome to Blizzard's lousy texture mapping, the pixel stretching as a result of the texture filtering also probably plays some role.
Basically, the terrain tiles aren't perfectly wrapped to their coordinates so they will not appear seamless no matter how flawless your texture is.

You could try what happens when you create 1 pixel wide edge padding around your texture (stretch pixels out) to give it somewhat of a "buffer", maybe that will look a little better.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
What Talavaj referred to is a general issue of texture atlases, nothing related to Warcraft 3, which is called pixel bleeding, if you want to research it.
The common solution is what Talavaj suggested - padding the boundary with duplicated pixels (with access to code, you could fix this without the need for people to mess with their textures, but we don't have access).

However, as far as I can tell, your tiles aren't correct in the first place. This is pretty obvious, seeing that some wrongly sampled pixels won't make such a big noticeable effect.

I am not sure what the problem is, but it probably has to do with the alpha channel.
 
Last edited:
Level 17
Joined
Jan 18, 2010
Messages
1,122
Bleeding yes, that would be the main culprit.
However, the actual problem is that in apparent attempts to counteract the issue they overcompensated, pulling the wrap in one or two pixels too far which made the result even worse.

Compare how far in the ground tile stretches vs my unwrap (ruined ground cliff doodad)
The default results in a pretty significant cutoff (probably a pixel on each side)


But what is completely baffling.
Is the fact that this shouldn't even be an issue because by ensuring all adjacent tiles on the texture are seamless, you would get virtually no visible pixel bleeding in the first place. (not one visible from the game camera anyway)
But for NO apparent reason, Blizzard didn't do that and they even decided to slap some random texture underneath the main tile file which makes the bleeding worse for no reason since the tile order can be changed at will in the editor.

full
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
That's not how texture sampling works. Imagine if a tile uses the normal variation - the pixels on the boundaries are sampled with the adjacent pixels belonging to other tiles, when the texture is mipmapped.

Regardless, just looking at the image he put with all the shapes in the terrain, you can clearly see that, not only are those actual shapes that exist in the tile itself (not boundaries), but also that the grey varies. So, again, this looks like an alpha issue to me.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
That's not how texture sampling works.
I know how texture sampling works.

I'm simply telling you that the default terrain wrap in the game is just not aligned properly.
I can take the same separate polygons, wrap them separately with overlapping uvws (not the same uvw isle) using the same texture and I will get a much less of an obvious seam as the in-game textures do.
Simply because the wrap is crap, it is about a pixel or two stretched into the tile.
The pixel bleeding itself is less than 20% of the issue with the terrain tile.

Here better comparison:
OP might as well stand on his head, but there will always be this kind of a seam (the right one)

When you overlay those two later pictures on each other you can clearly see the terrain tile is cutting off about 1 pixel from each side of the 64x64 texture tile.

full

full

full
 
Last edited:
Level 17
Joined
Jan 18, 2010
Messages
1,122
I mean, look at this.
It's the same texture, that thing on the right is the terrain tile, that on the left is an unwrap of mine.
Although yes, there is some alpha problem but it shouldn't be causing that stretching or anything.
The bleeding on the left is BARELY visible.

full


EDIT:

Check this sample map here:

1 regular doodad size of one terrain cell, 1 cliff doodad and the terrain tile.
All using the same texture.

There you can actually see that the bleeding is actually no issue at ALL, and that really the only seam problem is with the wrap of the ground tile itself, nothing the OP can do anything about other than try to mitigate the issue by adding padding I suppose.
 

Attachments

  • tiletest.w3x
    247.3 KB · Views: 102
Last edited:
Level 2
Joined
Oct 6, 2016
Messages
4
IDK its a very strange problem. I think the best way to deal with it is the same thing blizzard did with their textures. Just keep everything a very similar color at the seams and it wont popout at you as bad.

Also you can tell it is a problem with blizzards system because every tile has exactly the same seams and you don't see a straight line running down the pictures rendered out from blender.

It is really disappointing to see that texture fail so hard though. I actually grabbed a really nice large stone texture and painted on dirt and grass/moss for some hours. The very bland looking texture I had made earlier ended up looking much better in the end.
 
Last edited:
Level 17
Joined
Jan 18, 2010
Messages
1,122
I think the uvw is scaled inwards so much because they were scared of alpha transparent pixels bleeding through, which would be FAR more obvious than just regular pixels bleeding.
So they overdid it to prevent any possibility of that.

When you use a texture with adjacent transparent tiles like they did and remove the padding, you will get bleeding transparency which would create pretty obvious black lines in default rendering.
If they scaled the uvw in by a specific value equal to about one/two pixels, adding that much padding should minimize the problem though.
I never really bothered to make tiles, so I don't know how that would look like.
I know most if not all tiles have that problem because most people probably don't think about it.
 
Last edited:
Status
Not open for further replies.
Top