Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 57 Guests
Online:

LATEST FORUM THREADS

»
Hello
CoD2 SP Mapping
hi
CoD2 SP Mapping
Operation Pomegranate
CoD2 Map + Mod Releases

Tutorials

»
SOF2 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
EasyGen Terrain
Versions: You must be logged in to view history.
Creating custom terrain with the use of EasyGen.

I decided to modify this tutorial as the original was out of date and did not work correctly and after searching endless mapping forums and asking lots of questions i finally got it right and updated the easygen d/l with the things you need to make it work correctly and save you lot from going through the hassles I went through.

EasyGen Terrain, by [CE]Darkone modified by =TecH=***AcE***

This tutorial is written based o­n the fact that you have basic knowledge of GTK Radiant.

NOTE: This tutorial is based on Easygen v1.4.2, Photoshop 7, GTK v1.4.0

EASYGEN Setup:

1) Download EasyGen

2) Extract contents of easygen into a folder wherever you like (I made a folder called easygen in C:)

3) Now goto the folder you created for easygen and open easygen.exe

4) Since this is your first time running easygen you will have to set its directories:

a) First lets set the work mod. Set it to your sof2/base directory. example(C:Program FilesSoldier of Fortune II - Double Helixase)

b) Now lets set your bitmaps. I created a folder called bitmaps and put it in my easygen folder. (c:/easygen/bitmaps)

c) Next is import folders and a setting for bitmaps.
set it to the same folder as above for bitmaps.

Thats it for setting up easygen.

Note: The next step you dont have to if you have already extracted the textures/shaders for radiant.

Now we will setup your SOF2 Directory

All we have to do here is extract your textures and shaders:

a) First open therest.pk3.

b) Next extract the folder named shaders to your SOF2 base directory.

c) Now lets open textures0.pk3

d) Extract the folder called textures to your SOF2 Directory.

Thats about it for setting everything up.

Creating your heightmap:

You can use almost any Photo Editor to do this but i prefer Photoshop so the tutorial will be based o­n photoshop 7.

1) Open photoshop and create a new image 1024X1024 RGB 72dpi with a white background.

2) We now need to set your foreground and background colors.

3) Set your foreground color by selecting it from your left side toolbar.

4) On the right side toolbar by default you will see your RGB color sliders. Click the tab there for swatches & set your foreground to 30% grey

5) Now go back to your left toolbar and select your background color.

6) On the right side again set your background to 70% grey

7) Reselect your foreground color from the left toolbar.

8) Now o­nto the image.

9) Set your feathering to 20 pixels from the top tollbar. this will give a more rounded look to your mountains. You should have a big white image sitting in front of you as of now. We need to give it some texture to make it work right.

10) Goto your filters button o­n the top toolbar and choose filter/render/clouds

11) ok now we have a smoke/cloud looking image.

pic1.jpg

From your left toolbar click the lasso tool.We are going to make your mountains now.(highest points) Trace out an outline of your outer mountain border.

12) Now we need to highlight the selsected area. From the top toolbar choose image/adjustments/brightness & contrast. Set the brightness to 84 and contrast to 14. You should see the selected area highlight a whiter color then the rest.

pic3.jpg

13) Now lets make some valleys.(lower points) Valleys can be used for just that or for rivers,streams, & lakes. Use your lasso tool and draw the area you want for your lake. Once selected choose from the top toolbar again image/adjustments/brightness & contrast. This time set it to -84 brightness and -14 contrast. If you want it deeper/darker just repeat this step again. Ok, now that you have your mountains & valleys done its time to put o­n the final touches.

14) From the top toolbar choose filter/blur/gaussian blur. set the blur amount to between 4 and 5.

15) Next we have to remove all color codes and make it greyscale o­nly. From the top toolbar choose mode/greyscale. click yes to remove all color code.

16) For the final touch we need to resize the image. From the top toolbar choose image/resize image/ set it to 64x64 pixels.

17) The final step is to save the file as a bitmap.

18) From the top toolbar choose file/save as, choose bmp give it a name and save it as windows 8bit bmp. Thats it, now just put the image in C:/easygen/bitmaps.

Now o­nto Creating the terrain in easygen.

Creating the terrain

Now that you have Easygen setup, your SOF2 textures & shaders are extracted,
we can now move o­nto creating the terrain mesh.

To do this click the import bitmap button in easygen.

 

Creating the terrain:
Now that you have Easygen setup, your SOF2 textures & shaders are extracted, we can now move o­nto creating the terrain mesh.

To do this click the import bitmap button in easygen.

pic4_sm.jpg

Once you click import bmp click browse and point it to your bitmap and click ok. Now you will have your terrain image loaded. It dont look much like terrain as of now but it will in a minute. On the left side you should see a bunch of settings. Right now we are going to look at divisions. By default it should be set to 63. We need to change this to 64.
I havent seen any problems with the setting 63 but i have been told that quake3 engines like divisions of 4 so I set it there as a precaution. set the setting to 64 and 64 and click apply. Widths should be default at 8064 and 8064, if not its a good idea to set it there. Division widths i set at 128 and 128. And max height i prefer 2048. You can go higher if you want higher mountains & deeper valleys. These are the settings I use because they seem to work out very nicely. You should now have a terrain looking mesh in grey and white colors.

pic5_sm.jpg

Next step is to add some color to this mesh. From the top toolbar choose textures/add folder. point it to your textures/colombia fold and click ok, As in radiant the textures will take some time to load. o­nce loaded we need to tell easygen to show the textures. From the top toolbar choose view/ and choose texture. Ok now your mesh should have changed colors and textures are loaded. Now we will start setting up the alphamap texture and add your first texture to the terrain mesh. Right below the top toolbar o­n the left side you will see a button called alphamap. Click that and choose the top left box & choose red as your color. Scroll down the texture window and choose colombia/new_grass by clicking the texture in the window. Your terrain mesh should now be covered by that texture in the 3d window.

Ok next we will now choose the second box in the black grid. same place as where we chose the very top left box,
but this time we will choose the o­ne right next to it This time choose yellow as its color. Now we need to choose a texture. scroll down the texture window to
colombia/new_big_rock and click it. notice there was no change in the terrain mesh in the 3d window?
thats because we have to paint it o­n ourselves. We will use this to make our mountains look like rock.
In the 3d window hold down ctrl & shift together and use your left mouse button to paint the texture o­n.
Hey looking good eh? Dont worry it will look even better soon.
Ok lets add o­ne more texture. goto the alphamap grid and now choose the 3rd box and make its color blue.
Scroll down to the texture colombia/dirt_terrain1. (its pretty far down the list of textures)
You can paint this texture for like paths,roads, lake bottoms,ect...

NOTE: Be careful not to add more then 2 textures to a single gridblock. Q3 engine games can o­nly have 2 textures blend o­n o­ne gridblock at a time. If you have more then 2 textures o­n a single gridblock you will see black polygon

If this happens simply click o­ne of the other blocks in the aplha map grid and repaint back over it.)

Thats about it. time to save it. click file/save as and give it a name.(advised to keep the original name so you dont get all confused.)

Here should be what your terrain mesh should look similar to.

Ok lets export this baby. Up top where you imported your bitmap you will see "exp MAP". that means export map. Go ahead and click that. A box should come up, heres the settings we need to change. First make sure save map, save metashader, & save alphamap are all checked. Next uncheck the box for insert into a skybox and uncheck include models.

And finally towards the bottom you have to change the common/caulk to tools/_caulk and the terrain to common/terrain, your export window should look similar to this now.

pic12_sm_1.jpg

Now click continue. Give your map the same name as you saved it in easygen and click save.

Ok now we are done with easygen so go ahead and close easygen.

Now your map,metashader, & alphamap have been saved into your sof2/base directory, but not all in the right place and not all information added to the shader. So we still have more work to do.

Ok now we are done with easygen so go ahead and close easygen.

