When a game like Minecraft have many blocks it becomes impossible to keep track of the images if they are all inside one. That's why Minecraft stores each texture as a single image (and some extra JSON files).
One way to generate the texture atlas is to create a Frame buffer object, iterate all the textures, render them insider the frame buffer, then use the frame buffer as if it was the texture atlas.
In Minecraft each block has an (or multiple) image file and a JSON file. For example, the Oak Log has two images (one at assets/minecraft/textures/blocks/oak_log.png and assets/minecraft/textures/blocks/oak_log_top.png). Then there is a JSON file at assets/minecraft/models/blocks/oak_log.json which looks like:
When a game like Minecraft have many blocks it becomes impossible to keep track of the images if they are all inside one. That's why Minecraft stores each texture as a single image (and some extra JSON files).
One way to generate the texture atlas is to create a Frame buffer object, iterate all the textures, render them insider the frame buffer, then use the frame buffer as if it was the texture atlas.
In Minecraft each block has an (or multiple) image file and a JSON file. For example, the Oak Log has two images (one at
assets/minecraft/textures/blocks/oak_log.png
andassets/minecraft/textures/blocks/oak_log_top.png
). Then there is a JSON file atassets/minecraft/models/blocks/oak_log.json
which looks like:A simpler JSON file (like the one for stone) looks like: