odrick / free-tex-packer

Free texture packer
http://free-tex-packer.com/
MIT License
911 stars 168 forks source link

Automatic atlas dimension #8

Closed rtalon83 closed 5 years ago

rtalon83 commented 5 years ago

Current Behavior

You must set the max dimension in your expected atlas (1024x1024, 2048x1024, etc).

Desired Behaviour

I want to a only atlas without packs. The max dimension of this map will be automatic.

odrick commented 5 years ago

Hello. You can set dimension to the large values (10240x10240 for example) and do not check "Fixed size". Texture size will be selected automatically.

rtalon83 commented 5 years ago

My problem:

For example, I have 50 images where I know that their can fit in 2048x2048. If I set 'fixed size: false' and dimension 4096x4096 the result, more or less, is 1022x3000, sometimes 900x4025, random non-cuadratic values. My question is: Is possible try to tell algoritm that make cuadratic atlas? Do you know?

odrick commented 5 years ago

I understood. We need an appropriate algorithm. Now used MaxRectsBin. Perhaps you know the algorithm that is best for your task? I will try https://www.npmjs.com/package/maxrects-packer in few days for example.

rtalon83 commented 5 years ago

This can be especially useful for WebGL games where the GPU will benefit from spritesheets close to power-of-2 sizes.

Fantastic! I will try to investigate too Thanks!

rtalon83 commented 5 years ago

I'm watching https://github.com/soimy/maxrects-packer and I think that we have a little problem. The option rotate I can't find it.

odrick commented 5 years ago

Yes, it's true. But this is a realy small problem :) Please, check MaxRectsPacker algorithm here: http://free-tex-packer.com/test/ . Set Packer to MaxRectsPacker and try different methods.

rtalon83 commented 5 years ago

Yes!! Thats what I hope happened!! Amazing!!

[v] Packer MaxRectsPacker [v] Non Power 2 [v] Power 2 [v] Method smart, square, smartsquare,

All correct!

odrick commented 5 years ago

Excellent :) I will prepare a new release of the application and console utilities by the end of the day.

rtalon83 commented 5 years ago

Perfect! Is a good feature for your app. Congrat! You can close this issue. Thanks!

odrick commented 5 years ago

v0.5.2 released: https://github.com/odrick/free-tex-packer/releases/tag/v0.5.2