Tweaking height maps.
Moderator: Moderators
Tweaking height maps.
HeightMapTweak 0.1 download here:
http://spring.jobjol.nl/show_file.php?id=1257
I'm developing this application in order to perform handy operations on height maps. Technically there's nothing you can do with this program that you can't do with Photoshop. The goal, though, is to provide convenience and shortcuts that you can't get from Photoshop. For instance, this application can:
- Read and write 16-bit raw files used by mapconv (in addition to standard .BMP and .PNG formats)
- Perform all operations in 16 bits, so your height map stays silky-smooth
The feature list is pretty small at the moment. I've still got quite a few more intended, and your ideas are appreciated. But for now, the program provides the following features:
Add noise
You can add random noise to some or all of the image. You can control the graininess, amplitude, and frequency of the noise.
Add turbulence
Turbulence is a different type of noise which distorts your image. You can use turbulence, for example, to make a straight area into a curvy one.
Stretch slopes
If you want to make a cliff steeper then this is the tool you want. After setting the min and max elevations, this tool will "stretch" the values in-between in order to make them steeper. Also, the min and max elevations are automatically initialized from the selected area.
Gaussian blur
Just a regular blur, but in 16 bits. It's kindof slow at the moment due to lack of optimization.
Selections
The selection tools (rectangle and free-form select) work just as you would expect in any image-processing program. You can feather selections, and all of the above tools will operate only on the selected area (unless nothing is selected).
http://spring.jobjol.nl/show_file.php?id=1257
I'm developing this application in order to perform handy operations on height maps. Technically there's nothing you can do with this program that you can't do with Photoshop. The goal, though, is to provide convenience and shortcuts that you can't get from Photoshop. For instance, this application can:
- Read and write 16-bit raw files used by mapconv (in addition to standard .BMP and .PNG formats)
- Perform all operations in 16 bits, so your height map stays silky-smooth
The feature list is pretty small at the moment. I've still got quite a few more intended, and your ideas are appreciated. But for now, the program provides the following features:
Add noise
You can add random noise to some or all of the image. You can control the graininess, amplitude, and frequency of the noise.
Add turbulence
Turbulence is a different type of noise which distorts your image. You can use turbulence, for example, to make a straight area into a curvy one.
Stretch slopes
If you want to make a cliff steeper then this is the tool you want. After setting the min and max elevations, this tool will "stretch" the values in-between in order to make them steeper. Also, the min and max elevations are automatically initialized from the selected area.
Gaussian blur
Just a regular blur, but in 16 bits. It's kindof slow at the moment due to lack of optimization.
Selections
The selection tools (rectangle and free-form select) work just as you would expect in any image-processing program. You can feather selections, and all of the above tools will operate only on the selected area (unless nothing is selected).
Re: Tweaking height maps.
Instacrash every time. 

Re: Tweaking height maps.
Do you have .NET 2.0 installed? The program is written in C#, so it requires the .NET framework. Failing that, what is the error message?
Re: Tweaking height maps.
It appears to be, as in it is in the uninstall list.
- Attachments
-
- error.JPG (27.08 KiB) Viewed 4824 times
Re: Tweaking height maps.
Updated: Added a Path tool, which may be useful for creating ramps. It draws a gradient between two points. You can define a straight line or a free-form path. The width of the path is configurable along with its falloff period.
Das Bruce: It looks like you're missing a DLL. Are you able to run the CaDownloader?
Das Bruce: It looks like you're missing a DLL. Are you able to run the CaDownloader?
Re: Tweaking height maps.
Yes, it is running now.
Re: Tweaking height maps.
Das Bruce: Now that I think about it, the application might also require .NET version 1.1 (I'm using an older DLL that hasn't been recompiled with 2.0 yet). Do you have that installed also?
Re: Tweaking height maps.
OK, I've updated the application to v0.3. The references to the .NET 1.1 assemblies have been removed. This should (hopefully) fix Das Bruce's instacrash.
Re: Tweaking height maps.
Updated: Added a couple new selection commands, and an erosion command. This is similar to the command-line erosion tool that I released a LONG time back, but produces (IMO) nicer results.
Re: Tweaking height maps.
Hmm. Might want an erosion command for the next World Builder demo, it's a pain to do that by hand. Can 8-bit heightmaps be converted with this application? And can the effects be applied only to a given area, or better yet, applied with a brush?
Re: Tweaking height maps.
Yes, it can read and write 8-bit height maps. You cannot apply the effect with a brush, but you can select a specific area to apply erosion.Might want an erosion command for the next World Builder demo, it's a pain to do that by hand. Can 8-bit heightmaps be converted with this application? And can the effects be applied only to a given area, or better yet, applied with a brush?
Re: Tweaking height maps.
A couple of examples of the erosion tool output:


Both of these were created entirely with the HeightMapTweak application. Use a path or a feathered selection to create an initial "mountain" shape with a gradient slope, then apply turbulence (for variation). Finally, use the erosion tool to get the weathered effect.
Finally, here is a landscape that was created with Noise + Erosion:



Both of these were created entirely with the HeightMapTweak application. Use a path or a feathered selection to create an initial "mountain" shape with a gradient slope, then apply turbulence (for variation). Finally, use the erosion tool to get the weathered effect.
Finally, here is a landscape that was created with Noise + Erosion:

