• Welcome to SC4 Devotion Forum Archives.

Precise terraforming Part 2: Levelling the terrain

Started by Ennedi, November 26, 2008, 12:01:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ennedi

It was over a year ago when I published my first terraforming tutorial in this section. It's theme was using Mayor Mode tools to raise or lower single terrain tiles.
I found this method very useful in many situations concerning with creating walls, roads on slopes (in especially difficult cases) or terraforming small areas between existing buildings without damaging them.

This tutorial is a continuation of the "precise terraforming" theme and maybe it will be even more useful, especially for creation of sunken transit networks, seaports or cities on slopes.

Today's theme is creating flat areas (including 1- or 2-tile wide stripes, orthogonal and diagonal) easily, quickly and precisely.

There are some ideas about solving this problem, including "Levellers" ie. special lots in various sizes, plopped to flatten the area posessed by them and then bulldozed. You can read about it in the Civil engineering support thread in the NHP section.

I made some terraforming experiments and I came to conclusion that we already have everything we need to perform "engineering" tasks described above: we can simply use God and Mayor Mode levelling tools. They are absolutely precise and enough effective. We only need to learn how to use them.

OK, let's go  :)
1. Main principles:
  1.1. If you want to create a flat area of a given height, you should first have a start point..
The start point can be even as small as 1x1 tile, but it should be flat. Sometimes you have it already and you only want to flatten larger area. If not, you can use the road tile (or a few ones) to create a small flat area. You can also adjust it's height (very precisely  ;D) following instructions from my first tutorial (Precise Terraforming Part 1) and using the Terrain Query cheat (Ctrl X, then type "TerrainQuery", or use the Cheat Plugin) to check the start tile height. You must only remember that if you will place a road piece on the sloped tile, it's height after flattening will be an average of it's vertices' heights before flattening.

So it is wise to raise/lower all four vertices of your "start point" tile to make it approximately flat even before placing the road piece.

Why the start point is so important?
Most SC4 players use terraforming tools with their default settings ie. maximum size and strength. Many people simply don't know they can change these parameters using Shift 1 - Shift 0 keys to adjust the tool size and Shift F1 - Shift F10 to adjust it's strength. Using these tools this way they find the Mayor Mode levelling tool small, slow, expensive  ;D and then uneffective, and the God Mode tool much faster but big and unprecise. Using both tools we can't think about adjusting the levelled terrain altitude.
When we use the levelling tool on a large area, we only see that the terrain is flattened - if you are more perceptive you can see that it is made in many steps. But we don't see what happens with individual terrain tiles. To understand it we must decrease the tool size to make it not bigger than a single terrain tile.

Here we had a wall, previously terraformed. We applied the God Mode levelling tool (with the size decreased to minimum ie. Shift 1) to the single tile. And...



What can we see here?
a) Only one tile vertex was moved: the Northwest one (look at the compass in the top left picture corner). It doesn't depend on our viewing direction, but on the SC4 terrain geometry.
b) after checking by Terrain Query we can see that the height in V3 point is an average of V1 and V2 points. Always? No, this is more complicated but possible to find  :) (in fact the game uses triangles not squares)
It is easy to see it on the first picture, but a bit more difficult in the next one:



But you can believe me that the principle is the same here.

So, how does this happen that larger size tool flattens the area effectively? Because the game engine made this operation in several steps. In the first step every tile is changed as on pictures above - and it creates the new terrain shape. But this new shape enables further flattening, so the next step begins and so on till all area will be flat. This is very general explanation but it is possible to find a proper mathematical formula taking our observations into account (maybe it will be a good play for someone?  ;))
But when we flatten the single tile only, the process finishes at the point showed above. So, if I want to create a flat tile, I must start from another flat one. If all vertices of the start tile are on the same level, next flattened tiles will be completely flat too.

  1.2. The best zoom levels for precise terraforming are Z4 and Z5.
In these zooms you can clearly see the grid (it must by turned on of course!) and all effects of your work. After preparing edges of the flattened area you can increase your working speed by switching to Z3 or Z2 and flattening the central part.

  1.3. Precise terraforming needs decreasing the tool size.
