Unexplained gap between 2D sprites

Hey,

I made a bunch of sprites then placed them in the world, they are all sitting at 0 on Y, and placed perfectly next to each other snapped to the grid, yet in perspective mode whenever i move i get some flickering white lines between the tiles, i have tried a translucent and masked material with no difference

Here is an example, some help would be appreciated

Well that’s not good news, any ways around that or should i consider changing to another game engine?

I just tested orthographic and the problem is there also, for some reason this is something that i did not notice while prototyping and coding the core mechanics for a whole month, i really hope i find a solution, i had big plans

Problem seems to not be in sprites but vertex data mismatch (since it’s still 3D for GPU), in specific views gap in vertex locations is too big and GPU renders rendering pixel size gap sometimes. This is probably something that need to be fixed in engine code if it’s even fixable, since it might be GPU bug/issue too.

Btw i like how sprites and background looks like ;3

I can’t seem to be able to replicate the issue in a new project with the same assets, i’ll have to make a copy of my project and start deleting everything until i find the cause

You might also simply cover that gap with same sprite

Wouldn’t that cause some “Z-fighting” if i push the sprites into each others? Also i draw my sprites so that they fit together perfectly, offsetting them by 1 pixel would break that seamless transition, unless i gave them a black “padding”, is this what you suggest?

I really wish i didn’t have to deal with this, i have so much work to do and this isn’t helping

Unfortunately the source regions is not overlapping, it is tightly packed around each sprites, also in my bug report that you closed flagging it as a duplicate, i demonstrate how the artifacts happen on the edge of the sprites that have no neighboring sprites

Also i do not want to piece together my level in photoshop, having the flexibility of changing things on the fly is how i want to design my level

By the way i’m using individual sprites placed in the editor in the “Face” view, not a spritesheet/tileset

Thanks

Hello KhenaB,

This could be the source region of your sprites overlapping. If you have the source region from one sprite, assuming you are using a sprite sheet, overlapping into the region of another artifacts like this can occur. This is also true for your render geometry on your sprites.

If you have a large sprite that you know will not change you may consider creating a larger sprite that is one piece. This way you wouldn’t have to piece this asset together. This would eliminate the possibility of overlapping or Z-fighting. I am linking you to our documentation on how to adjust the source region and render geometry on your sprites.

Additionally, this movie walks you through how to set up alpha based sprites and give s visual demonstration of changing the source region and render geometry.

Thanks for the clarification on both the other post as well as your intent for the project.

I will attempt to recreate this issue on my computer and determine if this is a bug.

The issue is easy to replicate with a simple black square sprite, place two sprites next to each other snapped with a precision of 1, it is easier to do this with the arrows of the keyboard in the “face” view, then set one to 0.0 on Y and the other to 1, this will make the issue worse just for demonstration purpose, now go in perspective view without rotating the camera, and move it sideways with the middle mouse button

Now you can align them both to 0.0 on Y and this artifact can be seen from time to time, sometime i’m not seeing it for a while, then it comes back, making it harder to solve

Here’s another example, a two frame gif that shows what happens to the yellow selection outline when the artifact appears, this is by moving the camera a tiny bit to the left, i’m also noticing a weird change in my sprites as i move the camera, they seem to stretch, notice how some of the pixels changes

Even at their original scale of 1 the issue is happening, however i was rotating the sprites 180 degrees on Z to “mirror” them and using a double sided material, instead, making a proper L and R version of the sprite in photoshop and using those seems to work, although this might just be luck, i’ll report back if it starts happening again

Scaling could be the issue here. If they are non uniform then the border could be falling somewhere between the draw.

Does changing the scale back down to 1 fix this?

I’m getting this issue using tile maps when moving around my level and I’m only rotating my character sprite by 180 when moving left and right but this is happening when jumping etc.

Hi Carl -

Can you post a small test project demonstrating this issue?

Thank You

Eric Ketchum

Hm, it seems to be fixed if you use sprites and put them into the scene manually. However, i really like this paper 2D painting system. From what i can guess is, that Paper 2D Tile Map is not so tight together as it seems to be. Might be that there are microgaps. It seems like it can´t resolve the wireframe material and this is the gap that is visible. It would make sense too, since this wireframe is only a pixel thin and its only one pixel that glitches from time to time.

I have this issue as well. It shows up, as soon as I disable anti aliasing. Since my game is a pixel art game, i’d really like to not be forced to use AA.

I made a short video to showcase the problem:

AA is off, graphics set to epic Tileset is located at 0,0,0 rotated for 90 degrees in X The tilemap itself has only 1 layer and has a custom litsprite material, which consists of base color and normal map, default lit. The Tilemap also has 1 pixel per unreal unit. Camera is a simple perspective 90 FOV pointing straight down (I would love to use an ortographic camera, but this is sadly also not usable, because of this bug: https://issues.unrealengine.com/issue/UE-11446)

I really hope, that Paper2D could get some love in the future, or I’ll maybe be forced to switch to Unity.

When switching the projection mode of the tilemap to something other than orthogonal, the issue disappears btw.