Re: Tweaking height maps.
That second example's what I need, specifically. Cool, I'll give it a go tonight, I'm about done with the current example map, so it's time to make that one...
Re: Tweaking height maps.
Hey this is very sweet. Nice work!
Re: Tweaking height maps.
Trying it out. No crashes yet. A few random errors, but they're mainly resulting from me doing something stupid. Quibbles / Questions:
1. Erosion seems to take bloody forever. Figured out that you must use RAW if you want it to get done within anything like a reasonable timeframe, which seems odd- shouldn't an 8-bit grayscale operate significantly faster for this process, if rougher in result? Should I be expecting it to take 10 minutes to run an erosion pass on a 513 heightmap? Seems excessive, tbh. And how does the angle control work? I'm used to making mountains with airbrushed work... how does erode "know" about the entire mountain, and erode properly?
2. I'd like to see a 3D display of the results, by just displacing a mesh (yeah, I know, we're talking millions of triangles here, but meh, I'm going to have to do this later on anyhow, and this would give me a preview).
3. I'd like a mirror command for selection areas- mirror horizontal, vertical.
4. You cannot left-click and pan the preview image, to see the result. Is a pain with large images, since if you edit in a corner, you'll never really be able to see what it's doing.
Overall, though, this is a fun tool. Hopefully I can get the results out of it that I need...
1. Erosion seems to take bloody forever. Figured out that you must use RAW if you want it to get done within anything like a reasonable timeframe, which seems odd- shouldn't an 8-bit grayscale operate significantly faster for this process, if rougher in result? Should I be expecting it to take 10 minutes to run an erosion pass on a 513 heightmap? Seems excessive, tbh. And how does the angle control work? I'm used to making mountains with airbrushed work... how does erode "know" about the entire mountain, and erode properly?
2. I'd like to see a 3D display of the results, by just displacing a mesh (yeah, I know, we're talking millions of triangles here, but meh, I'm going to have to do this later on anyhow, and this would give me a preview).
3. I'd like a mirror command for selection areas- mirror horizontal, vertical.
4. You cannot left-click and pan the preview image, to see the result. Is a pain with large images, since if you edit in a corner, you'll never really be able to see what it's doing.
Overall, though, this is a fun tool. Hopefully I can get the results out of it that I need...
Re: Tweaking height maps.
Yes, it does. You can speed it up significantly by selecting a smaller area (remember to feather the selection, though, or you'll end up with seams).Erosion seems to take bloody forever.
Also, it continues to perform erosion until the "stop" criteria has been met... and the stop criteria is a bit over-zealous at the moment.
The next version will allow the user to specify a maximum number of iterations to perform. Also, a "Stop Now!" button is probably in order.
The file format shouldn't matter. Everything gets converted to 16-bit when it's loaded. If you save the changes then it'll be converted back into 8-bit.shouldn't an 8-bit grayscale operate significantly faster for this process, if rougher in result?
That sounds like a stop-criteria issue. Did you have a lot of steep cliffs to begin with? The tool continues eroding the cliffs until there are no more "steep" cliffs. As I said before, the next version will have more control over when to stop the erosion.Should I be expecting it to take 10 minutes to run an erosion pass on a 513 heightmap?
Yes, that's also on my wish-list. It may be a while before I'm motivated enough to tackle such a large project, though. I use POV-Ray to preview my height maps in the meantime (above screenshots were created with POV-Ray).I'd like to see a 3D display of the results, by just displacing a mesh (yeah, I know, we're talking millions of triangles here, but meh, I'm going to have to do this later on anyhow, and this would give me a preview)
That's simple enough to add. What are you doing, exactly? Do you have a symmetrical map or something?I'd like a mirror command for selection areas- mirror horizontal, vertical
Yeah, the preview needs work. It'll be improved when I tackle the long list of usability issues that I was too lazy to fix for the first release.You cannot left-click and pan the preview image, to see the result. Is a pain with large images, since if you edit in a corner, you'll never really be able to see what it's doing.
Re: Tweaking height maps.
Very cool. That's almost certainly what's going on. I'll remember the feathered selection thing, too.Yes, it does. You can speed it up significantly by selecting a smaller area (remember to feather the selection, though, or you'll end up with seams).
Also, it continues to perform erosion until the "stop" criteria has been met... and the stop criteria is a bit over-zealous at the moment.
The next version will allow the user to specify a maximum number of iterations to perform. Also, a "Stop Now!" button is probably in order.
Well, I almost always include some explicit symmetry, yeah. I prefer maps that are designed that way.That's simple enough to add. What are you doing, exactly? Do you have a symmetrical map or something?
I would appreciate that. And, while I'm bugging you about stuff, can you make it possible to zoom in and pan on the main UI, too? I hate having to move my face right next to the screen to see what I'm doing, hehYeah, the preview needs work. It'll be improved when I tackle the long list of usability issues that I was too lazy to fix for the first release.

Oh... and to keep you motivated... here's what I made, all grumping aside... just an early WIP, mind ye...

Re: Tweaking height maps.
make the volcano sides kbot walkable ftw
Re: Tweaking height maps.
You mean you didn't just press buttons until you figured out how to do it? :)Argh wrote:And, while I'm bugging you about stuff, can you make it possible to zoom in and pan on the main UI, too?
You can zoom in and out with + / -. Pan the map by right-clicking and dragging.
Re: Tweaking height maps.
A note about the slope maps: if you hadn't noticed from my other thread yet, the slope map created by this application doesn't match up with what Spring uses for unit pathing. Adjusting the angles in your map settings doesn't help because the method I use to calculate the terrain slopes yields different results than Spring's.
In other words, don't use the slope map for anything important. I've already fixed it in my development version so that it matches up 100 percent with Spring. Once I've finished a few other fixes then I'll release an update.
In other words, don't use the slope map for anything important. I've already fixed it in my development version so that it matches up 100 percent with Spring. Once I've finished a few other fixes then I'll release an update.