You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose a new feature for goxel: creating voxel maps from 2D heightmaps. Using a heightmap was often the first step in map creation back when Ace of Spades was popular. Back in the day I implemented this feature in the pyspades map editor, although there were command line tools to accomplish the same thing prior to the pyspades work.
The basic workflow for AOS maps was to create a 512x512 color image, and a grayscale 512x512 heightmap. The map would be generated by extruding columns of solid colored blocks up to the specified height. Since AOS maps were always 64 blocks tall, the height could be calculated by the formula height=floor(v/4) where v=floor((r+g+b)/3) and r, g, and b are the channel values of the heightmap. A heightmap pixel value of (0, 0, 0) would correspond to the bottom layer of the map, and (252, 252, 252) would correspond to the top layer of the map.
In the pyspades map editor I introduced a new feature - the subtractive heightmap. The subtractive heightmap worked the same as the regular heightmap, except that there was no color image required, and the heightmap subtracted blocks instead of adding them. This was useful for adding things like tunnels to your map.
I would be interested in contributing a heightmap feature to goxel. We could generalize the heightmaps to allow the user to make maps up to 256 voxels tall (ie, utilize the complete channel range of the images).
The text was updated successfully, but these errors were encountered:
I would like to propose a new feature for goxel: creating voxel maps from 2D heightmaps. Using a heightmap was often the first step in map creation back when Ace of Spades was popular. Back in the day I implemented this feature in the pyspades map editor, although there were command line tools to accomplish the same thing prior to the pyspades work.
The basic workflow for AOS maps was to create a 512x512 color image, and a grayscale 512x512 heightmap. The map would be generated by extruding columns of solid colored blocks up to the specified height. Since AOS maps were always 64 blocks tall, the height could be calculated by the formula
height=floor(v/4)
wherev=floor((r+g+b)/3)
andr
,g
, andb
are the channel values of the heightmap. A heightmap pixel value of(0, 0, 0)
would correspond to the bottom layer of the map, and(252, 252, 252)
would correspond to the top layer of the map.In the pyspades map editor I introduced a new feature - the subtractive heightmap. The subtractive heightmap worked the same as the regular heightmap, except that there was no color image required, and the heightmap subtracted blocks instead of adding them. This was useful for adding things like tunnels to your map.
I would be interested in contributing a heightmap feature to goxel. We could generalize the heightmaps to allow the user to make maps up to 256 voxels tall (ie, utilize the complete channel range of the images).
The text was updated successfully, but these errors were encountered: