Difference between revisions of "Fractal terrain"

734 bytes added ,  10:53, 30 July 2010
m
spelling
imported>DragoonWraith
(removed pre-formatted text at the end of 8. the box prevented the text from wrapping, making most of the section unreadable.)
imported>Falchya
m (spelling)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
How to add fractally generated terrain:
How to add fractal 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.
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.
Line 5: Line 5:
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 [http://www.nbos.com 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.
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 [http://www.nbos.com 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:
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 immediately get started:


'''1.''' Click the '''''World''''' pull down menu and select the '''''World Spaces''''' option
'''1.''' Click the '''''World''''' pull down menu and select the '''''World Spaces''''' option
Line 15: Line 15:
'''3.''' Name your world space whatever you want it to be and click '''''ok'''''
'''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.
'''4.''' At this point you can either copy the settings from the Tamriel world settings, or leave them as is, it will work fine either way.


'''5.''' click '''''ok''''' and minimize the CS.
'''5.''' click '''''ok''''' and minimize the CS.
Line 33: Line 33:
[[Image:Generated.jpg]]
[[Image:Generated.jpg]]


'''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.
'''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 ~4096 meters (the default water height in the TESCS Heightmap editor). 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.


[[Image:sealevel.jpg]]
[[Image:sealevel.jpg]]


'''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).
'''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.
 
[[Image:Exportpt1.jpg]]
 
<blockquote>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'''''.</blockquote>
 
<blockquote>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).</blockquote>
 
[[Image:Exportpt2.jpg]]


'''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.
'''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.
[[Image:heightmap_dialog.jpg]]
 
'''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 (each 1024x1024 Height maps is approximately 31x31 cells or about 1/4 the size of the overland world in Oblivion). However it is still not in game yet.
 
[[Image:Heightmapeditor.jpg]]
 
'''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 coastal 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.
 
[[Image:verify.jpg]]
 
And there you have it you just imported some brand new, quickly generated terrain into your game. There is still a long way to go as you still have to "texture" it all but at least you have some base to go off of now.


'''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.
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 absolutely 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 lowest resolution 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 there could just find a way to write 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.


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 thing to note here. First once you import anything into the heightmap editor 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 immediately 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 .RAW files 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 imported into that area there is the possibility it may still auto import.  So it is BEST before starting any new heightmap project to make sure your Heightfields directory is completely emptied out of any files except the RAW files you intend on using.


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.
[[Category:Tutorials]]
[[Category:Worldbuilding_Tutorials]]
Anonymous user