Code Monkey home page Code Monkey logo

Comments (10)

odrick avatar odrick commented on June 14, 2024 2

Ok. OptimalPacker now check all combos with/without rotation.

from free-tex-packer-core.

odrick avatar odrick commented on June 14, 2024

I don't think so...

Could you please give me you test assets and pack options?

from free-tex-packer-core.

kane-mason avatar kane-mason commented on June 14, 2024

I'm also seeing this, not always but often. Using MaxRectsPacker and Smart method. Can supply assets if needed privately

from free-tex-packer-core.

JoHuang avatar JoHuang commented on June 14, 2024

@odrick Sorry I can't supply assets because it's private assets, and currently have no time to give a minimal test case.

from free-tex-packer-core.

kane-mason avatar kane-mason commented on June 14, 2024

Here is one example of the gitlab diff for such a case:

image

Tagging @qtiki to see if he may be able to shed any light.

from free-tex-packer-core.

kane-mason avatar kane-mason commented on June 14, 2024

i've emailed source assets

from free-tex-packer-core.

odrick avatar odrick commented on June 14, 2024

Thanks. I will investigate this problem next week.

from free-tex-packer-core.

kane-mason avatar kane-mason commented on June 14, 2024

Any update here?

from free-tex-packer-core.

odrick avatar odrick commented on June 14, 2024

Ok, this is a maxrects-packer bug. Reported: soimy/maxrects-packer#14

from free-tex-packer-core.

qtiki avatar qtiki commented on June 14, 2024

Sorry guys for the radio silence, I've been quite busy with other stuff.

I don't think this is a bug as such. The way that these packing algorithms work is that they sort the bins based on some arbitrary rules and then try to guess the best fit locally (first-fit) to any given area. The problem is that while the guess might be a good thing locally it might cause problems later on in the packing. If the algorithm were to try all the possible combinations to find the "perfect" match it would become exponentially slower. If you're interested in more details I recommend reading the Wikipedia page Bin packing problem.

In regards to the free-tex-packer I think the best option would be to extend the OptimalPacker to try all the packing methods with and without rotation allowed (for those that support rotation that is). That would make the packing a bit slower again but will at least give the same results as manually trying to tweak every parameter. In the end the more variations we test the better the result will be, however trying to reach a "perfect" outcome is not really feasible. This is basically why I implemented the OptimalPacker that tries all the combinations instead of trying to make an exact method that solves this problem perfectly for all cases.

from free-tex-packer-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.