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

Better processing of PNG heightmap import #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whisper2shade
Copy link

I had problems with processing of PNG16 exported from World Creator, because your method did not account for the alpha channel, which produced very nasty lines in the imported heightmap. I modified the PNG -> heightMap method to get values from pixels from Raster class.

The double array produced by the getPixel() method produces 3 equal numbers and alpha, so it is enough to take the value of the first channel for processing.

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.

1 participant