NeRdTheNed / MC-TextureGen

A Java program that programatically generates textures generated by certain versions of Minecraft at runtime, and then saves them to individual files.
The Unlicense
12 stars 1 forks source link

(13w38a-14w21b) Anisotropic Filtering 4x4 missing texture #24

Closed muzikbike closed 10 months ago

muzikbike commented 2 years ago

This was originally tracked in #16.

Currently, MC-TextureGen generates the familiar 2x2 checkerboard missing texture, which appears to be the standard missing texture used in the 1.7 era. Indeed, this is the only version of the texture I can seem to get to appear in-game in this general version range. However, according to media created around this time period, there also appeared to be "higher-frequency" versions of this missing texture, featuring 16 squares instead of the usual 4.

For example, the following video clearly features an air item with this texture in 13w38b: https://www.youtube.com/watch?v=nJun57MSyYY

In addition, 1.8 introduces block models. During their introduction, the missing texture made several appearances. A notable bug report from the time includes multiple screenshots that appear to show this texture. https://bugs.mojang.com/browse/MC-47653 Some of the screenshots have an even higher-frequency checkerboard, implying there may be 8x8 or even higher versions of the texture. I'll have to check how the texture mapping on the missing model worked at the time, as to determine whether this is truly a section of an 8x8 texture, or just the 4x4 texture shrunk to fit a smaller square (thankfully the model wasn't procedurally generated at the time so this shouldn't be too hard to find out).

This file on the wiki https://minecraft.fandom.com/wiki/File:Missing_Texture_(frequency_2)_JE3.png was originally uploaded as the air item texture in 2020, which is considerably after these dates, which may or may not imply that it can still be reproduced.

The textures being higher frequency would imply that this version of the texture appears in HD texture packs, but most of the screenshots and videos appear to just use the default textures, and including some higher-resolution textures in a resource pack did not cause this texture to appear. As such, it may be hardware-dependent.

The fact that I cannot seem to find any records of this version of the texture after the roughly 1.6-1.8 time period may imply that it was removed in late 1.8 development, likely 14w25a, the version which merged the block and item texture atlases.

muzikbike commented 2 years ago

Checking the missing model in 14w07a reveals that it did in fact map the entire 16x16 texture on all six 8x8 faces, and some resource pack magic confirms this. As such, the screenshots on the bug report do not confirm the existence of an 8x8 checkerboard missing texture (even if it cannot be ruled out). Still, they stand as valid examples of the 4x4 texture. 2021-10-12_19 00 01

muzikbike commented 2 years ago

Investigating further into MC-47653, all of the screenshots posted on that ticket which feature the 4x4 texture came from user Hartspoon, who has also commented on a report pertaining to a Linux-exclusive bug. So if this texture is OS dependent, it may be a Linux thing, so I'm currently recontacting all of the Linux leads.

I've also pinged the original uploader of the 4x4 texture to the wiki to see if they actually encountered this texture themselves, as this obviously also would prove important.

muzikbike commented 2 years ago

And it seems like that wasn't correct after all. Here's another ticket with the 4x4 texture, clearly marked as Windows 8.1: https://bugs.mojang.com/browse/MC-50252

muzikbike commented 2 years ago

A second Windows one, this time from Windows 7, with much more specific info: https://bugs.mojang.com/browse/MC-50385

muzikbike commented 2 years ago

Three more tickets mentioning this 4x4 version of the texture, again all from the 14w10 era: https://bugs.mojang.com/browse/MC-50238 https://bugs.mojang.com/browse/MC-50254 https://bugs.mojang.com/browse/MC-50266

muzikbike commented 2 years ago

Even Mojang's blog post for 14w10a uses this texture: https://web.archive.org/web/20140328101841/https://mojang.com/2014/03/minecraft-snapshot-14w10a/

muzikbike commented 2 years ago

Found it! This version of the texture is tied to the anisotropic filtering option. Having it disabled gives the usual 2x2 texture, but anything above that will give the 4x4 version instead. This disproves an 8x8 version of the texture, and also means we can get an exact version range - introduced in 13w38a, and removed in 14w25a. 2021-10-13_08 35 56

Lassebq commented 2 years ago

I'm 99% sure there can also be a fully purple block texture, it happened to me at some point, probably because I was using a certain java version to launch mc. I don't think I can reproduce it again though

muzikbike commented 2 years ago

To demonstrate how this texture is actually generated, I created a custom model to reveal larger sections of the atlas:

Here it can be seen that this larger missing texture results from a 3x3 (probably any non-1 odd by odd) grid of said texture, and then taking the center 32x32 section from said region, as opposed to a 2x2 tiling of the original texture (even if the outcome is the same).

Hopefully generating this texture is simple enough now!

NeRdTheNed commented 10 months ago

Note for future research: my implementation is slightly different from how the texture is generated in game, but produces identical results as far as I know. I may re-implement this in a more faithful way in the future.