I had an issue recently regarding CUDA and texture compression in TS2009 SP3 (I don't know if any other Trainz versions are affected) that I thought I'd share since the fix itself was way out in left field and I feel it's likely someone may encounter the problem at some point in the future.
I recently upgraded my old, charred, and crispy EVGA 275 GTX for a PNY GTX 465 (both of nVidia make and chipset, obviously) and was fiddling around with textures on a few of my works in progress in CMP the other day. I recommitted them for the first time after installing the new vid card and loaded up surveyor to see how they looked in Trainz, and to my horror, the textures had become garbled abominations of semi-transparent, pixelated grey and magenta confetti vomit like someone went ape crazy with a glue stick, some glitter and a Be-Dazzler all over model, rather than displaying the actual textures.
Fearing a possible corruption of the actual asset files themselves (or Great Engineer in the Sky forbid, faulty hardware.... again) I jumped back into CMP and immediately re-opened the assets for edit to make sure the textures weren't turned into digital swiss cheese. To my surprise, they appeared to be completely unharmed when opened in any odd image editor. So I just chauked it up to a random fluke with the compression code and recommitted them to take another look. After loading them up in game for a second time, again the textures of only just the re-committed assets had turned into Fruity-Pebbles-in-cement-mix and left me baffled as they should have either a) not exibited the problem again since the files were fine when I checked them in multiple image editing programs to verify their file integrity, or b) had corrupted the texture files themselves as is often the case with these sorts of symptoms. So I played around with all manner of DXT compression settings, texture filter types, and mipmap settings in their configs to see if anything caused a change in the pattern, yet every time in Trainz the model would look like Purple Rain and the textures would look perfectly normal when I opened the asset for edit.
While I was pondering why the texture compression in CMP itself would cause them to corrupt, and them seemingly 'uncorrupt' them whenever I opened the files up from CMP - as logically it was one of only a handful of possible causes by that point that hadn't been ruled out by testing - I was fiddling around with the settings in the nVidia control panel for the graphics card and noticed there was a new entry I hadn't seen before in the 3d management settings: CUDA Enabled GPUs (all my previous cards had not had full CUDA support apparently until my 465). Simply out of curiosity I disabled CUDA extensions from being used with the graphics card and loaded up Trainz, yet the problem persisted. Then it occured to me that maybe I had to re-commit them with CUDA disabled since the texture compression seemed to be involved and textures would only be compressed when their assets were committed in CMP. A quick Ctrl+E, Ctrl+M, Ctrl+L later I was back in surveyor, and *poof* the texture compression had somehow magically rectified itself no longer having CUDA dipping its hands into the chili.
I then went and repeatedly tested the process with both CUDA enabled and disabled just to make sure it wasn't a fluke. It seems to be a genuinely replicable issue, but I don't know if it's a bug with Trainz or the CUDA API itself - and therefore out of Auran's hands, so I provide this little story for those who may have the same problem spring up in the future as a workaround fix until such a time arises where CUDA and Trainz can coexist together, peacefully.
So the moral of this story is - if your textures look like a purple sharpie marker was put through a meat grinder and sprinkled liberally over a slab of concrete and you have a CUDA-enabled graphics card, CUDA conflicting with Trainz's Texture Compression may be likely to blame. Disable that sucker in the NVControlPanel and recommit those borked assets should clear that case of spotted purple flu right up!
I recently upgraded my old, charred, and crispy EVGA 275 GTX for a PNY GTX 465 (both of nVidia make and chipset, obviously) and was fiddling around with textures on a few of my works in progress in CMP the other day. I recommitted them for the first time after installing the new vid card and loaded up surveyor to see how they looked in Trainz, and to my horror, the textures had become garbled abominations of semi-transparent, pixelated grey and magenta confetti vomit like someone went ape crazy with a glue stick, some glitter and a Be-Dazzler all over model, rather than displaying the actual textures.
Fearing a possible corruption of the actual asset files themselves (or Great Engineer in the Sky forbid, faulty hardware.... again) I jumped back into CMP and immediately re-opened the assets for edit to make sure the textures weren't turned into digital swiss cheese. To my surprise, they appeared to be completely unharmed when opened in any odd image editor. So I just chauked it up to a random fluke with the compression code and recommitted them to take another look. After loading them up in game for a second time, again the textures of only just the re-committed assets had turned into Fruity-Pebbles-in-cement-mix and left me baffled as they should have either a) not exibited the problem again since the files were fine when I checked them in multiple image editing programs to verify their file integrity, or b) had corrupted the texture files themselves as is often the case with these sorts of symptoms. So I played around with all manner of DXT compression settings, texture filter types, and mipmap settings in their configs to see if anything caused a change in the pattern, yet every time in Trainz the model would look like Purple Rain and the textures would look perfectly normal when I opened the asset for edit.
While I was pondering why the texture compression in CMP itself would cause them to corrupt, and them seemingly 'uncorrupt' them whenever I opened the files up from CMP - as logically it was one of only a handful of possible causes by that point that hadn't been ruled out by testing - I was fiddling around with the settings in the nVidia control panel for the graphics card and noticed there was a new entry I hadn't seen before in the 3d management settings: CUDA Enabled GPUs (all my previous cards had not had full CUDA support apparently until my 465). Simply out of curiosity I disabled CUDA extensions from being used with the graphics card and loaded up Trainz, yet the problem persisted. Then it occured to me that maybe I had to re-commit them with CUDA disabled since the texture compression seemed to be involved and textures would only be compressed when their assets were committed in CMP. A quick Ctrl+E, Ctrl+M, Ctrl+L later I was back in surveyor, and *poof* the texture compression had somehow magically rectified itself no longer having CUDA dipping its hands into the chili.
I then went and repeatedly tested the process with both CUDA enabled and disabled just to make sure it wasn't a fluke. It seems to be a genuinely replicable issue, but I don't know if it's a bug with Trainz or the CUDA API itself - and therefore out of Auran's hands, so I provide this little story for those who may have the same problem spring up in the future as a workaround fix until such a time arises where CUDA and Trainz can coexist together, peacefully.
So the moral of this story is - if your textures look like a purple sharpie marker was put through a meat grinder and sprinkled liberally over a slab of concrete and you have a CUDA-enabled graphics card, CUDA conflicting with Trainz's Texture Compression may be likely to blame. Disable that sucker in the NVControlPanel and recommit those borked assets should clear that case of spotted purple flu right up!