project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
01 Oct 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
Modding Tutorials Information and tutorials related to modding BF2.

Reply
 
Thread Tools Display Modes
Old 2006-07-31, 19:15   #1
.:XDR:.FRIJJ
Retired PR Developer
Default Making Terrain for a BF2/PR Map

Hello all,

Before i start i want to say that all this info is on the BF2 editor forums and there are other tuts that use terragen and T-paint, but i must admit when using some things for the first time i came up with all sorts of head aches so i thought i would have a go myself!

Also i would like to add this will not make a good map alone, and it will not make a map in minutes like so many people think, these are just tools of the trade and used in the right hands you can produce some stunning results. There are lots of things that make a good map and having a good terrain is one of them.

I am splitting this tutorial into 2 sections 1. Terragen 2. T-paint. I would suggest before you go about making your map you atleast make some basic test maps following the standard EA tutorials otherwise you will be lost and also you will not know what buttons to use. For instance Terragen is an amazing product like world machine etc... but you still need to know how to smooth, lower etc... your terrain in editor. The same as T-paint this only gives you a base to work on and thats it, you will still have to texture your main areas by hand and mix textures together to get the right effects

Right for this tut i am going to use the following programs,

T-Paint
Secondary Heightmap Generator
Terragen
bf2 editor
Photoshop
(with .dds plugin)

by all means if you wish to know just T-paint move to that section. i may also go into more things later on in the tut

Getting set-up.....

Load up editor and select BF2, even if you are working on a PR map just select bf2 as this saves you messing around importing objects. If you wish to import PR object into your map make an objects folder in your bf2 deirectory and place everything in there.

Now we want to start a new level and select a map size, for this tut we will use 512 x2, just remember this size for future reference. If you choose 1024, 256 write it down on a post it note and stick it to something you look at often, your girlfreinds behind, your pet dog, your todger....
Once loaded up all we are going to do is save and exit editor. Congratulations step 1 done

You can create your terrain using editor just using the sculpt tools or you can try your world generator program like we will be doing in the tutorial





STEP 1. Terragen

First of all make sure you have a look where you map folder is, the standard place is...
C:\Program Files\EA GAMES\Battlefield 2\mods\bf2\Levels\your map name

Ok lets load up terragen...

Once loaded you should see somthing like the followig screen....



Now we are going to select size and remember the level size i said? if not find that sticky on your dog etc.. We used 512 so we will press 513, 1024 maps select 1025 and so forth. You will get load pop screen pop up, dont worry just hit ok, yes etc..... then just click ok in the window to get rid of it.



In the Landscape window we are now going to click generate terrain and the terrain genesis window will appear...
I will try to explain the options, firstly the pull down window is what method you wish to make your terrain, Realism, smoothing, glaciation, Canyonism should be self explanetry but this controls how the end map will look, how smooth, how deep the canyons, how tall your mountians. For this tut i am using the following options. but have a play it wont do any harm. When you have something you are happy with click ok



Next thing we need to do is in the landscape window is click modify...
in the 'Show height filed' tick the box next to Terrain units, then set the height range from 0 to 164 then click set height range, then click close.



You should end up with somthing like this.



From here if you like you can click on 3d preview and fly around your newly created world or go back and edit some more until you get something your happy with. You can sculpt by hand also, have a play until your happy.

Ok now we are ready to save our work, in the landscape window click Export, select Raw 16 bits Intel Byte Order, then click (select file and save)



Now find your hieghtmap primary raw folder in the following location...
C:\Program Files\EA GAMES\Battlefield 2\mods\bf2\Levels\your map name
Select this and click save, this will now generate your hieghtmap.



Ok now we are done with Terregen


STEP 2. T-paint

First of all make sure you have the T-paint folder inside your map folder
C:\Program Files\EA GAMES\Battlefield 2\mods\bf2\Levels\your map name

Also quickly pop into editor and enable surrounding terrain we will cover this before we t-paint

If you want to use the standard textures in T-paint you dont need to worry about the next bit.

Ok first of all we are going to extract all the bf2 paint textures from our bf2.zip which is located...
C:\Program Files\EA GAMES\Battlefield 2\mods\bf2\common_client.zip
Browse this zip and find the folder...
Common_client.zip\Terrain\Textures\Color
now extract these into your documents or somewhere you know where they are.

Ok now we are set up so we can start playing

First if you browse you T-paint folder there is a folder called data (this has confused many so i will try to explain)
inside this folder you will see some TGA files, high, low and steep

High =high ground
Low = low ground
Steep = mountains, cliff faces etc...

So go back to your folder you extracted all those lovely BF2 textures to and choose what you want. For this i am going to use..

Slopes.dds for high
muddy.dds for low
grass.dds for high

We need to convert these files to a TGA format that t-paint can use, so all we need to do is load up Photoshop...
Select each file..

Slopes.dds and save it as steep.tga (24 bits/pixel) and then place this in your T-paint/data folder, then do the same for muddy and grass.dds



If you notice in this folder also it has a grad_height and grad angle TGA, you can edit these also which will allow you grass and mud to mix and what angle you want the slopes texture to start. For this tut i am going to leave them as standard.



Ok thats all the colour setting up done.

Now we need to generate the surrounding terrain before we T-paint. We are going to use bf2 hieghtmap generator. Just place the highlighted files into you level folder. Now if you are reading this properly i did say to pop into editor and enable your surrounding terrain. if you have not done this do this now.




So you now should have in your levels folder all of these files...



Ok first lets generate our surrounding terrain, navigate to your map folder and right click on generate shortcut and then click edit, change the 0 value to 256, then click save. (low detail of surrounding terrain)



Now back in your levels folder double click on generateShortcut.bat, this will then look at you main terrain and generate all your surrounding terrain for you.

Ok now back into editor and where your main terrain meets your surrounding terrain we need to use the smooth tool (just so it meets up exactly).

Now into T-paint....

Ok in your map folder/Tpaint double click on BF2 Tpaint



Leave all of them ticked for now and click go... (T-paint generate 2 BMP files colormapbig.bmp and detailmapbig.bmp which you can use later if you like, if you want to keep these untick delete temporary files)

Now go to the T-paint directory in your map folder and copy the following folders to this directory Yourlevel/editor



OK now back to editor to finish up

Once you load up you will probably see something similar, dont worry as now we are going to assign detail textures and generate low detail textures...



ok now select the paint tool and you need to assign the colour textures,
1 for steep so we used slopes for the colour and then assign textures, in the low detail type assign this to 2 (tweaker bar)
2 for high (grass), set low detail type to 1
3 for low (mud), set low detail type to 1



Now we generate low detail maps....






Now you should have a finished terrain ready to start putting grass, trees statics down. You can smooth out, level areas of your map now and then run T-paint again until your happy.

Here is a screeny from one of my WIP maps using this method. As you probably will notice i have adjusted the fog to the sky colour to give the best effect possible.




Advanced Stuff

Terragen...
You can use terragen to create the 3 textures the T-paint uses, you do this by creating the 3 colours and using the Terragen options to lay them on the surface, then by taking a BMP pic of the map layout you can use this as the colour and detailbig.bmp files that t-paint uses. There is a tutorial in the bf2 editor forums on this process.

T-paint
If you can remember i did say to untick delete temporary files when you T-paint your level. Now the colour big file you can load into Photoshop and use it to create your undergrowth file.

