Region Generation

From Beyond Skyrim Wiki
Jump to: navigation, search

Automated region generation is a topic that divides modders strongly. Some swear by it; some forswear it; and most who use it swear at it. It does have its uses, though, and if handled carefully can produce moderately good results over vast areas fairly quickly. Nobody here suggests it is any substitute for hand-modding but finishing a well designed setup by hand is a better use of time than building from scratch. Assuming you want to use the region generator, or at least test it out, you will need to know quite a bit about its quirks.

Video Tutorial

There used to be a very good video tutorial available for download from Dark Creations. It seems to have been deleted in a fit of tidyness and we have no idea who the original author was - if anyone knows, please get in touch as we'd like to re-link it and give proper credit.

It was a very good video, but there was a big problem in the second half. The author presents a very important and valid issue about the shape of regions, but his solution to the problem is wrong in every significant way.

The video shows that when you create and generate a region the cells along the edge will not be treated correctly, and blending between regions won't happen properly. This is because of the way he approaches it, and there is a better way which we'll describe later.

Generating Regions

First, we must define our regions: their shapes and the list of objects in them (known as presets). The regions can be whatever shape we want them to be. They can even overlap - and in fact they should. The region generator will blend regions that overlap in this way. See the page Region Borders for how the transition can be controlled by the region settings.

The trick is to ensure that all the ground you intend to generate is covered by preset regions before you start generating, including both sides of any borders. NEVER EVER generate the edge of a region without completely defining its neighbour first. That is, define all objects in overlapping regions before generating those regions. This is because "region generation" is not only generating the region you defined, it is generating the presets for every cell in the region you select, even the presets for overlapping regions!

I'll illustrate this with screenshots from Oblivion but it applies the same to Skyrim. Here we have a section of northern Cyrodiil. It has lots of overlapping regions defined by Bethesda - which are perfectly good, but our anonymous video author doesn't understand how Bethesda can have generated them without hitting the problems he has. Well this is what they must have done.

I create a region called RGen01. I did give it a colour for this but it's probably best not to. This is going to be a rectangle.


Now, as per videoguy, make sure the points at the corners are real close to the edge of the cells:


and make up the rest of the rectangle:


So this rectangular region has many wiggly regions crossing it like this one:


If you were to generate that then you would get all the problems Videoguy describes. But if you select region RGen01 objects tab, and enable objects - but don't define any - and run "generate now" it will work. Perfectly. Blending all the several regions together.


Never generate the regions that actually have the objects in: that will screw up the transitions between regions just as Videoguy did.

Once that's done, you just create the next rectangle over - or move the one you've already made.


Getting the size of the generation rectangle is a matter of balancing the speed of your machine against the fact that you want the regions as big as possible to minimise the edge effects. You do still get those - the region generator doesn't generate the child textures right up to the edge of a region no matter how close you define your rectangle, but as it's the edge of a cell you can just paint over the gaps when hand-finishing. There are no ugly gaps of default texture.

If you have all the preset regions set up in advance you can just keep going one rectangle at a time until you've covered the map.

Remember why! Every cell must be generated only once, because generating a region generates all presets for cells in that region. You need two kinds of regions then. One to define your presets, another to generate them. The first set can have many different shaped regions with many different settings. The second set should be only the dummy rectangle regions. And only the dummy rectangle should be used to actually "generate" regions.

See also: Region Borders