How to best use Sprite Atlases in Godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By avencherus
:warning: Old Version Published before Godot 3 was released.

I was wondering if anyone might have some insight into how Godot handles situations where there are many sprites made of small pieces.

I don’t know enough about game engine architecture to really probe the source code very deep. So I’m in the dark about what kind of optimizations Godot does when you export a project. Does it run some texture packing algorithms at the end? That’s the root of my question really.

I would like to pack all my small sprites into a texture atlas, but it seems the only way to make use of this is to use a textured polygon. It’s rather tedious to set them up once imported. I’m also not really clear on how to test the performance to compare whatever polygon overhead their might be against just having lots of little separate textures.

Is it even a meaningful optimization?

Perhaps, is there a better approach for using texture atlases?

:bust_in_silhouette: Reply From: Zylann

If you are looking for automatic atlasing, ImageGroups may be what you are looking for: http://docs.godotengine.org/en/latest/tutorials/asset_pipeline/exporting_images.html#image-group-export-options
I assume this works whatever nodes you used to display the images (Sprite, Polygon…)

Thanks for the response.

I’ve seen this, but I’m working with .tex files, because I would like to use Godot’s mipmapping option.

If not, then when making my own, I’m unclear about what will perform the best for rendering. Sprites with sub-regions, or polygons with textures? And are their painless ways of using these things? It seems like a lot of manual entry.

avencherus | 2016-10-02 14:27