Flatten certain areas

If the slope of a heightmap is less than a certain amount, I would like to completely flatten the terrain, creating a sort of terrace but leaving the rest of the terrain intact. Is this possible in WM?

You’ve got the terrace filter, otherwise you have to use the slope selector and try one of the available filters.

The flat surfaces need to be absolutely flat, though. Can WM do that?

Could you show me exactly what I need to do?

Select the slopes you dont want to be flattened. Invert it, Combine with a flat land and use the inverted slope selector as a mask for the combiner. You can also limit the height in which this effect happens by using a height selector.

I will try that. But how do I round the heights of the affected areas to the nearest 24 units? The unaffected areas should not be rounded.

Could someone show me the exact steps to follow with an example? I am very new to WM.

[edit]

I would be willing to pay $50 to get a working example.

I think you might need to more fully describe what you’re trying to achieve, because the problem is not fully defined right now – a big part of figuring out how to achieve a procedural goal is to make sure you’ve actually fully defined what you want out of the solution.

For example, it would be easy to make a terrain where the heights are rounded to some nearest value using the terrace device, then Choose between that and the original terrain, placing your terraced region only where the slopes are gentle.

But this might not be what you want – within each gentle region, you’d still have jumps of elevation between one terrace level and the next. I suspect what you really want is to have flattened locations that are at a constant height, with regular terrain around them.

Doing this automatically is hard. if this is the goal, essentially you’re looking for an automatic region segmenting and processing tool. There’s plenty of edge cases to figure out in this case too – if you have a very large low-slope area, the average value of the region isn’t likely to be anything close to reasonable over the majority of it’s area. In any case, there isn’t anything too much like this currently in WM. The closest I can think of is using the Height-matching Chooser, but the regions produced will be smooth but not flat, as I’ve shown in the image attached here.

It might be helpful to tell us what you want this for – if you’re creating a map for a game, for example, you might be best off simply using the Layout Generator to draw those regions by hand; you would be able to set the elevation of the regions exactly to what you want in that case.

I’m trying to create some terrain for a Lego town model I’m helping out with.

The jumps are okay. They will eventually be hidden under Lego which are already blocky to begin with.

I don’t want large regions with identical elevation necessarily. It’s okay if the height varies as long as it’s level.

I ultimately want the flat areas to have the little connector studs placed on them. (I can do this later using a procedural POV-Ray script.) But I don’t want to sacrifice the smoothness of the terrain in other areas I’m unlikely to build on. Otherwise I would just convert the model directly into Lego bricks using another converter that performs this task.

Could you post the WM file for the image you attached? I am having trouble understanding what is going on in it.

How about this:

What if I were to (auto) select all regions with a low slope and set their height to zero. Then export that mesh as Model A.

Next, perform the inverse operation on the original height map and export it as Model B. I can then use a mesh-to-brick converter on Model B to output the square bricks I need.

Will that work?

OK, The good news is that I think what you want is actually the easier scenario.

Take a look at the world attached here and see if it does what you want. If you need the flat areas to have a finer number of flat terraces, simply increase the number of terraces.

Thanks! A couple of questions:

  1. I need the terraces at exact heights, for instance every 24 units. (The actual value depends on the final XZ dimensions of the map.) How do you do this?
  2. What’s the best method to tweak/polish the final mesh? There are a few areas that could be raised or lowered a bit. Is there a smudge tool?

[edit]

  1. And what do I do about my other suggestion in Reply #8?

I tried a different tack and combined the WM terrain with Lego parts. The result is not so great however.


I’m also still not sure what “Number of Terraces” means. Is it the number of terraces per 1 unit of height? What is the unit of measure?

You have to experiment a bit more, I don’t have the program on this pc, but I can tell you can set the units of measure in the preferences, it’s either meters or wm units.
You can also set how much tall will be the highest object in your project, the default is around 2200 meters if I’m right.
Once you know this then if you make a mountain at the highest height you can set the number of terraces according to the desired height of each step. So let’s say you want to use wm units as the unit of measure, then you know that if a mountain is 1000 units tall, and you apply a terrace with 10 steps then each step will be 100 units tall.
Of course you can apply the terrace to only a certain portion of your terrain, for example by using the height selector you can decide that the terrace will be applied from unit 238 to unit 528, in that case if your terrace still has 10 steps each step will be 29 units tall.

Thanks for the explanation. Switching to WM units made everything make more sense.