Amerio.Stephane Posted March 20, 2025 Posted March 20, 2025 Hello, We migrated a project to 2.19 and on some (all?) textures the mipmaps are no longer used. This makes all hires textures looks very grainy and flashing at a distance. This is especially disturbing on naturally noisy textures, such as concrete or asphalt. The render settings have been tested and no change have any impact (upscalers, antialiasing, textures, distance scale, etc). Reverting to any preset makes no change. The texture themselves seems to have the correct Importer settings (Mipmap Box, format auto, texture preset, etc). But very strangely, if I copy one such texture file from its project place to my desktop, rename it, and then copy it back into the project, and then apply it to a decal/object, then this newly imported version show the correct mipmaps: Left = original from the project, a simple concrete noisy texture seen from a afar. Right = after being copied to the desktop, renamed and back into the project: no noise is visible as the correct mipmap is used Here is original texture:asphalt_alb.tga Clicking reimport on the original texture makes no changes. Both original and renamed have the exact same settings on the import page and when applied to an object. Here is the original runtime texture and meta file:8e1b220c968c75fb5e15f31e80583fe527bc7000.texture.meta8e1b220c968c75fb5e15f31e80583fe527bc7000.texture Here is the copied/renamed/reimported texture and metafile:877b5f1f044fce319a22e74b2d9e3430d91818ef.texture.meta877b5f1f044fce319a22e74b2d9e3430d91818ef.texture We have hundreds of affected textures.
silent Posted March 21, 2025 Posted March 21, 2025 Hi Stephane, Thanks for the detailed description and test files. So far we were unable to reproduce similar behavior on our side. We have couple of additional questions, however, that probably can help in debugging: Could you please tell us the exact version of SDK where these textures were working OK? How did you perform migration? There are several options available: Via upgrade scipts (upgrade.usc) Via Projects tab in SDK Browser Could you please send us original (non-migrated) meta for tga texture as well? If you also can share original node and material where this textures were looking good - it would be quite nice (just export 1-2 nodes using the built-in editor's export to *.upackage feautre). Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Amerio.Stephane Posted March 24, 2025 Author Posted March 24, 2025 Migration was done from 2.16.1 to 2.19.1. The project is split in multiple umounts. Each umount have been migrated manually with the migration script. Here are attached the requested upackages, for the same decal, in 2.16 and 2.19. Here are also the meta for the same tga, from 2.16asphalt_alb.tga.meta and 2.19asphalt_alb.tga.meta. There are indeed additional lines in the 2.19, but nothing is different in the property page of these files, strangely (and certainly nothing was changed on purpose here). Again, we have hundreds of affected files. Is there any way to batch-fix all textures? upackages.zip
silent Posted March 24, 2025 Posted March 24, 2025 Thanks for the additional packages! Our QA team will look into this as soon as possible. Quote Is there any way to batch-fix all textures? So far we can't reproduce the same behavior on our side, therefore we can't provide any batch scripts for that. Have you tried to delete .runtimes directory completely so new files will be generated on Editor's start? Maybe that would help? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Amerio.Stephane Posted March 24, 2025 Author Posted March 24, 2025 I removed all .runtimes folder, and launched the editor again: the texture issue is still there :( 1
silent Posted March 25, 2025 Posted March 25, 2025 Is there any chance that you can send us Editor log with mounts being enabled? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Solution silent Posted March 27, 2025 Solution Posted March 27, 2025 Thank you for providing the log file and the 2.16.1 test files! Our QA team has identified that, for some materials in the .mat files, the intermediate asset GUIDs (e.g., pointing to TGA files) are being written instead of the runtime GUIDs, which should reference the optimized GPU-ready .texture assets. As a result, the engine attempts to load mipmaps from the TGA textures, which breaks texture streaming and prevents mipmaps from being loaded correctly. Also it can cause spikes on GPU textures upload and increased GPU memory usage. Starting with version 2.19.x, mipmaps can only be read and streamed from .texture files (the runtime format). That allow us to handle memory consumption and optimize mipmaps loading performance. This also means that any materials referencing intermediate assets may lead to broken mipmaps. At this point, we’re unable to determine exactly when this issue began occurring in your project—though it appears to have originated well before version 2.16.1. It’s possible that, at some point, mounts were used without running the proper migration process, leading to incorrect GUIDs being written to the materials. In order to fix such materials we prepared script that is fixing texture guids inside .mat files (in attachment). How to use: Copy migrate_assets_to_runtimes.usc somewhere near the usc_x64.exe interpreter Launch script and pass: Main data path of the project (where guids.db is located) (optionally if you have project with mounts) All the paths with mounts So the final results would look like this: usc_x64 migrate_assets_to_runtimes.usc F:\_SDK\proj\unigine_project\data E:\My_Mount_1\Path\Here D:\My_Mount_2\Path\Here As a result after GUIDs fix you should be able to see the diff in .mat files where incorrect GUIDs will be replaced and mimaps should start to load back again. Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Amerio.Stephane Posted March 27, 2025 Author Posted March 27, 2025 Perfect solution for a not so easy problem! Thanks again :) 1
Recommended Posts