First in your map set up an undergrowth grass layer, paint it onto your terrain so it generates this file, Now in Photoshop load up your undergrowth.raw file and with your dropper tool note the colour that is used for your grass, note down the file information and the size of the file. Now open up colorbig.bmp and you will see red, green and blue sections indicating where the colour is on your map. If you are viewing in RGB mode just delete the red and blue layers so your left with just the green layer (grass), now resize your image to match the undergrowth raw file and change the green to the rgb values of the undergrowth raw file. Now save this as 1 channel, 8bits depth, greyscale, 1025x1025 for a 1024 map, 513 for a 512 map, 257 for a 256 map. Save and now your grass is exactly where your grass colour is. This saves time painting undergrowth on your surrounding map areas that people only really see from a distance, you can also do the same with the overgrowth file
.:XDR:.FRIJJ is offline
Last edited by .:XDR:.FRIJJ; 2006-08-01 at 19:42..
Reply With Quote
Old 2006-08-03, 17:40   #2
Abort
Unhappy

great tutorial. And awesome MOD. but i have a problem and i dont know what im doing wrong. All i want to do is use T-paint cause it seems like a quick way to get my map painted. I've followed your tutorial, starting from the T-paint section. Ive' made 2 test maps named "TEST" and "test1" both failed hooribly.
Instead of using terragen i just made a few bumps here and there to test tpaint out. ok ill start from the top with the problmes i have or questions.


ok when i select what textures i want to use. i convert them to tga format. i installed the dds plugin and when i open a dds file. it asks me if i want to use default. look.<BR><a href="http://img513.imageshack.us/my.php?image=dasgdsgdasgagadsou6.png" target="_blank"><img src="http://img513.imageshack.us/img513/1081/dasgdsgdasgagadsou6.th.png" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>

i dont know what to use so i just use default. then i save it as a 24/whatever tga. ok i understand that bit about putting the steep high abd low tgas into the folder.
When you say enable the surrounding terrain, do you mean right click the grey squares and select "create patch"? so they are all blue? im kind of confused on enabling surrounding terrain. so it should look like this right?
<a href="http://imageshack.us"><img src="http://img446.imageshack.us/img446/2057/tpaintfourm5dh5.gif" border="0" alt="Image Hosted by ImageShack.us" /></a>
to this
<a href="http://imageshack.us"><img src="http://img363.imageshack.us/img363/6692/tpaintfourm3cq1.gif" border="0" alt="Image Hosted by ImageShack.us" /></a>


Ok i did make them all blue if thats what i was supposed to do. then i have to go the heightmap generator thing. I right click it and im supposed to change it from 0 to 256. WELL, the thing is already at 257. hmmm i dont know why. so i change it to 256 like you said. and i run the bat file. this is what i get.
<a href="http://img363.imageshack.us/my.php?image=tpaintfourmbx8.gif" target="_blank"><img src="http://img363.imageshack.us/img363/5438/tpaintfourmbx8.th.gif" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>

So im like hmmm. no clue what that means but it wants me to change it back to 257. so i do that and run the heightmap generator again and ig et a succeesful message. i open up back my map. nothing. what am i supposed to see with the surrounding terrian? its just flat. so w/e. i go and use T-paint and copy the 3 folders to my level. it over writes it and its time to open my map. what do i see? a complete waste of my time. TWICE. no paint is on my map. i dont know what im doing wrong. maybe it might be my level settings, you know, when you create a new map. i just leave it at the default whcih is this.<a href="http://img446.imageshack.us/my.php?image=tpaintfourm4xy2.gif" target="_blank"><img src="http://img446.imageshack.us/img446/8755/tpaintfourm4xy2.th.gif" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>


Can someone please help me. i dont feel like spending 20 hours hand painting my map. T-paint sounds like a very useful program if it worked for me. Thanks
Abort is offline Reply With Quote
Old 2006-08-03, 18:53   #3
.:XDR:.FRIJJ
Retired PR Developer
Default

once you have enabled surrounding terrain and then used bf2 heightmap generator it should create all your secondary heightmaps. Load up editor and then in the render tab, draw surrounding terrain. What this does is mirrors your 1st terrain to make the surrounding terrain. If your original is flat or looks flat your surrounding terrain will look flat also.

With T-paint make sure its in your map folder mods/levels/yourmap/tpaint

you should have it like that, otherwise it will not know where your primary heightmap is. Also just double check you have high, low and steep tga files. Then run it and then transfer the folders from the Tpaint folder to
mods/bf2/levels/yourmap/editor not mods/bf2/levels/yourmap


