# Unexplained gap between 2D sprites

**URL:** <https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149>\
**Category:** Asset Creation\
**Tags:** sprites, unreal-engine, question, snapping\
**Created:** [January 15, 2016, 4:06am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149 "2016-01-15T04:06:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 4:06am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/1 "2016-01-15T04:06:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [January 15, 2016, 5:14am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/2 "2016-01-15T05:14:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 5:26am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/3 "2016-01-15T05:26:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 5:37am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/4 "2016-01-15T05:37:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 5:51am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/5 "2016-01-15T05:51:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [January 15, 2016, 6:04am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/6 "2016-01-15T06:04:54Z")

</div>

You might also simply cover that gap with same sprite

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 6:58am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/7 "2016-01-15T06:58:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [January 15, 2016, 3:26pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/8 "2016-01-15T15:26:49Z")

</div>

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.

> **[Paper 2D Sprites](https://docs.unrealengine.com/5.1/en-US/paper-2d-sprites-in-unreal-engine/)**
>
> Description of Sprites in Unreal Engine and how to create them.

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.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/3/ea3d0abf69f9e60c6cd2c144d073c1e1815349e6.jpeg "Paper2D: Creating an Alpha-Based Sprite | 03 | v4.4 Tutorial Series | Unreal Engine") ](https://www.youtube.com/watch?v=xJVjl4HeWb4PLZlv_N0_O1gauJh60307mE_67jqK42twB)

-

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 3:37pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/9 "2016-01-15T15:37:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [January 15, 2016, 3:43pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/10 "2016-01-15T15:43:17Z")

</div>

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.

-

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 3:55pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/11 "2016-01-15T15:55:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 4:13pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/12 "2016-01-15T16:13:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [January 15, 2016, 5:19pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/13 "2016-01-15T17:19:26Z")

</div>

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?

-

---

<div class="post-metadata">

**Author:** ![KhenaB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhenaB](https://forums.unrealengine.com/u/KhenaB)\
**Post date:** [January 15, 2016, 5:28pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/14 "2016-01-15T17:28:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cbedb473](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cbedb473](https://forums.unrealengine.com/u/anonymous_user_cbedb473)\
**Post date:** [February 15, 2016, 1:17am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/15 "2016-02-15T01:17:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [February 17, 2016, 6:46pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/16 "2016-02-17T18:46:15Z")

</div>

Hi Carl -

Can you post a small test project demonstrating this issue?

Thank You

Eric Ketchum

---

<div class="post-metadata">

**Author:** ![Mathias\_Wenzel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mathias_wenzel/32/934891_2.png) [@Mathias\_Wenzel](https://forums.unrealengine.com/u/Mathias_Wenzel)\
**Post date:** [April 10, 2016, 5:52pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/17 "2016-04-10T17:52:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e2d831d6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e2d831d6](https://forums.unrealengine.com/u/anonymous_user_e2d831d6)\
**Post date:** [October 8, 2016, 6:33pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/18 "2016-10-08T18:33:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e2d831d6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e2d831d6](https://forums.unrealengine.com/u/anonymous_user_e2d831d6)\
**Post date:** [October 8, 2016, 7:42pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/19 "2016-10-08T19:42:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e2d831d6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e2d831d6](https://forums.unrealengine.com/u/anonymous_user_e2d831d6)\
**Post date:** [October 8, 2016, 7:51pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/20 "2016-10-08T19:51:36Z")

</div>

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

[Next page](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149.md?page=2)
