3ds-examples icon indicating copy to clipboard operation
3ds-examples copied to clipboard

No atlas solution found.

Open EimaMei opened this issue 4 years ago • 4 comments

For some reason, when I try to compile my script with a very modified version of the gpusprites example, I get the error. I thought this was because of a file in the sprites.t3s, but it was never consistent when I removed a file from the list. This is the file if it helps:

--atlas -f rgba8888 -z auto
bg.png
1.png
2.png
3.png
4.png
5.png
6.png
7.png
8.png
9.png
10.png
11.png
12.png
13.png
14.png
15.png
16.png
blue.png

EimaMei avatar Oct 02 '21 17:10 EimaMei

tex3ds combines all the input images into a single texture atlas when using atlas mode. However the maximum texture size supported by the 3DS is 1024x1024. That error message usually means that your images can't fit on a single texture. You will have to split some of them up into a seperate t3x file or shrink the images.

oreo639 avatar Oct 02 '21 17:10 oreo639

The atlas mode is also not a perfect algorithm. It uses a heuristic to give a pretty good solution in a reasonable amount of time in a reasonably minimum size. To brute force all possible solutions could take ages. So you could get this error when there could be a valid solution.

Also as @Oreo639 mentions, if the total area of your input images exceeds 1024*1024 (1048576) pixels then there's definitely no possible solution.

mtheall avatar Oct 02 '21 19:10 mtheall

Resizing the images work, but I am now not sure how to make the sprites' size bigger (in-game) so that it wouldn't be that different compared to the og images

EimaMei avatar Oct 07 '21 07:10 EimaMei

You can use this: https://citro2d.devkitpro.org/group__Drawing.html#ga0d9c7ae7e1c8efad28eb188987c3daf7 Or any of the scale functions listed here: https://citro2d.devkitpro.org/group__Sprite.html

Although that would obviously result in lower quality sprites, so I would recommend trying to split some of the sprites into a different spritesheet (as reasonable) if possible.

If I made a mistake feel free to correct me.

oreo639 avatar Oct 07 '21 08:10 oreo639