EA official tutorials: Terrain editor Leveleditor Custom Mod Setup Understanding Heightmaps Build the Bunker - 3ds Max Build the Bunker - Maya Import the Bunker Build the Car - Maya Import the Car Create new team - Maya Create new team - 3ds Max Create new kits - Maya and Max
Mapping - General
Mapping - Texturing
Mapping - Heightmaps
Mapping - Lightmapping
Mapping - Downloads
3D modelling/texturing
Coding |
Texture system in bf2/bf2editorby Fenring In my experiences the most diffcult thing to get a grip of in levelediting in Battlefield 2 is the texturing system and how it works. To get a understanding of the system I had to rely on many diffrent sources and a whole deal of trial and error. I'll now try to assemble the most important information so you can concentrate on creating beautiful terrain for FH2 instead of scratching your heads. This tutorial presumes that you have read Lawrence Browns basic tutorials to get a grip of the bf2editor.
Relevant links: Index: The default battlefield 2 terrain textures can be found in common_client.zip->terrain/textures/ in your battlefield 2/mods/bf2 directory. ColormapsThe textures in battlefield 2 consists of a color and a detailtexture, the colortexture , as the name suggest, gives the terrain its color in combination with the the level lightsettings. The colormaps also acts as your terrain on longer distances togheter with the lowdetailtexture, how much or how little depends on what graphic settings, if lower you will almost not see your close up detailtexture at all. This can be good to know if one has lower end systems in mind when constructing a map and test on both settings. Colormaps can be created from:
DetailmapsThe detailmap is what you see closeup in the terrain. This is most often orthographic greyscale images of grass, rock, sand, gravel,dirt, mud and so on. You can have a maximum of 6 detailtextures in your map so choose them visely. The official DICE recomendation is to place the following types of detailtextures in the layer number:
Dont forget to utilize as many different materials as you can to get the most out of the bf2 engine, in Forgotten Hope 2 veichles will behave according to the surface they are traveling on. Important! If the detailtexture contains color it will override your colormaps and could look ugly, be especially careful when applying some grass in desert with the default detail textures. Detailtextures will also brighten the terrain depending on the individual lightness, you should experiment until you get the result you want. Also switch between lowdetail texture and detail texture mode to check colors. The LowDetailType setting should be as follows:
Also lowdetail 2 (rock) should always have sidetiling enabled (Planemap "1") , otherwise you will get ugly texture transformations when movin towards the mountain. Also dont forget that toptiling has no affect with this setting, set sidetiling to something like 32/16 or 64/32 otherwise your mountain will look very blurred on close distance. This information is for those who intended to use an external programs to create detailmaps, but could be intresting for those who whish to know how the bf2 texture system works in detail: The detail layers are represented in a form of a texture, this texture covers your entire map and is also named detailmap. The 6 detail layers are divided up into two sections and each layer has a color value. Each color then represents a layer you select in the bf2editor. Layer 1, Layer 2, Layer 3, Layer 4, Layer 5 and Layer 6. Layer 1 has Blue 1-255, Green 1-255 and so on. When at value 255 the texture is a 100% strenght and nothing will show trough, the lower the value the more transperacy between the layers you get. If the color of layer 1 is a pure color value of like Blue 200 Green 55 Red 0 layer 2 will show trough with a opacity value of 55. The maximum RGB color value must always be a total of 255 Therefore when using external programs like Terragen or Ecomap to generate detailmaps one must always convert to a indexed palette and reconvert to RGB so that all coulours have a maximum value of 255. Otherwise youre detailtextures will become to bright or to dark. Black color creates a hole for section 2 to fill. Therefore there is always two versions of the same tile _1.dds and _2.dds. Where the color is black the layer above and below will show trough, any pixel deviation between the two textures will cause your detailtextures to be ugly islands of very bright detailtexture that doesnt blend very well.
Edit your color- and detailtextures If you want to edit the detail- and colortextures in Photoshop you can find them in /battlefield 2/mods/yourmod/yourlevel/editor/colormaps/.Note you will need Nvdia DDS plugin to open these files. You could also create completely new ones. Cgtextures is a good resource for textures suitable as detailtextures. Use Photoshop, Mapzone or TextureMaker to make them seamless. Save your modfied texture with some different name like detail_dirt_mymap or your new texture as something that doesn't already exist in the editors list of textures. Save as 512x512 BMP since the editor will automaticly copy and convert these to dds for your mod when you use the importer (+ sign in your detail colortexture selection.
LowdetailmapFor genrerating the editors lowdetailmaps you should create your own lowdetailmap this texture defines how your texture looks on a distance. Important! and because of this you should always select 3 detailtextures as a base for your map, 2 textures for rocky (horizontal and vertical lowdetailtype 2) and one for the sligtly rudged surfaces like gravel/grass/mud (lowdetailtype 1). I use a rock texture for my vertical lowdetailtype 2, this should be the same as your detailtexture. For the slightly bumby surfaces (lowdetailtype 1) i choose a sand texture to match my detail that covers most of the map. Lowdetailtype 0 obviously doesn't have a lowdetailtexture so it's not needed in your lowdetailtexture.
In Photoshop create a new 512x512 picture, open your alpha channels and copy the textures as described above. The end result should look something like this:
Save this file in /battlefield 2/bf2editor/rawdata/common/terrain/textures/lowdetail/mylevel.dds as a 5.6.5 RGB with 5 MIP maps. If you have succeded the file should be the size of 683kb or the same as defaultlowdetail.dds. Now you can select your file in bf2editor and generate your unique lowdetailmaps. If you get some errors like black terrain youll probably have to many MIP maps, use Nvidia WTV tool to check the exact number of mip maps anything above or below 5 will cause errors with your lowdetailtexture. Some more tips for creating lowdetailtexture: Right click on any layer, flatten image, ctrl+a to select everything. ctrl+c to copy, ctrl+v paste it into your blue alpha channel as described above.
As viewed in this example from above the terrain:
FarTopTilingHi: 6 (lower numbers look better from above and less tiled) FarTopTilingHi: 32 (same resolution as default detailmaps and very annoying tiles from above) FarTopTilingLow: Your lowdetailtexture is always used as both detailtexture and lowdetailtexture when the client uses lowest graphics settings, therefore this should be kept as 32 in most cases to keep detail closeup for computers with low graphic settings. May need to be increased on maps with water since it seems to affect the "watertiling" to. FarSideTiling: How lowdetail 2 textures are tiled, for small pieces of FarYOffset: Im not 100% sure what this one does but according to the DICE guys it could be used to " Offset the side mapped detail vertically" LodSwitchDistance: Sets the the distance when the terrain should switch to the lowdetailtexture, seems to only affect the editor. A value of 0 is good to see how your detailtextures look and what areas they cover. Surrounding terrain
|
|||||||||||||||||||||||