Topic: terrain dithering, playing with edge.png

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48 UTC+1.0
Posts: 2689
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2025-08-10, 17:33 UTC+2.0

The current implementation of terrain dithering has some flaws, e.g. a terrain get a very pointed tip, and other things. I have adapted the image with is used for the dithering and tried to solve some things. The top image shows the current status, the image at the bottom the same with a modified "edge.png". Compare the images, here is what the numbers mean:

1: Overlapping terrains reduce the visible area of the "underlying" terrain
2 and 3: pointed tips
4: pointed tips the other way around

Is this better?


Attachment: image/png
edge_comparison.png

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48 UTC+1.0
Posts: 2689
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2025-08-10, 17:34 UTC+2.0

Here is a zoomed image for comparison:


Attachment: image/png
edge_zoom.png

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10 UTC+2.0
Posts: 2155
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2025-08-10, 17:49 UTC+2.0

I like your change much more. Will it be implemented in the game, or will there be at least an add-on which is multiplayer-compatible?


Wanted to save the world, then I got widetracked

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48 UTC+1.0
Posts: 2689
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2025-08-10, 19:03 UTC+2.0

The image is some sort of a widelands internal image and i don't think an add-on can change it. In theory there can be two or more of such dithering images so the edges of terrains can have more variety by applying a randomized dither image. I took a brief look at the corresponding code but i need probably a lot of time to understand it face-wink.png

Attached the changed image. If you have the source code or a copy of the data folder1 you can test the image by placing it below "data/world/pics/edge.png"


  1. You can copy the original data folder to a new location, change files, and start widelands with the option --datadir=full/path/to/copied/datadir. The original files will not be changed this way. 


Attachment: image/png
edge.png

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07 UTC+1.0
Posts: 2172
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2025-08-10, 21:16 UTC+2.0

The image is some sort of a widelands internal image and i don't think an add-on can change it.

See https://www.widelands.org/forum/topic/5972/ – as of v1.3 a Theme add-on can customise this face-smile.png

Personally, I think the new one looks too cartoonish for my liking, TBH. I don't see the problems with the current state as particularly noticeable.


Top Quote
OIPUN
Avatar
Joined: 2020-11-17, 09:34 UTC+1.0
Posts: 303
Ranking
Tribe Member
Location: Czech
Posted at: 2025-08-12, 22:17 UTC+2.0

Nordfriese wrote

Personally, I think the new one looks too cartoonish for my liking, TBH. I don't see the problems with the current state as particularly noticeable.

I see it the same way.


Top Quote