Twitter  YouTube  E-Mail  RSS
The One Man MMO Project
The story of a lone developer's quest to build an online world :: MMO programming, design, and industry commentary
So Many Glitches
By Robert Basler on 2018-03-05 01:35:44
Homepage: email:one at onemanmmo dot com

I've been working on procedural generation of cliffs and rock formations. Previously Miranda had a heightmap terrain with rock models (made by artists) placed on it by the terrain generation utility. All of these standalone rock models are placed based on a complicated set of rules. To help players identify impassible terrain, rock textures are placed on areas where vehicles can't navigate. I was never very happy with textured cliff faces, particularly at the map limits.

[It's so wrong, but sort of beautiful.]

I started with a bunch of research, looking at all the different types of rock formations in nature. That was wonderful. I saw chalk deserts, volcanic glaciers in Iceland, and sandstone formations in Arizona among many others. Nature is amazing.

When I researched procedural rock generation algorithms, I was rather surprised to discover that nobody else seems to have done this before for games. I found a few articles on modelling individual stones procedurally, but nothing on a larger scale.

I also spent several hours looking at the rocks in games from my library. All the games I've looked at have artist-designed rock formations. They look great, but there is undoubtedly a significant art cost. In case you're wondering, Guild Wars 2 has the best looking rocks I found.

The one true thing about building mesh geometry procedurally is that it is painfully difficult to get correct. I spent a lot of time these last couple of weeks looking at glitches. Everything would appear to be working, then I'd shift to a different area and things would be poking out all over the place and I'd have to break everything down to try to figure out what was going wrong.

[Procedural geometry is painfully difficult to get correct.]

It was kind of a thrill the first time Miranda produced rock formations that looked like something you might see in nature. I was even more surprised when I discovered that the map borders are now covered with huge cliffs instead of walls of smeared textures. When I was working on this, I hadn't considered that problem at all.

Rock generation is done on the CPU on a per-terrain-block basis. Initial performance of the rock generation was pretty poor, sometimes taking minutes to generate a single block (Miranda keeps a minimum of 72 terrain blocks loaded.) Performance is better now, but it is still a work-in-progress. Most terrain blocks have over a thousand individual rocks and several megabytes of mesh data. Surprisingly, the rendering performance is really good.

One interesting problem was Miranda's deformable terrain. When a player places a building, the terrain under it changes. I didn't want all the rocks on an entire terrain block to change with one small change in the heightmap terrain, so I seeded the random number generator on a per-rock basis, so only the rocks right where the terrain deforms will change.

At this point, the rock meshes are coming together. The terrain covered in rock formations is certainly much more visually interesting than the old system. I have one more rock mesh type I'm working on (basalt columns,) and some work to do on the shaders that cover those meshes before I move on to the next engine upgrade. I'll be coming back to do the art for the rocks once all the renderer upgrades are complete. I had a good chat with my unoffical art director this weekend, and he was able to remove some big items from my to-do list.

By Kurt Ingleson on 2018-03-21 15:47:08
Homepage: email:kurt at pacomms dot co dot uk
Any updates on new versions ?
By Robert Basler on 2018-03-21 16:44:35
Homepage: email:one at onemanmmo dot com
Hey Kurt, nice to hear from you. The new version is getting a major render tech and art update and I'm still working on the render tech.

I've added support for new hi-res terrain textures, the new rock formations are in, the shroud has lost its hard edge, and I'm currently working on adding tiny details to the terrain near the camera. There are a couple more pretty big things I still want to add. I was hoping this would be a 3 month update, but it's looking like a bit longer.

It is quite surprising what a difference the rock formations made to the game. Where there used to just be the same smooth terrain with rock textures on it, you can now immediately see what areas are traversable, you can see why tanks choose the routes they do, and you can see where good locations for bases are.

My goal is a significant visual upgrade. Something that will give my PR efforts some traction and bring in more players. Once the render tech upgrade is complete, I'm going to be putting a good bit of effort into new art, so I hope people can be patient. I had planned a short post on the newest system once I finish debugging it.

New Comment

Cookie Warning

We were unable to retrieve our cookie from your web browser. If pressing F5 once to reload this page does not get rid of this message, please read this to learn more.

You will not be able to post until you resolve this problem.

Comment (You can use HTML, but please double-check web link URLs and HTML tags!)
Your Name
Homepage (optional, don't include http://)
Email (optional, but automatically spam protected so please do)
Type boy. (What's this?)

  Admin Log In

[Home] [Blog] [Video] [Shop] [Press Kit] [About]
Terms Of Use & Privacy Policy