/cast Resurrect HeightMapEditor

Published March 03, 2015
Advertisement
A short while ago (translation: 10 years) I had been working on a heightmap editor for a game project I was working on. Like most of my projects, it fell by the wayside. I haven't really had time lately to do much, but I have resurrected that old project... in a way, at least. In spirit, if nothing else, since none of the code has made it from backup onto my current hard drive.

Anyway, I've been re-building the heightmap editor using Urho3D. The forum thread where I show stuff is here, and the github repo for the project is here. It requires the Urho3D library to be built with Lua support, and so far the shaders I have written are HLSL only. GLSL shaders are on the TODO list.

The editor allows simple brush-based editing of height and up to 8 terrain layers. I've been experimenting with various shader schemes, starting with Urho's 3-layer scheme and elaborating up until I have settled on the current scheme: 8 terrain layers stored in 2 composite 4x4 texture atlases and a blending approach that uses the scheme described in this article. The results are quite nice:

F9Jytpo.png
hU7ENNX.png
4hfXxPc.png

The editor supports a rudimentary filter script system, wherein you can write scripts in Lua that apply effects or alterations to the terrain. Included filters so far include a basic Perlin fractal height generator, a Perlin fractal terrain layering generator, a river builder tool, a road builder tool, a tool to turn slopes greater than a specified threshold to cliffs, and so forth.

The UI is very rough. I am not in a polish stage on it yet, so things are barely usable. But I am working on it pretty steadily as I can. I'm getting to the point where I can start cleaning things up, though I am sort of waiting on some pending merges to the Urho3D master regarding shader structure before I really commit to a lot of the cleanup.

Anyway, that's about all I've been up to. I did dig out the Goblinson Crusoe code and attempt to build it against the latest master, but all I get is a black screen so clearly there is going to be some refactoring there if/when I ever get back to that game.
8 likes 7 comments

Comments

Ashaman73

10 years, pah ! A good project is like a good wine, it needs time to get ripe. Nice to see you again working on your old projects, especially Goblinson Crusoe seemed really promising, so get it running again :-)

March 03, 2015 06:58 PM
JTippetts

That's actually what I'm working on this morning. I kinda have you to thank for my renewed interest in GC, btw. The new Gnoblins looks, like, totally rad and groovy. Far out. Right up my alley, far more so than when it was an FPS thingy. It kinda got my old creaky brain working again to see the new videos. Between that, and all the Divinity: Original Sin I've been playing, I have a renewed interest in seeing what I can turn GC into.

March 03, 2015 07:12 PM
Ashaman73

I'm glad to see that you plan to remove the dust from GC :)

March 04, 2015 07:17 AM
JTippetts
The stuff I was doing with the terrain editor has started to bring some ideas for an alternative way of handling the ground tiles in GC:

8WxPrIO.png

Something like this could actually be more lightweight than my previous method of having large collections of unique tiles.
March 04, 2015 04:05 PM
JTippetts
Yeah, I kind of like this.

5v69Lxj.png
March 05, 2015 03:26 AM
Ashaman73

Looks good. At the water screenshot, have you tried to use a smoothstep function to have the decline at the transition to water tile ?

March 05, 2015 06:12 AM
JTippetts
To be honest, I haven't even thought much about water yet. Up there, that's just a quick alpha blended hex added to pit tiles for the sheer heck of it. I might do something more elaborate in the future, but I still have some work ahead of me just to get back to playable.
March 06, 2015 01:48 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement