# 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:** 10\
**Page:** 2

<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, 8:29pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/21 "2016-10-08T20:29:37Z")

</div>

sorry for triple posting, but I actually found the solution. When right clicking on a Tileset (not Tilemap) an option called “Condition Tile Sheet Texture” appears, which apparently creates some sort of buffer around tiles, which completely eliminates the problem! 🙂 Hope this helps someone in the future.

---

<div class="post-metadata">

**Author:** ![aleksvander](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aleksvander](https://forums.unrealengine.com/u/aleksvander)\
**Post date:** [March 31, 2017, 5:07am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/22 "2017-03-31T05:07:46Z")

</div>

version 4.15

The problem still exists

Does anyone have any ideas? In motion the same problems…

- If use AA, problems are solved in  
part.
- If use Condition Tile Sheet  
Texture, this is resolved exist  
problem. But this is not convenient  
for debugging, you lose the ability  
to re-export the texture.

 ![132281-test0.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/6/576c2fc749fb63d58f76dcf3c57f815d6af16aa9.png)

Help pls ☹

---

<div class="post-metadata">

**Author:** ![aleksvander](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aleksvander](https://forums.unrealengine.com/u/aleksvander)\
**Post date:** [March 31, 2017, 6:09am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/23 "2017-03-31T06:09:38Z")

</div>

I think, I found a solution, you just need to manually add indentation in the source texture (2px/2px + 2px/2px padding).  
See this - [Unreal Engine 4: TileSets and TileMaps! - Saucy.se](http://saucy.se/blog/gamedev/curse-of-undeath/unreal-engine-4-tilesets-and-tilemaps/) part **TileMap tearing**.  
In this case, you can save the ability to re-export the textures

---

<div class="post-metadata">

**Author:** ![aleksvander](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aleksvander](https://forums.unrealengine.com/u/aleksvander)\
**Post date:** [March 31, 2017, 9:07am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/24 "2017-03-31T09:07:25Z")

</div>

for example:  
and that is WORK!!! for if you don’t have use tile map… or for fast re-export…  
36x36 = source dimension, and rendering size 32x32(padding = 4) and other settings…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcd0d281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcd0d281](https://forums.unrealengine.com/u/anonymous_user_bcd0d281)\
**Post date:** [May 2, 2017, 2:25am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/25 "2017-05-02T02:25:12Z")

</div>

The tile flickering issue has two solutions.

If you can re-author the spritesheet you’re using for the Tile Map, add a pixel extrusion (meaning, add a single extra pixel along the edges of the sprite, so that the sprite has 1 extra pixel repeated along the entire edge). Adding the extra pixel covers up the tearing in between tiles.

If you can’t re-author the spritesheet (i.e., you’ve already made a great level and can’t change where sprites are located on the sheet). Then you can Condition the Tile Map’s spritesheet by right-clicking on the Tile Set for the Tile Map and selecting “Condition Tile Sheet Texture”, which makes a new Texture using the original spritesheet, but adding the extruded pixels for you. (Source for this fix: [http://saucy.se/blog/gamedev/curse-of-undeath/unreal-engine-4-tilesets-and-tilemaps/](http://saucy.se/blog/gamedev/curse-of-undeath/unreal-engine-4-tilesets-and-tilemaps/) Thanks to [aleksvander for posting the link in this thread).

After using the Condition Tile Sheet Texture method, my game didn’t have any tearing while running in the Editor or after running packaged on Android.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_07c44e081](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_07c44e081](https://forums.unrealengine.com/u/anonymous_user_07c44e081)\
**Post date:** [August 6, 2017, 5:17pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/26 "2017-08-06T17:17:27Z")

</div>

Confirmed that adding an extra 1 pixel border around each of the sprites in question resolves the issue. I had attempted a bunch of camera things but flickering was still occurring. I am not using a tilemap but am manually constructing terrain pieces from sprites.

---

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [April 24, 2019, 10:09am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/27 "2019-04-24T10:09:52Z")

</div>

In 4.22 this issue has once again returned, however this time showing up on sprite sheets that HAVE the pixel padding.

---

<div class="post-metadata">

**Author:** ![aleksvander](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aleksvander](https://forums.unrealengine.com/u/aleksvander)\
**Post date:** [April 25, 2019, 8:01am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/28 "2019-04-25T08:01:33Z")

</div>

In 4.21 did not observe this problem. But in 4.21 bad speed loading new sprite tiles at the edges of the camera.

---

<div class="post-metadata">

**Author:** ![mahlukat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mahlukat](https://forums.unrealengine.com/u/mahlukat)\
**Post date:** [September 16, 2020, 1:15pm UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/29 "2020-09-16T13:15:54Z")

</div>

If anyone still challenging with this problem; just add edges in photoshop around the sprites, and the problem will gone… Sprite bound should remain same in the engine, but just add for example 2 pixel stroke in photoshop, than overwrite the file…

---

<div class="post-metadata">

**Author:** ![jcksnvllxr80](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jcksnvllxr80](https://forums.unrealengine.com/u/jcksnvllxr80)\
**Post date:** [December 14, 2023, 4:47am UTC](https://forums.unrealengine.com/t/unexplained-gap-between-2d-sprites/344149/30 "2023-12-14T04:47:59Z")

</div>

helped me a lot! thanks.

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