How to create atlas for flipbook animation

Hi,
On googling I found assets in the form of single image, example:

this image is 768 x 128 with 6 different images.
Do I need to crop and save it as 6 images after renaming them with numbers and then create atlas.
or is there another way or tool ?

Also, please suggest good websites or point me in right direction to collect the assets .
Thanks

It might be easier to use the graphic as it and create a tilesource with tiles 128x128.

3 Likes

thanks,
i have one more query,
does number of tile source or atlas have significance on game performance,
how many atlas or tilesource should be in a game , like one huge atlas/tilesource for the whole game, or does it depends on screen, so like group all images which are going to be displayed at the same time in one and others in others

or any best resource to have best practices
Thanks

In general it is a good practice to put images in the same atlas if are drawn at the same time. This is done to reduce draw calls. But the size of the atlas should also be considered. If the atlas is too large it might not fit into GPU memory and the game will not run on low memory devices. There’s some info about this here: Optimizing a Defold game

2 Likes

Note that we recently added support for multipage atlases, so one can keep the upper size of the atlas at something like 2048, and instead use multiple pages (it is automatically handled by the engine)

6 Likes

I created separate atlases because I wanted to keep my flipbook animations more organized. If this is inefficient then the question is can we combine separate atlases into one or do we have to rebuild the single atlas?

You have to rebuild it.

Thanks for responding. It turns out that we can cut and paste Animation Groups from one atlas to another! I probably could have cut them all at once but I did three at a a time. All the properties for each group came over precisely. It wasn’t as a bad as I was dreading. The editor worked really smoothly and it took me almost no time at all. The only thing I had to edit were the Image Properties for each affected sprite in my GO’s. Very happy, thanks. :defold:

2 Likes