Page 1 of 2

.tga files support

Posted: 16 Jan 2018, 14:15
by GoodBetter
Hello.

One of mods, which I tried, uses .tga to replace magic effects icons. These icons looks fine in vanilla MW, and in Openmw they are just absent (or completely transparent), with no related error messages found in log. They were packed in mod's bsa archive, but I also tried to unpack them to data folder. I found couple of issues in bug tracker regarding tga support - http://bugs.openmw.org/issues/1392 and http://bugs.openmw.org/issues/3180. In second issue, it is mentioned that tga type 2 is supported by osg. Looks like these icons are of type 2 as well (see example in attachments). So, maybe I am missed something?
I run Openmw 0.43 with OSG 3.4.1-1 from official binary Arch Linux repositories.

Any help is much appreciated.
icon.zip
(480 Bytes) Downloaded 150 times

Re: .tga files support

Posted: 16 Jan 2018, 14:23
by psi29a
This was fixed in our forked version of OSG: https://github.com/OpenMW/osg/pull/6

If you are using an arch's official version, then you'll likely not have the fix. Can you look through the sources to verify?

Re: .tga files support

Posted: 16 Jan 2018, 14:35
by GoodBetter
psi29a wrote: 16 Jan 2018, 14:23 If you are using an arch's official version, then you'll likely not have the fix. Can you look through the sources to verify?
You were right, source code, provided with package, didn't contain changes from pull request you've linked. So, looks like I need to build OSG from source with this patch applied.

Re: .tga files support

Posted: 16 Jan 2018, 14:45
by psi29a
Or use the PR to make a patch that arch can use and ask them to include it. :)

OR

Use our generic linux build.

Re: .tga files support

Posted: 17 Jan 2018, 01:24
by wareya
psi29a wrote: 16 Jan 2018, 14:45 Or use the PR to make a patch that arch can use and ask them to include it. :)
Arch applies as few patches as possible to upstream packages, for better and for worse. This is a case where they would definitely not apply the patch.

Re: .tga files support

Posted: 17 Jan 2018, 14:39
by GoodBetter
I'd like to know, does binary Windows version of Openmw 0.43 includes this patched OSG? Because so far I tried to patch OSG 3.4.1 sources on my linux machine, and it had no effect. I also tried this mod with Windows version of Openmw and had the same result - icons didn't displayed.
Looks like it would be easier to fix this by creating compatibility omwaddon with converted tga files :) (which is anyway required because of 20+ scripts with compile errors in this mod)

Re: .tga files support

Posted: 17 Jan 2018, 15:35
by psi29a
I thought the default behaviour was to prefer the dds over tga files? Or is that not the issue in this case?

Re: .tga files support

Posted: 17 Jan 2018, 15:40
by AnyOldName3
I didn't fix the bug so that people could just work around it.

It should be the case that the provided binaries for Windows include the fix, but there could be any number of reasons why that hasn't happened. Either way, though, the image in the zip file at the top of the thread isn't affected by the fix as it should have been supported already. As far as I can tell, the image hasn't got anything wrong with it that would prevent it from working, so unless the OSG TGA plugin was either missing or not registering properly, I can't think of why it wouldn't be working.

Re: .tga files support

Posted: 17 Jan 2018, 15:42
by AnyOldName3
psi29a wrote: 17 Jan 2018, 15:35 I thought the default behaviour was to prefer the dds over tga files? Or is that not the issue in this case?
I think we settled on that behaviour because it was determined to be how vanilla worked, so if the mod works in vanilla it means either that isn't the issue or we've subtly misunderstood what the vanilla behaviour is. It might be the case that vanilla prefers DDS over TGA unless the DDS is in a BSA and the TGA isn't, for example.

Re: .tga files support

Posted: 18 Jan 2018, 14:24
by GoodBetter
So, I made simple plugin to test ;) . I placed an example icon into Data Files/Icons folder, and in vanilla CS changed icons of 2 magic effects which belongs to Imperial race abilities. In vanilla MW this icons were changed and correctly displayed in race selection dialogue, in OpenMW 0.43 on Windows, icons were missed, without any fallback images, just transparent. Can anyone else confirm that, please?
icon_test.zip
(2.44 KiB) Downloaded 146 times