Mindwerks / worldengine

World generator using simulation of plates, rain shadow, erosion, etc.
MIT License
982 stars 128 forks source link

Numpy+images #141

Closed tcld closed 8 years ago

tcld commented 8 years ago

This makes more use of numpy, even though only for the exports (and those don't take too much time anyway). I also put some work into the GDAL export() method; there might have been a bug or two and I wanted to give worldengine the opportunity to make use of more of the formats GDAL supports. (Even though I don't like GDAL since it was a pain to install. I created an instruction, though. Maybe it can be added somewhere.)

In draw.py I added an import for the PyPNG-library which is used to export 16 Bit grayscale images.

All of this is based on this https://github.com/Mindwerks/worldengine/pull/138 and there may be some things in here that need a bit of discussion. Due to some of the changes and the connection to https://github.com/Mindwerks/worldengine/pull/138 this will not pass the tests for now.

EDIT: Oh, Travis doesn't know the PyPNG-module I imported. Well, this still needs a tiny bit of polish. :)

tcld commented 8 years ago

@psi29a If you want to look at the code, you should probably start with the branch this is based on (https://github.com/Mindwerks/worldengine/pull/138) unless you want to verify it all at once.

psi29a commented 8 years ago

You'll need to add PyPNG to tox.ini

tcld commented 8 years ago

Ok, thanks. Since this https://github.com/Mindwerks/worldengine/pull/144#event-440746090 is now merged, I should probably rename the worldengine-data files to fit the new format (py3_seed...). I was away all day and didn't manage to do it before I left. I will finish everything up as soon as possible and hopefully the tests will run fine again. :)

tcld commented 8 years ago

This is going to be broken down into pure numpy-rewrites of parts of the image-code https://github.com/Mindwerks/worldengine/pull/161, a rework of the GDAL export https://github.com/Mindwerks/worldengine/pull/159 and the 16 Bit grayscale heightmaps I promised somewhere (that branch is not yet fully separated; no PR for now).