Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate height encoding #375

Closed
wants to merge 4 commits into from

Conversation

MJacred
Copy link
Contributor

@MJacred MJacred commented Jun 8, 2023

Fixes #368

  • still WIP -> precision more or less the same
  • new algorithm is simpler and faster and output seems more consistent
  • breaks compatibility with existing heightmaps -> need upgrade func

NOTE: based on my PR #369 to allow me to import heightmaps of sufficient quality. Will rebase once that PR has been merged
Therefore, please only see newest commit: Change heightmap encoding


On import:

  • min height: 0.0
  • max height: 131.87

On Export, calculated:

  • min height: 0.0
  • max height: 131.78027

before, auto-calculated heights on export were:

  • min height: 0.0004844
  • max height: 131.78074

Benchmarking

new encoding+decoding: max diff 0-0.000977 over 7229.061 msecs
previous encoding+decoding: max diff 0-0.000975 over 7304.282 msecs
new encoding+decoding: max diff 0-0.000977 over 7148.446 msecs
previous encoding+decoding: max diff 0-0.000976 over 7224.242 msecs
new encoding+decoding: max diff 0-0.000977 over 7099.373 msecs
previous encoding+decoding: max diff 0-0.000975 over 7174.645 msecs

current progress result: Basically equal precision loss but faster and output seems consistent (rounding in current logic seems to round differently sometimes)

@MJacred MJacred force-pushed the alternate_height_encoding branch from ece4d24 to c32ce58 Compare June 8, 2023 14:14
@Zylann
Copy link
Owner

Zylann commented Jun 10, 2023

FYI #316 (comment)

@MJacred
Copy link
Contributor Author

MJacred commented Jun 16, 2023

will close this PR due to 32-bit support (e49ac9a)

@MJacred MJacred closed this Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants