[Advisory] Texture crossloading

I think I’ve stumbled across an oddity in hodor, or in the engine, that I ought to share. I’ll explain how I came to the conclusion I came to.

I had a ship that was looking pretty weird, reacting to lighting in an ugly way. I thought it was the specular texture causing the problem, so I removed the specular texture. This didn’t solve the issue. I removed everything but the diffuse texture, and it started behaving well, if boringly. So I added back in textures one by one, and it started showing the weird behavior again any time something that mapped into the $glow texture was present.

Now this particular ship happens to be one that’s been cloned and modified a few times in the HW2 version of the mod, so there’s a few different instances of it’s textures in our sourcefiles directory. I was trying to fix one instance of it before propagating the changes to other ships, but on a hunch I deleted everything but the diffuse on the other ships, put a glow texture on the main one, and rebuilt the main ship, and still no dice. Pursuing the hunch further I rebuilt all the hods in question, and now it works as expected; no weird specularity features, but a working glow, and team and stripe too after I restored those textures.

So the conclusion I’m brought to is that if a texture is missing channels, the game can(but does not always, it did this for the specularity but not for t/s data) load channels from other ships in the mod with textures that share the same filename, and this can cause problems. Try to give your textures unique names for every ship, I suppose.

1 Like

Were all your textures in one directory, or separate folders?

Separate folders. Based on the fact that rebuilding all the other hods was needed, not just removing the textures and rebuilding the hod in question, I’m reasonably sure that the crossloading is being done by the engine, not HODOR.

Got it. Just checking, since I have a tendency to name all my textures main_ or details_ :slight_smile:

Weird. Maybe there’s some obscure collection of circumstances that’ll make it happen that I’m meeting and you’re not.

HW1 used to do this and it didn’t always follow the TEXTURES.ll file

I believe I have had the same issue, but only with the GLOW file. It came from recycling the same rig for multiple ships without renaming the files.

This is not the first time I see this, I saw this happening on the old HW2 engine too, and didn’t knew the cause until a few months ago.