Fractal terrain
How to add fractally generated terrain:
Well after playing around with various programs today and figuring all the details out I figured out a little trick that should speed up development time for those wanting it when it comes to generating heightmaps. I finally figured out the ins and outs of importing them and of course how to fractally make them and this is just my little tutorial on how to do so.
Before we get started there are two things you are going to need. TESCS of course, and a program called Fractal World Explorer (FWE) which is available from NBOS. Now you can go out and do like I did and buy Fractal mapper which it comes as part of or you can just download their AstroSynthesis trial which has a demo of FWE included. Now the demo will not allow you to save your FWE maps but it WILL allow you to export them to binary files which is all we need. Oh yeah and a few bottles of beer helps as well.
Ok, once you get FWE down and installed you are going to want to go and launch TESCS. Once you have the TESCS up you can either go through all of the rig-a-marol of loading data files, or if you just want to play around you can immediatly get started:
1. Click the World pull down menu and select the World Spaces option
2. In the left hand pane right click and select new
3. Name your world space whatever you want it to be and click ok
4. At this point you can either copy the settings fo the Tamriel world settings, or leave them as is, it will work fine either way.
5. click ok and minimize the CS.
6. Now that that is done you want to go in and open up FWE. This will bring up a simple window. While the toolset looks very simple, it is suprisingly powerful. Giving you all the options of the heightmap editor from TESCS and then some.
7. You want to select File->New Random Terrain->Water and Land.
8. At this point a new box will pop up with settings on size for generation, What we want to do is select 1024x1024 (which is the requirements for TESCS) and click ok. In a couple of seconds you should see newly generated terrain. If it looks like something you want proceed on, if not just keep generating terrain till you get one you are happy with.
9. Now what we HAVE to do due to the export function only exporting out height map data above sea level is reduce the sea level by ~4200 meters. This is accomplished under the Processes->Lower Sea Level option. Once you have lowered it by about that much your land should be looking much drier and even a bit cold in some places that it wasn't before. That is ok as this tool generates realistic climates as well as terrain based on a number of factors.
10. Once you have the sea level lowered to the appropriate point you are going to want to go under File->Export to Binary. This will bring up a new dialog box which will ask you what you want it saved as and how. Go ahead and hit the Browse button here and go out to your HeightField sub-directory under your Oblivion\Data directory. If it does not exist you will have to make it (it doesn't show up unless you've tried importing before). Once browsed out to there you want to enter in the name of 0_0.raw into the filename field and hit OK. This will take you back to the export dialog box where you will want to select 16bit before hitting OK (32 bit just makes it all come out flat).
11. Now that you have the land created and exported go ahead and minimize the FWE and jump back into the TESCS. At this point go to your Heightmap editor, it is the 9th button from the left on the top toolbar and looks like a world map. When asked which world space you want to edit select the one you created in step 3.
12. With the heightmap editor open, select File->import. It will pop up a box mentioning the requirements which you can only hit OK on. Go ahead and hit OK and in a few seconds you should see alot more map than what you were looking at before. However it is still not in game yet.
13. Now you want to hit file and select save. What this does is automatically generate the cells and adjusts their height map based on the file previously imported. What I generally like to do while in the height map editor is move my cursor around the terrain and place it over an area that "should" be costal based on how it originally looked in the FWE, then check the lower left hand corner of the height map editor to find what cell it is in. At that point I close down the Heightmap editor and go to that cell in the cell editor window then check in the preview window to make sure everything looks right.
And there you have it you just imported some brand new, quickly generated terrain into your game. Now some notes on FWE, and importing terrain in general in TESCS. First, yes I realise that FWE does not generate really good terrain on the 1024x1024 setting. Don't get me wrong it does an AWESOME job, but piecing together a whole world from it would be quite a feat. Getting randomly generated terrain to all line up just right is near impossible I think; however, that being said it is absolutly awesome at generating whole entire worlds when you use the higher level settings (at the bottom of the generate land and water dialog box). By all means play around with it and you will see what I am saying, however if you do make sure to select the lwoest res full world map until you get one you like and then use the Map->Enlarge Globe function or else it will take forever to generate, especially on the highest setting. Now if some enterprising coder out ther could just find a way to right an app to go through the binary data files and automatically sift out and name what segments go where to break the entire generated world up into 1024x1024 pieces then everyone could rejoice as building worlds would be a cake walk.
Now as for the TESCS and importing. There is some important things to note here. First once you import anything into the heightmap edito it will always auto-import properly named files for that world space. Meaning if you work on two worldspaces at once, generate a 0_0.raw for one, implement it, and then make another 0_0 for the other and enter back into the heightmap editor for the first area it will automatically pull in the new 0_0. This is a boon because you can make changes on the fly in FWE (raising/lowering the sealevel, doing erosion and such) and immediatly see the results in the TESCS Heightmap editor just by hitting import again; however, it is also a curse because if you accidentally hit save it will overwrite whatever you already did so be careful when working on 2 areas at once. Also make sure you have no .RAWs still in the heightfield directory (it renames them after you save in the editor) if you go to edit another area as even if you have never importd into that area there is the possibility it may still auto import.