Hello, Sometime around 0.20 we added a extra-useful feature into the game called Texture Cooker, which is nowadays a fundamental tool we use in our assets creation workflow. What? This tool lets the game automatically convert PNG textures files into the most appropriate DDS format. Why? DDS is a texture format optimized for 3D applications, and is optimized for GPUs allowing them to use less memory. Not many image editing software support these format natively, and some require plugins/addons that are often not up to date. The texture cooker removes this issue by allowing you to keep working with PNG and leaving to the game the conversion. More? You can find this feature fully documented here: https://documentation.beamng.com/modding/materials/texture_cooker/ Feel free to ask for any questions, doubts or etc. in regards
Is that the reason why there are textures in .png format in the official game vehicles? Pretty cool if I don't have to fiddle around with exporting them the correct way in .dds
If you mean why, in some of our materials files, we point to .png textures, yes! We have used the texture cooker in those cases, working with .png files on our end, but releasing the converted .dds files when done. Even though the texture paths are pointing to .png file, the game automatically uses the converted .dds files if they are detected. In general with this you can export textures as .png while we are working on content and let the game care about the .dds conversion.
After the last update the console shows more in detail what I did that did not jive with the texture cooker. Apparently all textures need to be to the power of 2. Assuming that is 1024x1024 or 4096x4096 for example and not some odd ball 1937x846. I made a new object with the correct dimensions and it worked as it should. Worked great !
I read the documentation and I can find the DDS in the temp folder that are converted, however I can not select the static mesh and be allowed to modify the material any further on imported DAE's from Blender. Things like alpha blend, animation, lighting or adding other textures to the other locations like normal reflection, cutout ect. This only is for materials the Texture Cooker has converted PNGS for. I export from Blender with only a color map being I read T3d handles all other types of textures in engine. If I make new material it says one is already created in the console for material converted which is obvious but If I type the texture in the search box it does not yield a result. This is where I have all my models and pngs stored. C:\Users\Terry\Desktop\TM\0.22\levels\Crater Should they be in a subfolder to "Crater" in say the art folder or other ? Thanks. I am thinking I can delete that temp folder and clear up some issues. Will back my level folder up first. I am going to make a new test level to get a fresh take thinking I may have done something wrong to an item or material JSON file somewhere along the way editing them. Hate to be a pain in the end side but appreciate the time to read this or respond.
Sometimes the cooker does a lousy job compared to manual conversion. Transparency issue, perhaps? 1. Original decal png 512x512, 49.8 KB, xcf file removed from folder 2. Cooked, 341 KB 3. Paint.net conversion to BC7 sRGB default, no mipmaps, 256 KB 4. Terry's enhanced no4, 4k, 21.3 MB 5. Terry's 1024x1024 cooked, 1.33 MB
For me it honestly always works a lot better than manual conversion and it solves the transparency issues that can happen normally. The only weird thing I found out that it's very slow at cooking skins for the H-Series, it might just be me, but it takes like half a minute when it's supposed to be instant and works almost instantly for other vehicles.
That looks like compression artifacts, frustrating. Can you scale the image using bicubic smoother (best for enlargements) then let the texture cooker convert it. I am thinking the more pixels you are converting, the better the compression artifact will be. This is just the photoshop image scale, but any should work. Then resize to 512 x 512 if you have using Bicubic Sharper for the reduction. image sizes here do not reflect power of 2, its just the enlarge and reduction I mean to point out.
I made a few variations, from simply only scaled to 4k, to several other variations you might like to try. also converted one of them to a Normal map if you are familiar with what they do. Drop in the texture slot under the color map where it says normal map. Just rename the one that works for you to your file name.color. some are 1_ 2_ 3_ 4_ to let you know they are variations of the map. Just easier to say, whatever one you try, just rename to your file And leave the .normal on the normal map. Did some painting on those letters to try to clean them up some in a couple of them. One is an 8k, 8192x8192, but doubt it will make much more difference than the 4k ones. Hope it helps ! -Terry Added the Photoshop format file if you get Photoshop Elements or Photoshop Regular. Elements is a cheaper version that usually ships as free included with cameras, or laptops. Not very much to buy it either. I use Gimp alot. Gimp does seamless tile maps and normal maps in the main filters. Gimp is Free. Remember to export to save as in gimp. Just saving saves as a gimp file. Exports DDS, but think its a different version or compression. --- Post updated --- Dam, hehe... It looks exactly the same before enlarging then shrinking. 512x512 would work if the font was larger for the bottom letters. They are so small that it is giving the artifacts. If you make any more signs or want to modify this one here is a link to a site with free Fonts. In photoshop or any editor you can type the font out as a vector instead of a rasterized. Think of a vector as meta data that no matter what size the font is, the raster will mathematically display it correctly. Only thing is it has to be rasterized to be flattened but I think it would give a better place to start from when shrinking. Sorry it took so long to get back. Also sent a 1024x1024 and a normal.png of the 512 x 512. Using a normal could give it a little more detail. You can make a normal for the side view of the hanger, and those 3d bars will apply to the sign too. You can have your metal hanger thing do same thing as the wood on the paint. Beer Fonts | FontSpace
Thank you Artistterrymartin for your time and expertise. 1024 converted nicely. And just to make clear, that's not my map or textures. It's Ouerbacker's Las Colinilas de Vapor, which I thought was worth to future proof with new files.
Thanks, not an expert but learning as I go. Glad I could help... The more people share knowledge the more the community can benefit. I will keep eye out for any maps or mods you make. My next project will be next month, want to learn the Jbeams and Nodes. I want to make mods after my map is done. More destructible objects is where my interest is focused.
for .color texture we always use BC7. it take a bit more time to convert to it as it tries multiple schema for all the compression blocks. when you use the in-game texture cooker we use the fast preset so it tries a lot less schema (speed up compression). if there is too many compression artifact you can try to overwrite the dds with an external tool that will try to get better results. @ltntai try to use mipmaps all the time. else you will have the granny effect when the texture is far away
I promise. Could the cooker also convert dds files that give "unsupported non-RGB format" console errors to its preferred form? Is there quality loss if I turn those to pngs and then cook them? Feels safer than raffling my own dds settings.
for now the texture cooker expect all source to be 8bit. .color need to have 3 or 4 channel. .data can have 1, 3, 4 channels but should not be used for diffuse as it's not using the same color space. for now the engine doesn't convert anything if the channel are missing. that means you need to export the png in the right format there is a bit of quality loss because of the dds compression, especially when using the game because it use the fast preset. during testing it was not noticeable.
Why when the game does convert to DDS, I am unable to go back to the material editor and make any more changes ? It is as the material does not exist. Thanks
while converting texture you may experience lag. it should happen when you load the mesh that uses it. if you can reproduce the issue can you please provide steps or video recording
Thanks yeah, I am aware of the lag, and I will make a short video. Thank You. --- Post updated --- Here is my video of the typical problem I encounter. I made the test image a 1024x1024 png saved from photoshop. SAved as test.color.png. Had to change the texture in Blender to be also called test.color . Earlier test block was red when Blender object was only called test in the texture name. Even when the game does not crash and I just browse for the texture it is not listed, but the DDS is in the temp folder. Thanks for any time analyzing this I know everyone is likely busy ! I am reinstalling game, going to make new location for the user folder than where it was. And see without doing anything else if the problem still happens. I am also getting the user interface vanishing when using the forest tools in the editor. (1) Texture Cooker Problem for Me Test - YouTube
I saw that article earlier https://www.beamng.com/threads/when...png-and-jpg-texture-issue.78552/#post-1311660 Maybe the logo just doesn't like to be compressed in 512x512. Tried resaving it to 8-bit png (I think the original is 24 or 32 bit) and the cooked result was the worst one yet: But the problem was solved with your 1024.
I have not tried these two tools, but will later, google Nvidia Texture Tools. I remember you did not have photoshop, but ones a plug in for it, and the other I installed Nvidia texture tools for my very old photoshop elements, and could not figure out how to use them or where they where. NVidia also has a stand along Texture Tools and maybe I am to dumb to use them, could not figure them out. Glad the 1024 helped.