Snarkpit Articles


This tutorial will expand upon the techniques covered in the last terrain tutorial, and allow you to switch between cliff, ground and ceiling with ease. It is expected you have read and understood the last tutorial I wrote on triangle terrain. As before, since this tutorial explains a mapping technique rather than a precise creation, you need not use the example maps or follow it to the word - it should be easily possible to use any map in which terrain moving in different directions needs to be linked and still find it useful. If you wish to use the map used as an example though, it can be downloaded here, along with the tutorial in .txt form and all of the screenshots...

http://www.snarkpit.com/pits/reno/tutorials/terrainswitching.zip

As you can see in the below screenshot, the example map is a rather common situation - you have a piece of ground terrain, and wish to join it up with a cliff. Whatever the situation though, the technique remains the same. As both have been made using the triangle technique, it is a rather easy task to link the two.



The first step I would take is to give yourself some space to build your linking brushes. In my case, the location of the cliff didn't really matter, and so I made space by simply moving the cliff backwards and up a little. If you need to keep your cliff and ground in the same location, then your best option would be to either delete the row of triangles closest to the cliff and rebuild them as the linking brushes, or use the vertex manipulation tool to make them smaller. Regardless of how you do it, you should hopefully end up with a small gap to allow you to work in.



To keep things looking natural, I have decided to modify the bottom vertices of the cliff to stop it being straight. As the ground has a bias in height across it (higher at the left, lower at the right), I have chosen to mimic this in the base of the cliff. I'm not sure if my description here is clear, however the screenshot below will make it obvious.



Before we go on with the linking, I suggest you hide everything in your map other than the bottom row of triangles of the cliff, and the row nearest the cliff on the ground, as the next step requires precise vertex manipulation that is easier with clean views. Make sure you have the cliff and ground meshes ungrouped also.

We will now create the furthest left linking triangle. Clone a triangle from the ground and move it to the left hand side of the area between the cliff and ground. Now on the top down view, select two of the vertices of this new triangle and move them to sit against the corners of the leftmost ground triangle. The remaining vertex should be moved to sit next the bottom left vertex of the cliff. This can be tough to spot, but a good way to locate it is to select the brush in the 3D view, go into vertex manipulation mode and select the vertex there. You can then look on the top down view for the highlighted vertex, and you know that is the location you need to match up. You should now have this...



Next we will align the linking triangle vertically. The process is identical to the one described above only done using the side and front views, and again the best way to locate vertices is to select them in the 3D view and then find the highlighted one on the 2D views. One thing to remember is that since we are using a triangle cloned from the ground, the TOP vertices are the ones you align with the base of the cliff - just leave the bottom vertices sitting one unit below the top one as usual. If you have done this correctly, the triangle should sit neatly linking up the cliff and ground, as below...



As you can probably the guess - all you need do now is repeat this process all the way along the base of the cliff. While this may seem like a slow task, its monotony can be minimised by using the flip tools. If you clone your existing linking triangle, and then flip it horizontally (press ctrl-l), then the leftmost vertices will be at the same height as the rightmost vertices of the old triangle - so simply move them into position on the top down view and they will already be lined up vertically. Now you just move the remaining vertex into position using all 3 views, and that triangle is all lined up. Repeat this all the way along the row to end up with something like this...



Now unhide all of the map, and you will see your terrain in all its glory. You might find however that some of your textures are misaligned, so to quickly rectify this simply...

Select the ground texture
Ensure you are on "select" mode
Press "replace"
Tag the "do not replace textures" box
Press "ok"

This will select all of the top faces of your ground, so that you can easily change texture or properties. I suggest you check they are set to "treat as one" and aligned to "world", and if so they should all look correctly aligned. Repeat this for the cliff to have everything looking its best. With luck, you'll have something pretty neat looking, like this!



I hope this tutorial was useful to you, and as always suggestions and improvements are welcome - just chuck them below as comments.


Post ReplyView Topic
Discussion
There are not yet any comments for this article
Post ReplyView Topic