Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4174 closed defect (fixed)

[PATCH] Heightmap interpolation

Reported by: elexis Owned by: FeXoR
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: FeXoR, _kali, Niek Patch:

Description

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.

Attachments (7)

t4174_bicubic_interpolation_v1.patch (3.7 KB ) - added by elexis 8 years ago.
t4174_interpolation_fixed_2016_9_6.diff (3.5 KB ) - added by FeXoR 8 years ago.
Fixed the usage of the interpolation, a fail by one in the loops and the scale
t4174_interpolation_fixed_2016_9_6b.diff (5.9 KB ) - added by FeXoR 8 years ago.
Added the MIT license, the date and the author
t4174_interpolation_fixed_2016_9_6c.diff (6.3 KB ) - added by FeXoR 8 years ago.
Seperated the interpolation for clearer licensing
t4174_interpolation_fixed_2016_9_6d.diff (6.2 KB ) - added by FeXoR 8 years ago.
Linewraps in license_mit.txt, removed whitespaces in empty lines
t4174_interpolation_fixed_2016_9_6e.diff (6.8 KB ) - added by FeXoR 8 years ago.
Added documentation for bicubicInterpolation
t4174_interpolation_fixed_2016_9_6f.diff (6.9 KB ) - added by FeXoR 8 years ago.
License rewiew by Philip, Code review by elexis

Download all attachments as: .zip

Change History (11)

by FeXoR, 8 years ago

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

by FeXoR, 8 years ago

Added the MIT license, the date and the author

by FeXoR, 8 years ago

Seperated the interpolation for clearer licensing

by FeXoR, 8 years ago

Linewraps in license_mit.txt, removed whitespaces in empty lines

by FeXoR, 8 years ago

Added documentation for bicubicInterpolation

by FeXoR, 8 years ago

License rewiew by Philip, Code review by elexis

comment:1 by FeXoR, 8 years ago

Owner: set to FeXoR
Resolution: fixed
Status: newclosed

In 18710:

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

comment:2 by elexis, 8 years ago

Keywords: rfc removed

comment:3 by elexis, 8 years ago

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

comment:4 by elexis, 8 years ago

In 18736:

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.

Note: See TracTickets for help on using tickets.