Now your map,metashader, & alphamap have been saved into your sof2/base directory, but not all in the right place. So we still have more work to do. :(

Goto your SOF2/base directory and you should see yourmapname.pcx image file sitting in there somewhere. Move that file to textures/heightmaps. Next you will see a folder in sof2/base called scripts. Thats where your shader is open the shader with notpad/wordpad here's what mine looks like before adding the extra lines. (NOTE) I only used 2 textures for this map, NOT 3 as shown in the above pix.

textures/terrain_test/terrain_0
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
{
map textures/colombia/new_grass.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain_1
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
{
map textures/colombia/new_big_rock.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain_0to1
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )

{
map textures/colombia/new_grass.jpg
}
{
map textures/colombia/new_big_rock.jpg
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain.vertex
{
{
map textures/colombia/new_grass.jpg
rgbGen vertex
}
}


Now you need to add this line ( q3map_material ) and whatever material it might be that your texture is, For this example 1 of the textures doesn't have a shader or a material so i'll be adding the material that is closest to the texture wich is "ShortGrass" So add the lines as shown below.

textures/terrain_test/terrain_0
{
q3map_lightmapsamplesize 64
q3map_material ShortGrass ----------------------HERE
q3map_lightmapaxis z
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
{
map textures/colombia/new_grass.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain_1
{
q3map_lightmapsamplesize 64
q3map_material Rock ------------------------ AND HERE
q3map_lightmapaxis z
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
{
map textures/colombia/new_big_rock.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain_0to1
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )

{
map textures/colombia/new_grass.jpg
}
{
map textures/colombia/new_big_rock.jpg
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain.vertex
{
{
map textures/colombia/new_grass.jpg
rgbGen vertex
}
}

Now close the file and save the changes and move that yourmapname.shader to sof2/base/shaders. Next in the shaders folder locate the file called shaders.txt open it up and add your shaders name to the bottom of the list then close and save.

Ok now given you followed the setup correctly your map should be in your sof2/base/maps directory. If so close the window and open gtk radiant. Ok first things first lets get your terrain entity setup to work for sof2. Load up your map in gtk radiant or whatever version of radiant your using. Once opened choose edit/entity info. choose func_group and your terrain all should now be selected now close that window while highlighted hit the N key to bring up your entity info box. Scroll down and find the alphamap key and value. click it and edit the value. Default should be key: aphamap value: yourmapname.pcx we need to change the value to textures/heightmaps/yourmapname.pcx hit enter to add the updated info and close the entity info window.

Its now time to add your sky texture & info/player deathmatch spawn.

Lets load up the sky textures and choose the sky col10 for your sky.

Add your deathmatch spawnpoint and compile your map pk3 files and test your map.

maps/yourmap.bsp

shaders/yourmap.shader

scripts/yourmap.arena

Thats it! you have made terrain.

TIPS: If you use a solid grey for your background instead of render/clouds you will have a more flat ground. If you do so i reccomend when you make your mountains shape with the lasso tool render/clouds that selected area before you set the brightness & contrast so your mountais still have more shape.

_____________________________________________

Update:

A PROBLEM I RAN INTO

After compiling the map above I found I had black patches all over the map so again I went on the hunt for answers and found that editing the shader again and editing lines that say q3map_lightmapsamplesize 64 change it so they say q3map_lightmapsamplesize 32 and adding another line that says q3map_lightmapmergable. So my shader now looks like this.

textures/terrain_test/terrain_0
{
q3map_lightmapsamplesize 32--------------here
q3map_lightmapaxis z
q3map_lightmapmergable --------------here
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
{
map textures/colombia/new_grass.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain_1
{
q3map_lightmapsamplesize 32--------------here
q3map_lightmapaxis z
q3map_lightmapmergable --------------here
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
{
map textures/colombia/new_big_rock.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain_0to1
{
q3map_lightmapsamplesize 32 --------------here
q3map_lightmapaxis z
q3map_lightmapmergable --------------here
q3map_texturesize 1024 1024
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )

{
map textures/colombia/new_grass.jpg
}
{
map textures/colombia/new_big_rock.jpg
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/terrain_test/terrain.vertex
{
{
map textures/colombia/new_grass.jpg
rgbGen vertex
}
}

After that I updated my shader in base/shaders and recompiled my map and no black patches anywhere.

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»