I hope this helps as i made a similar miastake when using this for the first time.
.:XDR:.FRIJJ is offline Reply With Quote
Old 2006-08-04, 22:06   #4
Abort
Default

great thank you very much. it worked. i guess i put the 3 folders from tpaint into my level folder instead of the editor folder. but now on my surrounding terrain. theres these little squares. like the gird is appearing through the textures. any way i can fix this?
Abort is offline Reply With Quote
Old 2006-08-04, 23:57   #5
.:XDR:.FRIJJ
Retired PR Developer
Default

This only normally happens if you have created a map 1024x4 as the standard editor only supports 1024x2. I had this happen to me too mate.
.:XDR:.FRIJJ is offline Reply With Quote
Old 2006-09-23, 14:08   #6
TheCaptn
Default

Ok, I've followed the tutorial to the end but I have a problem. The detail textures are showing properly on the surrounding terrain but not on my main map... Any idea why that is?

Also, what's the neatest way to lay a winding road in along a steep mountain side? It should kind of wind its way up the mountain.

[edit]
Nevermind about the detail textures, I found the setting in the 'Render' menu... I have a new question though. Are the textures saved with the map itself, or are they loaded from a common source?
I'm just wondering if I can make a snow colour and a snow detail texture and use them in my map.

[edit2]
I just tried the map in-game for the first time. And I get these terrain glitches where parts of the terrain flicker in and out. The map is 512x4... Also, I keep getting killed because I'm out of bounds, but I guess that could be because I stuck my two temp flags right in the corners (you can't even see the MEC one because of that close-window 'X' on the main map).
Attached Thumbnails
terrainglitch.jpg  
TheCaptn is offline
Last edited by TheCaptn; 2006-09-24 at 01:41..
Reply With Quote
Old 2006-09-24, 13:22   #7
.:XDR:.FRIJJ
Retired PR Developer
Default

I am not sure but i think there is an issue with the x4 option, it seems to cause graphical problems.

To make snow you can use sand texture and choose a white colour only to paint on the map. This also makes a nice crunching sound when walked onto.

When testing your map make sure you have a combat area made, also make sure it is not inverted in the options otherwise when your inside it you will get killed instead of out side it.

Hope this helps
.:XDR:.FRIJJ is offline Reply With Quote
Old 2007-08-05, 14:47   #8
Evolution-VIII
Default

T Paint link its broken...

I've find this one:
http://tpaint.alffx.nl/bf2_tpaint_v0.33.rar
Evolution-VIII is offline Reply With Quote
Old 2008-05-01, 13:45   #9
space
Banned
Default

I had the same problem - you need to create a 1024 terrain in terragen and put the point scale ( think its that ) at 4. In the size box it should say that the area is 16sq km. Also dont forget this everytime you load a scale 4 map

How To Make A Scale 4 Map - Official BF Editor Forums

Download geocontrol and make a heightmap there in 1024 scale ( practice at lower scale to speed up renders and then protect terrain and scale it up to 1024 ) Then save terrain as a terr file. Open this in terragen with the above size settings. Then export it to heightprimary in 16bit raw in your level folder (overwrite existing file ) Should work now - took me ages to work that out!!!
space is offline Reply With Quote
Old 2008-05-01, 14:42   #10
Hans Martin Slayer
Retired PR Developer
Supporting Member

Hans Martin Slayer's Avatar
Default

ah, ok i see it now. i simply have to adjust the scale in terragen so it's 16sqm, yea i totally missed that..

makes all sense again now, hehe.

why are you using geocontrol btw? better handling? better results?

thanks for pointing this out man, that made my day..

i know i've read through the whole thread at bfeditor a while ago but i must have forgotten about it..

cheers, works fine now!
Hans Martin Slayer is offline Reply With Quote
Reply


Tags
56kers, bf2 or pr, making, map, terrain, tutorial, warning

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 17:39.