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

(Suggestion) Auto-downscale images to the nearest multiple of 16 values #2

Open
DeficientNull opened this issue Dec 2, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@DeficientNull
Copy link

The biggest Issue i have when using this tool is how much time i spend figuring out how to get images (from say textures.com) to end up scaled in multiples of 16, i wish this would just automate this process. essentially if an image is 517x261 it will just downscale it to 512z256 by just cropping out the excess.

i don't mind the potential problem of cropping out too much because that's an easy problem to fix that problably won't happen on most textures

@pwitvoet
Copy link
Owner

There are multiple ways to adjust the size of an image. Basic operations like cropping, padding, scaling, but also more advanced cropping and scaling algorithms that try to preserve the most important parts of an image. All of these have their own benefits and drawbacks: cropping removes potentially important parts of the image, and it breaks tiling. Padding adds possibly unwanted empty space, and it also breaks tiling. Scaling can produce blurry results or introduce other artifacts. In my opinion, which approach works best for any given image is a decision that is best made by a texture artist, not by a tool like WadMaker. So I don't think that adding this is a good idea - certainly not as default behavior.

What you can do however is to use WadMaker's custom converter system to automatically run an image-cropping tool or script for every image. See https://github.com/pwitvoet/wadmaker/blob/master/wadmaker.md#custom-converters for how to configure a custom converter. You could, for example, call a Python script that calculates the new image size, and that uses ImageMagick to crop the image.

@pwitvoet pwitvoet added the enhancement New feature or request label Feb 1, 2024
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

No branches or pull requests

2 participants