Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Z3 powered packer as an alternative to BinPacker #53

Open
wants to merge 1 commit into
base: dev-build
Choose a base branch
from

Conversation

1lann
Copy link

@1lann 1lann commented Aug 30, 2022

I was trying to pack some 3x 2048x2048 and it unfortunately always produced an atlas that was 4096x8192. I kinda got angry about that, debugged it, and discovered one of the UVs were going slightly beyond the bounds to make one of the textures calculated as 2048x2063 or something. It was still possible to pack it, it's just that the BinPacker heuristic would get unlucky with the ordering and would result in a suboptimal atlas size. So I decided I would improve the way packing works, and I recently learned about Z3, so I used it here to develop a better packing algorithm. I've tried it out and it works great and no longer generates unnecessarily large atlases for me. I think it shines most in "Quadratic" (and "Automatic" which is the same) mode. Here's a PR for it, try it out and let me know what you think.

This change makes the Z3 powered packer the default, with a checkbox you can uncheck to use the old BinPacker.

This change also fixes some minor annoyances to me, like the weirdly large numerical input boxes, and missing dels in unregister (although I've never written a Blender plugin before so I have no idea what I'm doing).

@Grim-es Grim-es changed the base branch from master to dev-build September 4, 2022 07:34
@Grim-es Grim-es added the enhancement New feature or request label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants