[PATCH] Heightmap interpolation #4174

Closed
opened 2016-08-27 14:32:15 +00:00 by elexis · 10 comments

The new maps by _kali which come with a digital elevation model (like pompeii) have some interpolation issues if the mapsize exceeds the provided resolution.

The current algorithm is to interpolate with one neighboring tile. Instead something better like bicubic interpolation could be used.

The attached patch attempts to implement that, but somehow the result doesn't have any effect.
The map "howe sound" found in https://github.com/0ADMods/maps_random_by_kali/ already has these artifacts with mapsize medium.

The new maps by _kali which come with a digital elevation model (like pompeii) have some interpolation issues if the mapsize exceeds the provided resolution. The current algorithm is to interpolate with one neighboring tile. Instead something better like bicubic interpolation could be used. The attached patch attempts to implement that, but somehow the result doesn't have any effect. The map "howe sound" found in <https://github.com/0ADMods/maps_random_by_kali/> already has these artifacts with mapsize medium.
elexis added the
Theme
UI & Simulation
Priority
3: Should Have
Type
Defect
labels 2016-08-27 14:32:15 +00:00
elexis added this to the Alpha 21 milestone 2016-08-27 14:32:15 +00:00
Author

Attachment t4174_bicubic_interpolation_v1.patch (3831 bytes) added

**Attachment** t4174_bicubic_interpolation_v1.patch (3831 bytes) added

Attachment t4174_interpolation_fixed_2016_9_6.diff (3585 bytes) added

Fixed the usage of the interpolation, a fail by one in the loops and the scale

**Attachment** t4174_interpolation_fixed_2016_9_6.diff (3585 bytes) added Fixed the usage of the interpolation, a fail by one in the loops and the scale

Attachment t4174_interpolation_fixed_2016_9_6b.diff (6047 bytes) added

Added the MIT license, the date and the author

**Attachment** t4174_interpolation_fixed_2016_9_6b.diff (6047 bytes) added Added the MIT license, the date and the author

Attachment t4174_interpolation_fixed_2016_9_6c.diff (6403 bytes) added

Seperated the interpolation for clearer licensing

**Attachment** t4174_interpolation_fixed_2016_9_6c.diff (6403 bytes) added Seperated the interpolation for clearer licensing

Attachment t4174_interpolation_fixed_2016_9_6d.diff (6369 bytes) added

Linewraps in license_mit.txt, removed whitespaces in empty lines

**Attachment** t4174_interpolation_fixed_2016_9_6d.diff (6369 bytes) added Linewraps in license_mit.txt, removed whitespaces in empty lines

Attachment t4174_interpolation_fixed_2016_9_6e.diff (6982 bytes) added

Added documentation for bicubicInterpolation

**Attachment** t4174_interpolation_fixed_2016_9_6e.diff (6982 bytes) added Added documentation for bicubicInterpolation

Attachment t4174_interpolation_fixed_2016_9_6f.diff (7111 bytes) added

License rewiew by Philip, Code review by elexis

**Attachment** t4174_interpolation_fixed_2016_9_6f.diff (7111 bytes) added License rewiew by Philip, Code review by elexis

See ce11dd8877

Adds globalscripts/BicubicInterpolation.js, the corresponding license_mit.txt and points to it for other files with the same license in LICENSE.txt - reviewed by Philip and Itms. Uses that to fix an interpolation issue in gaia.js and also fixes a "fail by one" there - reviewed by elexis. Fixes #4174
See ce11dd8877ea1963e287cc1628ab92ddae5624fd ``` Adds globalscripts/BicubicInterpolation.js, the corresponding license_mit.txt and points to it for other files with the same license in LICENSE.txt - reviewed by Philip and Itms. Uses that to fix an interpolation issue in gaia.js and also fixes a "fail by one" there - reviewed by elexis. Fixes #4174 ```
FeXoR added the
Closed
Fixed
label 2016-09-06 21:50:01 +00:00
FeXoR self-assigned this 2016-09-06 21:50:01 +00:00
FeXoR closed this issue 2016-09-06 21:50:01 +00:00
Author

Before & After:



Before & After: ![](http://i.imgur.com/eGSZ418.jpg) ![](http://i.imgur.com/5atRT8n.jpg) ![](http://i.imgur.com/Wl7eUMj.jpg) ![](http://i.imgur.com/OFitXK8.jpg)
Author

See 80934a6e86

Reduce the waterheight from the default 19.9 to 18 after the heightmap interpolation in refs #4174 made water visible in wrong locations. Fixes #4231.
See 80934a6e862471604493bf414e1828912cf24a0f ``` Reduce the waterheight from the default 19.9 to 18 after the heightmap interpolation in refs #4174 made water visible in wrong locations. Fixes #4231. ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: wfg/0ad#4174
No description provided.