The terrain-atlas.tga file is a TARGA image file. Basically, it's the old terrain.png file but instead of it being 256px by 256px, it's 512px by 256px. And of course, all the tiles are rearranged.
The terrain.meta file is the file that tells the game where to look for the tiles of the blocks. It's written in JSON and when you expand it, it looks like this:
[{ "uv": [0.0, 0.0, 0.0312, 0.0625, 512, 256], "name": "grass", "additonal_textures": [ [0.0313, 0.0, 0.0625, 0.0625, 512, 256], [0.0625, 0.0, 0.0937, 0.0625, 512, 256], [0.0938, 0.0, 0.125, 0.0625, 512, 256] ] }] ...
Here's what I've been able to gather so far:
- All the numbers are relative percentages and not actual pixel counts. So instead of saying the stone tile is 64 pixels from the left, it tells us that the stone block is 0.125 or 12.5% or 1/8 (of the total width of the image) pixels away. In the case of a 16x texture pack, that would equal 64px.
- The first two numbers in the brackets are the respective X and Y starting coordinates of each tile.
- The middle two numbers in the brackets are the respective X and Y ending coordinates of each tile.
- The last two numbers are the size of the TARGA image.
- The "additional_textures" section tells the game that the block is not just one solid tile but rather multiple and that it needs to find those tiles and apply them to the block.
- The syntax of the code is as follows:
[{ "uv": [x1, y1, x2, y2, width, height], "name": "NAME OF BLOCK", "additional_textures": [ [x1, y1, x2, y2, width, height], [x1, y1, x2, y2, width, height], [x1, y1, x2, y2, width, height] ] }]
0.8.0 also includes mipmaps (terrain-atlas_mip[0-3].tga) which are basically just 50% scaled down versions of the terrain-atlas.tga image. With each increasing mipmap, the image gets scaled own 50%.
So with terrain-atlas.tga being 512x256;
terrain-atals_mip0.tga = 256x128
terrain-atals_mip1.tga = 128x64
terrain-atals_mip2.tga = 64x32
terrain-atals_mip3.tga = 32x16
This is actually very good for the future of texture packs. With the devs switching to relative percentages rather than fixed pixel counts, HD texture packs (32x, 64x, 128x, etc) can (potentially) work far better than they did in previous versions. Namely the water, lava, and fire animations. But there's a huge problem.
I'm not sure if this is just a bug or if this is how the devs intended it to be, but if you place a TARGA image into the game that's over 512x256, every block will turn white except for leaf blocks which and the tops of grass blocks which are shades of green. Regardless of what I set as the size of the image in terrain.meta, it doesn't work. It seems as if the image refuses to load or something. IDK.
Well anyway, just thought I'd share some info with you guys. Also, if you could try contacting the devs asking them to take a look at this and shed some light on the HD texture pack problem, that'd be great
4