synthesis logo

Texturing BF2 StaticMesh's

This is how I am texturing StaticMeshes for Bf2, its not necc. the only way, nor is it necc. the best way. It is just how I am doing it, with decent results.

I am going to assume you have some basic knowledge of 3DSM, for this instance I am using Max 7, but the general idea should work for just about any version and also Gmax.

Basic Tools (Open Beta Mod Tools)
3DSM Tools by Rexman
Nvidia DDS Authoring Tools
Example Max Scene and Textures
Mod Tutorials

Texture Information

BF2 uses a directX shader that lets us blend several textures together to create many different combinations with a relatively small texture load. The idea being the smaller the texture load, the less information will have to be called by videocards. This is a big step from BFV and BF42, its also quite a bit more challenging to work with. I will explain the different 'layers' of textures then how I am applying them to staticobjects. The majority of this information was in 'modder info pack #3'.

Color Layer
UV Channel 1
my example is 512x2048
texture must be named with a _c
DXT1 (no alpha)

This layer is just to provide basic color to your model. It can be stretched to just about any extremes.

Detail Layer
UV Channel 2
my example is 256x2048
texture must be named with a _de
DXT5 (alpha controls specular, light colors = shiny, dark = matte)

This layer is probably the most important layer used on a static. It is the detail layer, its function is to add details to the Color Layer. Think of it like the multiply function in photoshop.

This texture is a 'per pixel' texture, you need to be extremely careful in your modeling so that this layer can be used properly. To get the best optimization for this texture, your texture should be 1 pixel per cm in your model. So, if you have a 5 meter tall building, your texture should be 500 pixels tall to match the building.

Detail Normal
UV Channel 2
my example is 256x2048
texture must be named with a _deb
DXT1 if no transparency

The alpha channel of this layer controls object transparency, for things like windows and cutouts. If this texture contains transparency, save as DXT 5 (not DXT 3)

This is essentially a copy of the _de layer with the nvidia normalmap filter applied to it. It controls the 'bump' of your detail texture.

Dirt Layer
UV Channel 3
my example is 256x2048
texture must be named with a _di
DXT1 (no alpha)

This layer is another additive layer, it adds to the color and detail layers and is used normally for dirt or grime to help breakup the detail tiling. It isn't a 'per pixel' layer so it just needs to be applied at a resolution that looks good.

Crack/Decal Layer
UV Channel 4
my example is 256x2048
texture must be named with a _cr
DXT5 (alpha controls the stencil, white = not applied, black = 100% applied)

Use this layer for signs, rugs, anything you want applied over the top of the other layers (not additive like the detail and dirt layers).

The alpha channel of this layer is the stencil. Black is transparent, white is opaque. This means that wherever the alpha channel in this layer is black, the color from the other layers shows through.

Crack/Decal Normal
UV Channel 4
my example is 256x2048
DXT1 (no alpha)

This is essentially a copy of the _cr layer with the nvidia normalmap filter applied to it. It controls the 'bump' of your crack/decal texture.

Note: You don't need to use all of these textures on every static, it might be advantageous to use less to keep texture loads down a bit.

Texture Application

One of the first things you need to know about texturing is that you need to think ahead quite a bit to make the application of textures easier. The detail layer requires a per pixel layout, so you should build with that in mind. If you detail textures are 512 tall, you should make the 'cuts' in your models 5.12 meters tall.

You should also get in the habit of saving your models into your bf2editor/RawData/Objects/StaticObjects folder. I have setup a folder hiarchy in my example file that is built on this system. When you have configured your exporter correctly this will make exporting much simpler. I am not going to explain setting up the exporter or exporting, that is done well enough in the official exporting the bunker tutorial, you can get that here.

Get the scene used in this tutorial here

Make a Basic Shape and setup your shader


Make a box that is 15meters wide x 15 meters long x 5 meters tall.

Setup your shader as shown with the textures supplied with the example scene. Also set your technique as shown.

Unwrap and apply your Color layer (uvw channel 1)

Apply a Unwrap UVW modifier and unwrap your object, I like to do my color layer in the edit uvw's window with the texture in the background. This helps me keep my color layer dirt (a good way to skip adding a dirt layer is to add some color variation to your color layer in place of the additional texture) lined up. This is all done on channel 1 (as explained in the texture information above)
Detail Layer (uvw channel 2)


Because this is a 'per pixel' texture, I like to apply it using planar mapping instead of using a traditional unwrap uvw. It might be a good idea to flatten map your whole channel 2 and shrink its uvw to the side so that if you miss any faces in your planer mapping you can catch them later.

I select faces on a common side of the model using the select face modifier, then I add a UVW Mapping modifier. Notice the size and type in the mapping parameters. The size of my texture sheet is 2048x256, this means (since its a per pixel texture) that the size of my 'gizmo' will be 20.48 meters (2048 cm) x 2.56 meters (256 centimeters). You can then select 'gizmo' in the stack and emancipate the texture sheet in realtime in your window. There are other ways of doing this, but I find that I can be extremely accurate with my texture application this way. You will get ENORMOUS stacks on complex buildings. You can flatten the stack anytime, just remap the faces if you don't like how they look.

I will then go back and unwrap the channel 2 to check and see if i missed any faces (the ones I moved to the side earlier). If I did, this makes it a lot easier to find.

Dirt Layer (uvw channel 3)

I usually map this channel in the same way I do the detail layer. You can increase the size of this texture without any optimization issues. This layer isn't very noticeable in my example file... my example file is kinda ugly honestly ;) It will be a lot more noticeable ingame and on lighter textures.
Crack/Decal layer (uvw channel 4)

I should have planned my example model a little better and made some cuts for applying this decal, but the idea is still there. I applied this layer using the same method as the detail and dirt layers.
If you arent using some of the layers, you need to add a uvw clear modifier on whatever channels you are not using. Be sure to set the shader's technique to the right settings for whatever channels you decide to use
I hope this helps someone. The texture system is pretty tricky, but very rewarding once you have a grasp on what you are doing with it. You are welcome to post in my forums if you have any issues, here is the forum thread.