Accidental Heightmap Editor update

Published January 12, 2007
Advertisement
( Hi Stacey! )

I just uploaded a new version of the Accidental heightmap editor. This release adds a few minor UI tweaks and a little feedback.

* Add a cross-hair to the center of the brush cursor for more precise targeting.
* Add some UI feedback on cursor position and map dimensions, via an overlay.
* Add support for 3 new libnoise extension modules: TurbMask (which applies turbulence to a module source, maskable via a secondary control module), Fault (which partitions the input coordinate space with a specifiable plane, and returns 1 of 2 specifiable values based on what side of the plane the input point lies) and Buffer (which acts as a proxy for a CFloatArray2D object, mapping a 2D float array buffer to a libnoise-style module source).
* Add the capability to save and load individual float buffers to file: dumpBufferToFile(buffer, filename) and loadBufferFromFile(buffer, filename)
* Implement an iterative smoothing filter for quicker erosion blurring than Gaussian blur provides, for quick and dirty terrain erosion: filterFloatArray(buffer, filter, iterations)
* Implement quick inversion of a buffer scaled to the range [0,1]: invertBuffer(buffer)
* Implement sub-array operations for combining 2 CFloatArray2D buffers together, extensions to the CArray2D<> template class itself:
** copyFromSub(buffer, x, y)-- Copy the contents of buffer into the current array at the (x,y) coordinate location
** addArraySub(buffer, x, y)-- Add the contents of buffer into the current array at (x,y)
** subtractArraySub(buffer, x, y)-- Subtract the contents of buffer from the current array at (x,y)
** multiplyArraySub(buffer, x, y)-- Multily the contents of the buffer with the current array at (x,y)
These extensions allow easier manipulation of smaller buffers as pieces of a larger map, and replace some much slower Lua code to perform the same. These operations could be performed using the general-case rasterization operations, and with greater flexibility, however the setup for a rasterization operation is slightly more complex so these extensions add some simplicity.

This release also includes a few older Lua scripts as part of my road building code, described in detail here and in the journal entry preceding that one. I'm re-working all of that old road stuff to integrate it with the new interface and CFloatArray2D class, and to make it a more integral part of the foundation code for the editor, to parameterize any kind of road and generate the road as simply as possible.

Pickup the latest build here.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement