This tutorial is created by hozz, and why i late to post it? Because i always forgot to post it here, i have a problem with my mind and myself. So i hope you guys forgive me for this late post. So without much talking anymore, this is the tutorial about making terrain for ETQW for everyone from the old forums by hozz.
The Tutorial Start Here
Hello everyone!
This is meant to be a very very simple ‘click here, press this button there’ tutorial on making a working terrain for your ETQW map. It’s written for people with no experience with 3D modeling and everything else at all (like me). It reflects how i made my first working terrain.
I decided to collect in this thread all necessary information which i found in tutorials, the modwiki, the forums (thx to everyone who helps here!), and by just trying things.
So here is the
Step-by-Step Terrain in ETQW’ Tutorial (newbie flavor)
For this guide, you should already know how to:
make a simple map in editworld (simple brushes, player start, atmosphere, outsideportal)
make a caulk hull
So, let’s make a terrain now!
Part One: Creating your terrain, and making a heightmap from it
To create a terrain, i recommend using the easy-to-use, but powerful EarthSculptor. Everything EarthScupltor related, foremost a great video tutorial for it, can be found here: http://community.enemyterritory.com/...ad.php?t=18393
After you created your terrain, make a heightmap from it. A heightmap is a grey-scale image where black=lowest, white=highest, shades of grey=everything in between. In EarthSculptor: menu Export->Heightmap Image. For easy reference, i assume you name it heightmap.png.
Part Two: From a heightmap to a 3D terrain model in Blender
NEW AND SHINY: video tutorial for this part (made by crumblycake): http://www.youtube.com/watch?v=n4oeTTKvxBQ
This part is mostly stolen from the Creating Blender Terrain tutorial (does no longer exist - A HUGE thanks to the author, MadJack!). A similar tutorial can be found here: http://www.etqwmapping.com/articles/...from_heightmap. So, if i’m unclear in some point, compare to the this tutorial (it has pretty pictures, too).
Now you need a 3D modeling application. This guide uses Blender, which is free and can be dl’ed here: http://www.blender.org/download/get-blender/ . Blender itself needs an install of Python, download Python here: http://python.org/download/ .
Install Python, then install Blender. This part was done using Blender 2.45, no guarantee for other versions!
Info: if you used EarthSculptor, you can directly export your terrain to a 3D mesh (export->.obj export->change LOD to 1.0 and click ‘run’). You can skip the following steps 1 to 6, continue with step 7).
-
Start Blender, you see a 3D window with a pink (=selected) cube at the top, and a tab area with ‘everything else’ below.
The most basic Blender keys are: mouse wheel=zoom, right click=select, hold middle mouse button+move mouse=move camera in 3D window. CTRL+Z = undo. Do not accidentally left-click anywhere. -
Delete everything
Press a to deselect the cube, press a again to select everything. Then hit DEL and confirm the deletion (enter or click the appearing confirmation message).
- Create a grid mesh
With your mouse hovering over the 3D window, press space and select Add->Mesh->Grid. A window appears where you can enter the grid dimensions (default: 32 x 32). You can use any numbers you want. Click a number and hold+move the mouse left/right to change it. Alternatively, you can shift+click into a number field,then enter the number manually, then press ENTER to confirm it (this works for every number field in Blender!). For the start, we’ll create a sqare grid.
Choose either 64x64 (small), 128x128 (standard) or 256x256 (big, don’t use this now) size. This affects only the terrains detail level, it has nothing to do with the actual in-game size! (If you choose 65x65, 129x129, or 257x257 instead, the heightmap-to-3D conversion might not be perfect, but the terrain model will align with editWorld’s grid for better overview when map-editing.)
For an easy start, select 64x64, and click OK. The yellow (=selected) grid mesh will appear in the 3D window. Use your mouse wheel to zoom, so you have a good view of it.
- Load the heightmap onto your terrain
Press F5. The tab area below the 3D window will change. Click the add new button you find there (in the Links and Pipeline tab).
Press F6. Click the add new button in the Texture tab (almost same place as the one before). In the Texture Type drop down menu which appears just right of the add new button, click on none and select image. An Image tab appears on the very right. Here click on load, and Blender’s file browser opens. Browse to where your heightmap.png is located, click it once, and then click the SELECT IMAGE button at the top right.
Finally, in the Map Image tab, click the Extend button (must be dark blue instead of light blue).
- Create actual height
Right now, your terrain is flat. On the bottom left of the 3D window, select View->Side (or Front) to see your terrain from the side. Yep, it’s flat.
Press F9. In the tab area below the 3D window, 5 tabs appear. The middle one is called Mesh Tools. Click the Noise button there (in the second line) several times to grow your terrain. You can also switch from orthographic to perspective view the same way you did from top view to side view. Hold your middle mouse button and move the mouse to move the camera and have a look at your terrain. Feels like flying the Tormentor the first time, doesn’t it? ‘Noise’ more until you’re happy (if you have pushed too hard, CTRL+Z = undo). You can press TAB at any point to get a better view of the terrain, press TAB again to return to ‘yellow grid mode’.
For security reasons, return to top view (and orthographic, if you changed it) when you are done.
[Hint: Instead of pressing the noise button, you can also use a displace modifier. This allows for more control of positioning and height of the terrain. Read here how to use the displace modifier: http://www.etqwmapping.com/articles/...from_heightmap. ]
- UV map your terrain
This part is needed so your terrain can be properly textured. Important: change your view to top (and orthographic) if you have not done yet!
Move your mouse over the dividing line between the 3D window and the tab area. The mouse pointer will change to a double arrow. Right click here and select Split areas, then move your mouse onto your
3D window, and left click. Now you have 2 3D windows.
In the right one, click the Grid icon (called Window Type button, at the very bottom left of the 3D window) and select UV/Image Editor.
In the left one, click on Object Mode and change it to UV Face Select.
In the right one, click on Image->Open and load your heightmap.png.
Move the mouse over the left one, press u, and select Project from View (Bounds).
Now move your mouse over the dividing line between the 2 3D windows, right click, select Join Areas, move your mouse over the right one (big fat arrow points right), and click to join the areas.
One 3D window again!
- Change Blender’s grid settings, then scale your terrain
In the 3D window, at the bottom left, click View->View Properties. A small ‘view properties’ window opens. You must change some values here (remember, SHIFT+click allows you to input the numbers manually. Press ENTER to confirm).
Change Spacing to 8, Lines to 64, Divisions to 8. Also change Clip Start to 1, Clip End to 80000. Close the view properties window.
Now press TAB until your terrain is NOT a yellow grid. Press n and a small Transform Properties window opens. This is where you scale your terrain. One unit is one unit in editWorld (equivalent to one inch in real life).
The terrain dimensions are the numbers in the DimX/DimY/DimZ area. Click the Link Scale button (must be dark blue).
You can use any dimensions you want, i recommend using a DimX value of 32768 (same size as ETQW retail terrains), or 16384 if you want a small terrain.
For now, change the DimX value to 32768, and confirm. The DimY/DimZ values should change accordingly (as the grid mesh is sqare, the DimY will be 32768 too, the DimZ depends on how much you ‘noised’). Close the Transform Properties window, and zoom your view out until you see your now-16000-times-bigger terrain again.
- Triangulate your terrain
Press TAB if your terrain is not in ‘yellow grid mode’. Then hover the mouse over it, press space, select Edit->Faces->Convert to Triangles.
Now you’re done with the Blender part! You should now save the file in Blender, if you haven’t yet.
- Export your terrain
In Blender, at the top File menu, select Export-> Wavefront (.OBJ). Blender’s file browser opens, save it where you want. I’ll call it terrain.obj from now on! This is your final terrain model file.
When you clicked the EXPORT WAVEFRONT OBJ button, an Export window appears, with several options to activate/deactivate. Ignore them and click OK on the right.
Blender also creates a terrain.mtl file, yo can delete it (if you un-check [=light blue] the “materials” button in the wavefront “export” window, this superfluous .mtl file will not be created).
Now you’re REALLY done with Blender, you can close it.
Part Three: Making your terrain show a megatexture
You have to text-edit the terrain.obj file you just created. Open it with Wordpad or any other text editor. Use the search function to find a line starting with ‘usemtl’. It will look like this: usemtl Material.001_heightmap.png.
Change this line to usemtl megatextures__quarry (these are two underscores between megatextures and quarry). This will display the Quarry megatexture on your terrain, instead you can use any other map’s one, or name your own megatexture if you created one. For refinery, change the line to usemtl megatextures__refinery, for your own megatexture usemtl megatextures__mymegatexture.
Save and close the terrain.obj file. Your terrain model is finished.
Part Four: Getting the terrain into your map
Finally some real mapping!
Move the terrain.obj to your ‘…/SDK 1.4/base/models/terrain’ folder.
Start editWorld. In the 2D and Textures window, select the Terrain Editor tab. Right click in the left white area of it, and select new->tree. In the center section of the Terrain Editor window, click on the model field, and load your terrain model. Press ENTER to confirm.
Now the terrain has appeared in editWorld’s Camera and 2D windows.
You can now add a caulk hull, player start, atmosphere, outsideportal and have a look at your brand new terrain.
Given you use an existing megatexture, the tutorial ends here. But in case you want do design your own one, read on!
Part Five: Making your own megatexture
-
Make a megatexture material
Go to your …/SDK 1.4/base/materials folder and create an empty text file. Insert the following text:
material megatextures/mymap { useTemplate megatextures/default_ambient< “mymap” > }
Then rename the file to mymap.mtr. This is the material which is assigned to your terrain model (the .obj file), so the ‘usemtl’ line in the .obj must point to this material (here, it will be usemtl megatextures__mymap).
Info: the second part in the material itself defines the megatexture’s filename. So, if you use
material megatextures/mymap { useTemplate megatextures/default_ambient< “quarry” > },
you will have created your custom material (mymap.mtr), but it points to the Quarry megatexture, and so the Quarry megatexture will be drawn onto your terrain.
In order to prevent errors, your editWorld map (the .world file) should have the same name like the material file (here: mymap.world). -
Paint the megatexture
I will not explain this one, as it is perfectly described in the modwiki: http://wiki.splashdamage.com/index.p...st_Megatexture. You can go right to the second point (creating the surface tree) there.
Textures for terrain painting are not included in the SDK, you can download the original ones here: http://community.enemyterritory.com/...ad.php?t=21217
Additionally, you can use MoP’s textures which can be found here: http://community.enemyterritory.com/...ad.php?t=19326. Thanks MoP for these!
ThermalFusion also made textures for megatexture painting, including a road! Get them here: http://community.enemyterritory.com/...ad.php?t=20357.
You have to extract all custom textures to your …/SDK 1.4/base/textures/megagen folder.
- Generate your megatexture
Again, this is perfectly described in the modwiki: http://wiki.splashdamage.com/index.p…_a_MegaTexture
The mentioned RenderLight template (.rlt file) must be placed in your …/SDK 1.4/base/renderlight folder. Also, you just have to do an entities-only-compile before you bake the megatexture, no full compile (the modwiki tut says ‘full compile’, but it works with entity-only too, and a full compile will take ages as your megatexture does not exist then).
- Don’t forget to compile your map
After the megatexture generation, open editWorld, click Compile->1 - Normal Compile. Thats it, press F2 to play your map!
Info: the compile should not take longer than 3 minutes (usually just a few seconds). If longer, something is wrong with your megatexture (not existing, missing material,…). Compiling is totally megatexture independent, but you must do it once. It creates collision models, bot data, and much more. If you do it before megatexture creation, it will take ages. If you do it with an existing megatexture, it will be very fast (the result will be the same in both cases).
- Detail textures
Detail textures are voluntary, but your megatexture will look very pixelated from close without them (for example check out the 1st attached image, it has no detail textures).
The point is: even if you setup detail textures, they will not be visible by the default procedure as described above. You have to do an additional step.
Read here how to setup your detail textures (1st post) and how to generate the detail texture mask which actually makes your detail textures show (2nd post): http://community.enemyterritory.com/...ad.php?t=23209
Now you’re completely done . From creating a heightmap to creating your own .mega, you have made your terrain.
If you want to play the map in the Retail game (not from editWorld by pressing F2), copy your .mtr to your ETQW/base/materials folder, and your terrain model (the .obj) to ETQW/base/models/terrain.
For detailed info on heightmap and megatexture editing, make sure to read the according modwiki tutorials!
The Tutorial End Here