EDIT: Tutorial was completely redone. Much thanks to Baarry5444 and Nadeox for correcting some of the info and presenting an way easier fix. Game updates and mods break, a tale as old as Beamng itself despite the devs and modders best efforts to prevent it. Well, here's a tutorial on how to fix missing textures caused by the 0.22 update that can be used on any mod (AFAIK) broken by it. But before, a couple of observations: Why did the mods break? The game changed the way it reads textures and now .png are not being automatically loaded if the creator of the mod didn't specify them as such in the materials file. What is a materials.cs file? Very basically, it's the file that tells the game which textures go where on the model of the car. So how can it be fixed? Changing extensions in the materials files to match the texture. REQUIREMENTS: - A text editing tool. You can use the basic windows notepad without any issue, although I would recommend you to download and use Visual Studio Code with "commented json". -Patience. You need to be ready to scroll through some text and be very attentious to little details. THE PROCESS Step 1: Unzip the mod. Step 2: Open the folder you just unziped and then open the materials file(s). Step 3: Compare the textures extensions in the file and their extensions in the folder (the actual textures). If they don't match, correct the file using the format it is in the folder. After doing this to ALL textures, save the file. (BEFORE) (AFTER) Step 4: Zip the "vehicles" folder and rename it something else. Step 5: Drop it into your mod folder and CLEAR CACHE BY DELETING THE TEMP FOLDER, this is very important. Done! If you did everything correctly it should work just like before the update. Enjoy
cheers, thank you for this --- Post updated --- question - is there any reason why you can't just open the image in paint.net and export it as a dds?
Paint.net can't convert to dds, it can only save as dds images that already are dds, at least that's how it worked out here. If you know how to actually convert it from png to dds using only paint.net, please tell me so I can update this tutorial
In paint.net you have to choose the proper compression type or else it won't work. Look up on the wiki what kind of compression is for what kinds of textures.
That's why I simply said to choose BC3 Linear, it's not the best setting, but fixed all textures I tested on all mods. Besides, the wiki tells you to choose compression based on dds channels, which I have no ideia how to know which ones a texture has.
Just to clear some misconceptions, no, the game can still read .png textures in version 0.22. The main issue stems with the game no longer pre-caching .png textures into .dds format specified in the material.cs/main.materials.json file. So what do I mean by this? Previously, if you used .png textures for a mod, but you specified .dds in material.cs/main.materials.json instead, then the game would bake the material into cache, thereby converting one format into another. But as of version 0.22, the game no longer incorporates this mechanism, presumably to save loading time. In other words, mods that used to show up completely fine in 0.21 will instead appear with "NO TEXTURE" in 0.22 if its materials were implemented in this manner. To the game, it believed the file specified does not exist, so being specific with the file format in material.cs/main.materials.json is crucial. The main takeaway is that the game does not pre-cache materials in 0.22 for some reason, and while it's fixable, you have to be precise with the file format in the material.cs/main.materials.json file. Then again, the game developers are looking into the issue, and .dds formats are highly encouraged compared to .png and .jpg formats.
Thanks for the clearing up, the wiki said devs were planning on dropping formats other than dds so I thought that's what happened. Going to edit this post correcting that.
Wasn't 0.20 supposed to introduce this kind of pre-caching? And 0.22 broke it? Actually that would explain why none of the old mods got broken
As explained in a different thread, these are not correct. We never had any feature like mentioned above. Certain mods are not loading correctly because the authors never specified the texture extension in the material file. If you tell the game to load ../texture/myTexture.png the game will correctly look for that file. If you tell the game to load ../texture/myTexture the game has to guess which format the file is, and then look for it. In 0.22 the game is assuming you are using .dds format (which you should be using anyway..). So if you have ../texture/myTexture in your material file, the game will try to look for ../texture/myTexture.dds Cannot yet tell if it's a bug, or if it was done for some reason. We are yet to check. Either way, those mods are not correctly specifying their textures paths, and are cutting a corner. If you want to make your mod as future proof as possible, you should avoid that.
While you have acknowledged the fact that specifying an incorrect file format in the .cs/.json file causes a mod to have its textures break in 0.22, it seems my message didn't do a good job explaining my original intentions. So here's an experiment to demonstrate what I mean, as well as a rewritten observation to makes things more clear and to support said experiment. This is a typical example of a mod with broken textures in 0.22. In this case, the Chevrolet Corvette C7 mod by Ezo: As you can see, it mostly uses .png textures, but the materials.cs file specified .dds format. This is what it should've looked like according to its thumbnail. Note that the mod was made around the time that 0.18 was out, and had no issues with textures in 0.19, 0.20, and 0.21. Spoiler As a side note, .png textures still work if the format is specified correctly. Take, for instance, the Mercedes-Benz CLK55 AMG mod that I reworked: Yes, this format is not recommended when .dds is the standard. But I did follow the convention of being specific with the file format anyways, which is why it didn't exactly had any broken materials in 0.22. My theory is that prior to 0.22, the game would load the textures if it can find the file name specified, but doesn't check if the file format is correct. But after 0.22, the game is extremely specific with the format, and therefore assumes the texture does not exist if said format is not provided correctly. This is what I was referring to when I originally said the game would "pre-cache textures"; it could very well be an exploit that was later fixed in 0.22 for the sake of optimization. And as I said before, fixing this is simple (either convert the textures to .dds or rename the incorrect file format in the materials), but this is why one has to be precise with the format when adding materials as stated in my earlier message. So hopefully I got my message fully across regarding this issue. I wasn't trying to spread any misinformation, but my point wasn't listed out properly. Hence I am sorry for the confusion.
Got you. That's clearly a fault within the mod: The author specified the wrong file extension in the materials file. The game is doing the correct thing now by looking at the exact file, but since those texture paths are wrong, it cannot load the textures. In general these mods broke because their author have not specified the correct textures in their materials. The fact it worked so far is just by chance (or very likely was bug that we now fixed), but stuff like that is bound to break, sooner or later. If you want to make a own mod as future proof as possible, you should be scrupulous with these details.
Thank you soo much! Wanted to leave a good message with your help and providing screenshots to help me even more! I was able to fix one of my favorite mods I downloaded and love to drive around!
Whatever mod your using that have texture missing... you have to go into that vehicle's file and see if the files match with the material.cs file. If it has .png for like a piece of the interior and in "materials.cs" it says like .dds or whatever... just change it to .png or whatever it says to match it.
So just change all the dds files to png?, and im confused because the mod im trying to fix consists of a few materials files