Closed MisterQuiggly closed 6 years ago
This can also be done with a small GIMP or PS script.
I use Gimp to do all my textures. That screenshot is Gimp. I use what it calls "guides" (as shown above) which puts all the blue lines around it, then a feature called guillotine to take each part divided by the guide and make a separate image out of it.
Separating the image into all of its little 16x16 counterparts is easy. The part that takes forever is the exporting and naming of each file. The standard size I use for repeat is 128x128, meaning it creates an 8x8 guide, which each being 16x16 pixels. The end result for that is 64 files named 0 through 63. Assuming I can perfectly export all of those without making a single naming mistake, or accidentally not exporting 1 of the 64 images, it takes around 5 minutes.
So setting up the guides and guillotining it is the easy part. I don't know how to write scripts, but the script that would be needed would be one that can name each file then export it. All of this is possible (except the script) just time-consuming. The larger the texture, the longer it takes. I don't know if its possible for you to be able to make it so it can use a single image and break it up itself, but if so it would be extremely useful and save lots of time. I have probably spent hours on the repeat textures alone for a simple pack I'm making, though the end result is worth it.
There are many ways to automate image splitting, for example: https://imagesplitter.net/ http://pinetools.com/split-image https://www.imgonline.com.ua/eng/cut-photo-into-pieces.php http://www.pictools.net/split/ ...
ImageMagick can also do the trick: http://www.imagemagick.org/discourse-server/viewtopic.php?t=15771 http://www.fmwconcepts.com/imagemagick/tidbits/image.php#crop2
Generally OptiFine does not modify the resource pack textures and the splitting would be best handled by an external tool.
Do you have any idea why this isn't working exactly? This isn't a full resource pack just the one CTM folder.
Edited to remove link so people don't steal my work.
Currently width and height for method "repeat" are limited to 16. When the limit is increased it works:
Oh that looks great! Will you be increasing the limit? Or allow us to define a limit in the properties file, default 16?
The limit would be increased or removed in next preview.
You have made me a happy man. Thank you.
OptiFine 1.12.2_HD_U_D2
What it is
This idea for this is being able to eliminate the monotonous task of taking the texture you want, which are presumably large, and having to break down the image into many files of small sizes like you currently have to. This is an example of the process I use to break down an image into its many files required in order to repeat it in the game. In this example, I'm using a 1024x1024 texture (which is much much bigger than most files I would normally use) and breaking it down into 16x16 textures. The result of this would be 4096 individual image files to make up this texture in the game. With the method I'm proposing, there would only be 1 individual image file.
How the file looks
An example if it was using the large 1024x1024 image I referenced above:
Dont know if this would be required, but maybe in the properties file there could be another line like:
Basic math has to be done to figure out the width and the height (x/y where x represents the image size and y represents the block resolution you want).
Here are some examples of using the same 1024x1024 file, but with different resolutions:
This would save an astronomical amount of time if this was implemented.