Incorrect rendering of terrain graphics (fixed)
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
Incorrect rendering of terrain graphics (fixed)
Hello, I want to report graphical errors in BfW 1.13.10 (10.0.15063).
The game renders terrain images used in [terrain_graphics] tag incorrectly in some cases. I noticed this while porting my add-on to 1.13.x. I have run some tests and it looks like this issue happens only for images without alpha channel and/or with indexed colors. Adding alpha channel and/or disabling indexed colors fixes all errors but I would like to know if this is intentional (so from now on only images with alpha channel are permitted for usage as terrain graphics) or if this is a bug. These glitches are present on both Windows and Linux machines.
To help others recreate this bug I have prepared a micro-add-on in form of a multiplayer scenario (with all necessary files). I am attaching it here for those who are interested:
The game renders terrain images used in [terrain_graphics] tag incorrectly in some cases. I noticed this while porting my add-on to 1.13.x. I have run some tests and it looks like this issue happens only for images without alpha channel and/or with indexed colors. Adding alpha channel and/or disabling indexed colors fixes all errors but I would like to know if this is intentional (so from now on only images with alpha channel are permitted for usage as terrain graphics) or if this is a bug. These glitches are present on both Windows and Linux machines.
To help others recreate this bug I have prepared a micro-add-on in form of a multiplayer scenario (with all necessary files). I am attaching it here for those who are interested:
- Attachments
-
- Multihex_Test.zip
- (4.69 MiB) Downloaded 471 times
Last edited by inferno8 on April 17th, 2018, 7:21 pm, edited 2 times in total.
- Pentarctagon
- Project Manager
- Posts: 5565
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Incorrect rendering of terrain graphics (1.13.10)
Can you check which version of SDL you have? This looks fairly similar to this issue.
Edit - tested with the attached example, and the issue still occurs for me with SDL 2.0.5.
Edit - tested with the attached example, and the issue still occurs for me with SDL 2.0.5.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Incorrect rendering of terrain graphics (1.13.10)
Sorry, for the late reply. I have SDL 2.0.4 and the problem still persists in BfW 1.13.11 running on Win10 (10.0.16299)
Re: Incorrect rendering of terrain graphics (1.13.10)
Honestly, I can't help but feel this must have something to do with SDL being more sensitive to indexed colors... I have indeed confirmed that re-saving statues.png as a standard, RGB color, non-indexed file fixes all the visual issues - the hex bleedthrough and that weird red aura both.
This change wasn't intentional, but I cannot guarantee a fix. At present, it's best just to re-save the image.
EDIT: actually, turns out I was able to track down the problem (with jyrki's help). The fix will be in 1.13.12
This change wasn't intentional, but I cannot guarantee a fix. At present, it's best just to re-save the image.
EDIT: actually, turns out I was able to track down the problem (with jyrki's help). The fix will be in 1.13.12
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
Re: Incorrect rendering of terrain graphics (fixed for 1.13.12)
I can confirm the issue with indexed colors has been fixed for BfW 1.13.12 (SDL 2.0.4). Thank you!
It looks like the game still has problems using terrain graphics without transparency (non-rgba pngs, jpgs and similar).
Fortunately this issue can be easily fixed by enabling transparency via image editor and saving as png or tiff (at the cost of increased file size - sometimes tenfold).
I think it would be good to make the engine treat non-transparent images as if they had this additional information layer. This could reduce size of some add-ons even by 50% (especially mine) Nevertheless I am happy with the current implementation. It changes a lot in comparison to the previous development version.
It looks like the game still has problems using terrain graphics without transparency (non-rgba pngs, jpgs and similar).
Details:
Interestingly this does not happen on 1.12 I think it would be good to make the engine treat non-transparent images as if they had this additional information layer. This could reduce size of some add-ons even by 50% (especially mine) Nevertheless I am happy with the current implementation. It changes a lot in comparison to the previous development version.
Re: Incorrect rendering of terrain graphics (fixed for 1.13.12)
Heh, I was just going to write here that I couldn't reproduce the issue, then realized I was testing on master where rendering has been significantly refactored already (one of the major changes that will be in 1.15/1.16 is that large multi-hex images like yours will now be drawn all at once instead of broken up into hundreds of hex-sized images. But that's not relevant right now ).
I'll test again on 1.13.12+dev and see what I can do.
I'll test again on 1.13.12+dev and see what I can do.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
Re: Incorrect rendering of terrain graphics (fixed for 1.13.12)
I have a fix (thanks again to jyrki for pointers). It will be in 1.13.14.
EDIT: 1.13.14 now live with the fix.
EDIT: 1.13.14 now live with the fix.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
Re: Incorrect rendering of terrain graphics (fixed)
I can confirm the fix works for 1.13.14 - the problem no longer exists. Thank you!