jlee

Hello,

We're upgrading our animations from spine 3.6 to 4.0, and I noticed the atlas packer gives us slightly different results when using the "rectangles" method. Most of the time, it's negligible (images in different positions or different rotations), but in one case the packer generates 3 2048x2048 pages instead of 2.

It seems this behavior changed between 3.7 and 3.8, when the "polygons" packing method was introduced.

In spine 3.6, we pack using the "atlas" packing method. If we use the "polygons" method in 4.0, it fits all our images in 2 2048x2048 pages just as previous versions did.

Is the "polygons" methods equivalent to the "atlas" method in 3.7/3.6 with non-meshed images, and is it safe to use (i.e. will they overlap in the atlas)?

It seems like the images don't overlap (I haven't tried any spine files with polygon hulls yet), but I'd just like some more information about the different packing methods, and how to get results as close as possible to spine 3.6.

Thanks in advance!
jlee
  • Mesajlar: 17

Nate

I'm not sure why the 3.6 packer would pack more efficiently than the rectangles packing in 4.0. It should be roughly the same packing algorithm, but it's possible a small change affected packing efficiency. It could also be that we fixed a bug in later versions or your settings are slightly different. For example, alpha threshold.
jlee yazdı:Is the "polygons" methods equivalent to the "atlas" method in 3.7/3.6 with non-meshed images, and is it safe to use (i.e. will they overlap in the atlas)?
The rectangles packing is equivalent to atlas packing in older versions. The ploygon packing makes a valid atlas for region and/or mesh attachments. The atlas regions won't overlap. It can take longer to do the packing but may pack more tightly. If you run Spine with --pack-exhaustively it may pack even more tightly, but may take a very long time to finish.
Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 11349

jlee

Hi Nate,

Thanks for the quick response. I saw in another thread that --pack-exhaustively won't work with power-of-2 atlases, which are a requirement for us. It looks like using the polygons method will work for us, though.

Just out of curiosity, what would be the reason to use rectangles over polygons?

Thanks!
jlee
  • Mesajlar: 17

Nate

Rectangles packs faster, otherwise packing polygons is likely better.
Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 11349

jlee

Good to know, thanks!
jlee
  • Mesajlar: 17


Dön Editor