C0d1ng-L0s3r / ajaxmmo

Automatically exported from code.google.com/p/ajaxmmo
0 stars 0 forks source link

Create Static Terrain json file #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Create a heightmap in greyscale png.

Convert the heightmap to a json file in this format:

{
x:'',
y:'',
id:'',
height:''
}, {}...

Ideally create a tool (png2json) which will convert grayscale to json.

Original issue reported on code.google.com by jlebr...@gmail.com on 12 Nov 2008 at 11:49

GoogleCodeExporter commented 8 years ago
read pixel data using png library.

http://stackoverflow.com/questions/190675/read-colors-of-image-with-python-gae

Original comment by jlebr...@gmail.com on 13 Nov 2008 at 12:39

GoogleCodeExporter commented 8 years ago
Can now read a png file from the static folder.

could write data in three seperate channels r g and b.

play with gimp see if taking green a blue channels off would work? (wouldn'nt be
humanly visible tho, or would it. could be red scale)

Original comment by jlebr...@gmail.com on 13 Nov 2008 at 11:08

GoogleCodeExporter commented 8 years ago

Original comment by jlebr...@gmail.com on 13 Nov 2008 at 11:08