Texture Management in Defold

A lot of people are a bit confused about what the different atlas properties does so here is an explination.


Our atlas without any properties

Margin

Adds a margin to your images by moving them appart from each other.


The bounding boxes of our images are the same size but there is now a small gap between the images.

Inner Padding

Adds a padding inside of your image bounding box, effectively making the sprite bigger.


Notice that the bounding boxes of the sprites are still touching but there is a lot of transparent pixels between the images.

Please not that this changes your sprites sizes. Meaning that if your little dude normally looks like this

With some margin added the sprits gets separated and he suddenly looks like this

Extrude Borders

Samples the pixel that is at the border of the sprite and extrudes it out.


You can clearly see that it is extruding the pixels at the border.

13 Likes