# Padded textures are displayed incorrectly and export sprites wrong

**URL:** <https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685>\
**Category:** Asset Creation\
**Tags:** sprites, export, unreal-engine, question\
**Created:** [October 8, 2015, 6:28pm UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685 "2015-10-08T18:28:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![grisevg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grisevg](https://forums.unrealengine.com/u/grisevg)\
**Post date:** [October 8, 2015, 6:28pm UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/1 "2015-10-08T18:28:34Z")

</div>

If you take a rectangle texture that is not in a power of two and enable padding in texture settings and then make a sprite with it, the image will be distorted. If you then export sprites out of it using automatic detection, it will export them wrong.

Example texture:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/5/9a514522282209c2e2808bd0874dde1567889587.png) ](https://i.imgur.com/Kc0oa4k.png)

Texture when padded:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/b/aabba03ce72244ac5ceba11e36bbeaddf7aed733.png) ](https://i.imgur.com/L1Gm3yD.png)

Sprite using the texture (if you look closely you can see it’s distorted by scaling down vertically a bit):

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/7/647000165ab3b7b362348cddf66a3d0b347873c6.png) ](https://i.imgur.com/6RNmRFK.png)

Preview of automated sprite export (looks correct):

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/2/4d22162a4f72b9f5bf20c7b610d374432d4a3273.png) ](https://i.imgur.com/RQU078i.png)

Actual exported sprites:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/1/7c13f1f61734823e6d42551e9551502fadd66c01.png) ](https://i.imgur.com/cpCGQF0.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [October 10, 2015, 10:12pm UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/2 "2015-10-10T22:12:10Z")

</div>

Hey grisevg,

I do believe the Extract Sprites option is meant for default power of two texture sizes, as you can see, it needs to find the center of each sprite. It cannot do this even if the texture is padded to the power of two as the canvas of the texture is now a square, but it did not keep the sprites in their relative locations.

I found some helpful information on this topic by the paper 2D developer, and he has a couple of suggestions when working with non power of two textures.

**[Paper 2D] Learning the Ropes**

> **[\[Paper2D\] Learning the Ropes](https://forums.unrealengine.com/showthread.php?63752-Paper2D-Learning-the-Ropes)**
>
> Hey guys! Trying to learn the Paper 2D tools to make a side scroller. I followed the Introduction video series to the tools (found here. I recommend watching it). But it didn’t go in-depth as such on the different tools. I wanted to try and use a...

He explains how to work around using the extract sprites option when dealing with padded and non power of two textures. Let me know if you have questions.

Thank you,

---

<div class="post-metadata">

**Author:** ![grisevg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grisevg](https://forums.unrealengine.com/u/grisevg)\
**Post date:** [October 10, 2015, 11:02pm UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/3 "2015-10-10T23:02:43Z")

</div>

Hey Andrew,

I do believe it’s a bug related to the fact the Sprites and “Extract Sprites” feature use wrong dimensions of a texture if it’s padded.  
“Extract Sprites” feature works perfectly fine if you don’t pad textures, even if they are not in a power of two.  
If there’s a technical limitation to extracting sprites out of padded textures, the editor should not let you do it.

I’m perfectly fine with using external tools to pad textures myself, just thought I should report the bug.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [October 12, 2015, 3:29pm UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/4 "2015-10-12T15:29:14Z")

</div>

Hey grisevg,

I have gone ahead and entered a bug for this issue, as I would also expect the padded to power of two textures to have their sprites extracted correctly. For reference and tracking purposes the bug entered.

**[UE-21997](https://issues.unrealengine.com/issue/UE-21997)**

Thank you for taking the time to report this issue, and let me know if you have further questions or comments.

Thanks,

---

<div class="post-metadata">

**Author:** ![grisevg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grisevg](https://forums.unrealengine.com/u/grisevg)\
**Post date:** [October 12, 2015, 4:07pm UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/5 "2015-10-12T16:07:55Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![scyfris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@scyfris](https://forums.unrealengine.com/u/scyfris)\
**Post date:** [April 22, 2017, 8:59am UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/6 "2017-04-22T08:59:12Z")

</div>

Still a problem with UE 4.15!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [April 26, 2017, 5:27pm UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/7 "2017-04-26T17:27:07Z")

</div>

Please see the updated link to the bug report that was entered for this issue in my answer.

---

<div class="post-metadata">

**Author:** ![Michela.Ledwidge](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/michela.ledwidge/32/738192_2.png) [@Michela.Ledwidge](https://forums.unrealengine.com/u/Michela.Ledwidge)\
**Post date:** [February 28, 2020, 5:45am UTC](https://forums.unrealengine.com/t/padded-textures-are-displayed-incorrectly-and-export-sprites-wrong/334685/8 "2020-02-28T05:45:08Z")

</div>

Still an issue in 4.24.3. Workaround is create the padded texture externally. I’m using Houdini’s PDG system to automate this as best I can.