How much? It depends on your needs and the zoom level (the same tool size looks different in various zooms).
- Mayor Mode tool should be set to Shift 3 both in Z4 and Z5. This size doesn't exceed the tile size in both zooms, it can be used to create narrow flattened areas or walls as described in point 2.1.
- God Mode tool is more universal. We can use it:
a) to create walls or 1-tile wide flattened areas as in point 2.1. In this case it should be set to Shift 1 in Z4, and to Shift 1 or Shift 2 in Z5.
b) to create 2-tile wide flattened areas (for example for sunken or raised highways). In this case it should be set to Shift 2 in Z4 and to Shift 3 in Z5.

2. Levelling the terrain - basic examples.

  2.1. Creating a 1-tile wide flat area (for example a road or railway embankment).
We will work in the closest zoom (Z5) to see everything more clearly. First we make a start area using road tiles (this picture is in zoom 3 to show the general situation).



Now we will show our tools in Z5: the Mayor Mode one (Shift 3)



And the God Mode one (Shift 1)



Which one will be better?
The Mayor Mode tool is slower and then more comfortable for beginners. The God Mode one is faster, and it's speed can be increased (I made a special plugin to do it, please inform me if anybody will be interested). In addition, the God Mode tool enables creating larger flat areas as it will be showed in point 2.2.

Now let's see:





As you see, we don't achieve an embankment immediately. We must do it in two steps. First we create an edge, then we must repeat this operation as on picture below:



But you can believe me - it is very quick and easy.
(Surprisingly creating a 2-tile wide embankment is easier  :) - look to point 2.2.)

I was checked if increasing the God Mode tool size to Shift 2 would enable making 1 tile wide embankment. Unfortunately no. We achieve an edge exactly as with smaller tool:



Another example - now we go to the East. I show it to help you with orientation on the map. No matter when we go and where we look from, we always move the Northwest tile vertex.





This way you can also create diagonal walls very easy - please try it!

  2.2. Creating a 2-tile wide flat area.
Now we use 3 tiles wide God Mode tool.







3. End notes.

3.1. Do we need a very stable hand? No! All we need is to keep the tool center between 1-tile wide stripe - and this is very easy after some practice, especially in Zoom 4 and 5  :)

3.2. Does it work under water? Of course yes, but it is more comfortable to start from land  ;D
There are some special problems and working methods which can help a lot in creating a harbour, I will probably show it in my MD soon.

3.3. Can we work near existing buildings, roads etc? In most cases - yes. But not always. Sometimes terraforming the tile which touches to the existing building can destroy it, even if the building base is not moved. I don't know why this happens, so I suggest:
- flatten single tiles touching to exiting buildings using road pieces. Then you can safely flatten next tiles as described above. However, I used terraforming tools next to existing objects many times without any damages. Maybe this problem will be solved in future  :)
- In every case it is good to save the city before terraforming.

At the end I can say It is possible to flatten complicated shapes very quickly after some practice, personally I'm sure it is faster and more universal method than any "leveller" lots. However, I will think about other tools, one of them will be completely flat roads (removable plugin).

That's all, thoughts and suggestions will be warmly welcomed

Adam
New Horizons Productions
Berethor - beskhu3epnm - blade2k5 - dmscopio - dedgren - Emilin - Ennedi
jplumbley - moganite - M4346 - nichter85 - papab2000 - Shadow Assassin - Tarkus - wouanagaine

TheTeaCat

An excellent tutorial Adam  &apls

Clearly explained too  :thumbsup:
I am going to give that a try and let you know, but it seems pretty easy from your pictures :D

:satisfied:
TTC
Kettle's on. Milk? Sugars?    ps I don't like Earl Grey  $%Grinno$%
Reduce, Reuse, Recycle - If you're not part of the solution , you're part of the problem!
"Never knock on Death's door: Ring the bell and run away! Death really hates that!"
Tales at TeaTime      Now A proper NUT      TTC plays GRV II

Simpson

Really fantastic tutorial Ennedi, thank you very much
My new city is now here
The région of Kaikoura

Teaser of Lopsas[+ How did I do it?]:Lopsas