Jump to content
Official BF Editor Forums

The Very Basic Of Texture Palettes


Recommended Posts

Hey all.

[R-DEV]tonnie15 has been nagging me to teach him about BF2's texture palettes system for some time so thought it might be time to make this very long overdue tut :P

Essentially when working with texture palettes, your basic work flow is the complete opposite to what you would be doing if crating a normal vehicle/weapon model for pretty much any game. Where with a normal model, you texture to the UV Map, with texture palettes you are UVing to the texture. This basic backwards work flow can be pretty hard to grasp at first if you have already learnt how to work with the normal work flow, but really isn't that much harder if you are starting off from scratch since you need to relearn a load of stuff if you have grasped the normal work flow and if your starting off from scratch, you need to grasp the basics of UV mapping.

This tut requires you have a basic understanding of UV mapping, have your 3DsMax setup with some kind of BF2 max tools, I recommend using the POE2 3DsMax Tools as found HERE and it helps if you have a basic understanding of modelling and you have a "PR_EDIT" setup as per this tut HERE.

In this tut you will basically be turning this wall:


Into this by using vBF2 Texture Palettes.


Anyways to kick this tut off, here is my very basic wall model I've very quickly made for this tut that contains no UVs etc, just the bare clay model.


You can download the model here if you want to follow this tut with the same model which I would recommend. This file is compatible with 3DsMax9 and above.

Download: http://realitymodfiles.com/rhino/tuts/palettes_tut_start.rar (12kb)

For this tut I'm only going to use vbf2 textures so you can easily grasp the concept of texture palettes.

First thing I need to apply a colour texture to my wall. For this wall I'm going to aim for a grayish concrete colour, so first thing to do is find a colour texture that is appropriate inside one of the palettes. There are some pretty good grayish concrete colour textures inside the common_01_c.dds


This texture can be found here, thou you may need to extract it out of the vBF2 object_client files into your PR_EDIT: \objects\staticobjects\common\textures\common_01_c.dds

Now in Max's Material Editor, make a new bf2 staticmesh 2 material.


Then in your base/colour channel (1) put the common_01_c.dds texture like so:


Now if I apply this to my model as it is it just looks like crap :P


so first things first, I add a UVW mapping modifier and give the model a nice simple box UV map. This is not 100% necessary but on more complicated models it helps to ensure


Then lets collapse that modifier so its out of the way. Now we first want to work on the centre part of the wall without the pillars. In order to do this lets first select the them with the face tool like so.


Then lets give that anouther box UV just for that selection like so.


Then from there we need to add a Unwrap UVW modifier in order to edit our UV. Once added, click the big edit button in the modifier tab then in the top left of the edit UVW window, go to pick texture


Then select the common_01_c.dds texture we are using, click ok then you should see it as your background, but if you have the default settings it will probably look like this:


Thou I find it best to work with the palettes when they are not all squished up etc like this:


In order to change this I recommend that you change your default settings for this so every time you pick a background texture it dont look like the above.

In order to do this first expand the options by clicking the options button in the bottom right, then uncheck "Use Custom Bitmap Size" and "Tile Bitmap" and match any of my other settings thou these are the main ones, then go to Options in the top and click "Save Current Settings as Default", in order to have these settings each time you need to UV edit. If you do not wish to change your default settings just uncheck these boxes when and if you need to.


Moving on, using the freeform mode in the UVW edit window, basically select all the UV and drag and box into the position we want it for the colour I want etc. For this I'm going to pick this nice clean concrete one here


Now if I look at my model looks like this:


The texture is stretched a bit, but this dose not matter too much for this since this is just the colour layer and you can get away with quite a bit of stretching since the other layers will conceal that once they are all ontop of each other. If you have your colour layer as your main base layer how ever without any detail texture ontop like some of the PR textures are, then you can't get away with stretch it.

Now I'm pretty happy with that so going to collapse my modifiers. Thou what I'm not quite happy with is the very top face of the wall, the texture is far too squished compared to the rest of the model


As such, I'm going to select the top edge of the wall only like so:


And add a Unwrap UVW modifier too that, then go back though picking your texture map again etc. then once you have done that, we basically need to make your UV thinner than what you had before so it looks something like this:


Which then gives this, which is not perfect but it will do for this example. If I was being really picky I would kinda like it to meet a bit with the side colour etc :P


That's basically the main part of the wall done so lets move onto the Pillars.

now the simplest thing to do here to start off with is to box UV map each pillar in turn (ie, do one first then the other, not both at the same time) like so, so they start off with the same type of base UV to work from.


So that's the left one done, then collapse that UVW mapping modifier and then do the same to the right one so it ends up looking like this:


Now if you have done that correctly they should end up with basically the same base UV to work from making the next steps that little bit easier.

Now lets select both the pillars, then add Unwrap UVW modifier and go into the edit window.

now to show you how powerful the colour layer is I'm going to use a different colour texture for them but normally I would keep them the same colour unless they needed to be different for w/e reason. So going to UV them to the texture above the other one we used for the main part that is a little more dirty etc.


Like so which then gives me this:


Now that's fine for now but the problem with that is each side of the post looks the same

as such, we are going to have a little play with the UVs in order to make it look less repetitive. Select these 2 sides or more then lets add a Unwrap UVW modifier onto them and go into the edit window.


Then drag there UVs a little over to the right or something like so:


Then we end up with this, which looks a little less repetitive.


If I was being picky I would do a slightly different UV for each side but as this is just an example I'm not going to bother.

Now the top side of the texture dont look very good at the moment so we need to edit there UV's like we did for the top side of the centre part of the wall before.



That's about the best place I can find for the moment but some times you can find other textures on the palettes that you can use which gives you a better look, matching the top edge of the side textures etc. Thou that UV above then gives us this:


Now, that's our colour basically done, lets move onto detail layer :mrgreen:

So doing a concrete wall, need to find a concrete detail texture, normally its best you gather up all the textures you need before you start UVing, some times I even do it before I start modelling which all in all is better as then you can model to the texture which gives you a much better result and saves time epically on the more complicated models.

For this wall I'm going to use the mecity_01_de.dds detail texture which has a nice concrete texture. This texture can be found in: \objects\staticobjects\_middle-east\city\textures\mecity_01_de.dds

Now since this wall uses a "_middle-east" texture, it is really best this staticobject (if it was released) is only used on middle eastern maps, since Chinese and other woodland statics do not use any of the "_middle-east" textures in order to save memory. They instead use "_asian" and other textures. Mixing these two types of textures is bad unless they are going to be used by a large range of object in the map since its best not to load these textures when they are not needed.

Anyways that's getting a little bit beyond the basics so moving on, here is a quick picture of the texture:


So lets add this texture to our material, open up the material menu then click the "Detail" button and browse to the detail texture and select it. After you have done that click the "2" button on the right hand side to enable it in the viewport.


If I look at the model with that material applied in its current state just have a gray texture:


This is because we currently have no channel 2 UVs, which is what detail layer goes onto. so best thing to do, is to do a quick box UV of layer 2 like so:


NOTE: under permeates, there is a channel bit and I have "map channel: 2" there. This is very important, if you level it at default 1 it will destroy your UVs you have just done for channel 1 which we do not want to do and you will not change anything on layer 2. When working with the detail or other layers you need to keep an eye out to make sure this dose not happen, and save lots of backups encase it dose happen but if you do this, normally it only takes a few edit>undoes to sort it.

Once you have done that, collapse your UVW Mapping modifier and then select the centre of the wall again and do anouther box UVW Mapping on there like so, again make sure you do the UVW Mapping for channel 2 and not channel 1:


Then collapse that and add a Unwrap UVW modifier to the same selection and again, make sure its for channel 2.


Then go into the Edit UVW window and pick the mecity_01_de.dds texture and then UV the wall to the top concrete texture like so.


Which then makes our wall look like this:


How ever, this is far too stretched for a detail texture, as such what we need to do here is tile our texture ;)

So lets go back into our Edit UVW window and then at the bottom, click options and then, check the "Tile Bitmap" box and under it set the tiles to 3.


Then lets drag our UV over to the end of the tile to the right like so:


Which then makes our wall look like so.


It might even be worth tiling this by 4 instead of 3 but I'm not going to worry about that for this model since its just a quick example.

As you can see, now the detail texture looks less stretched and gives the model lots of details with little cracks in the texture etc. A little bit of it looks a little repetitive as it is, but once the detail layer is backed up by a colour, dirt and crack layers ingame, you will have to look really hard to see any repeating textures ;)

Now lets quickly fix the top face of the wall, much like we did for the colour layer like so:



Now with the centre part of the wall done lets do the same for the pillars, again like the colour layer its best we start off with box mapping each one in turn but on layer 2 this time.


Then a quick UV to them onto the same concrete texture, just needs to be thinner than the centre part of the wall since the object aint as large.



And then to fix the top quickly, thou here instead of collapsing the modifier, then selecting and adding a new one I'm just using the face selection and selecting each top face in the view port then modifying them that way which can save some time.



With the detail now done pretty much lets move onto the Dirt layer :mrgreen:

I'm only going to use a tiny bit of the dirt later on here as a quick example so lets use the "mecity_01_di.dds" dirt texture and with it we are going to add some dirt onto one side of the wall and on the other we are going to add some graffiti. The texture can be located in: \objects\staticobjects\_middle-east\city\textures\mecity_01_di.dds


So lets first add this texture into our material on the dirt layer like so:


And then lets do a quick box UV of channel 3.


Now before we collapse this, lets quick edit this UV to a part of the dirt texture so our entire model dont have bits of the dirt over it, since we only want a few faces to have the dirt on it. One a dirt texture, white = no texture, so lets UV our entire model to the bottom left hand corner of the texture like so:


Then collapse that and we should end up with a nice white texture like so:


This gives us the perfect base to work from so only bits we want dirt to be on, have dirt.

So first lets add some graffiti onto the centre, right side of the wall, so first select this face like so:


Then lets do a Planner UV map to it, which is much like a box UV map but its just for 1 side. You may need to play with the alignment as the plane will most likley be facing the wrong way to start off with, I found aligning it onto the Y axis works best here.


Then UV it to the graffiti at the bottom like so:



Now really this texture is far too stretched etc and I wouldn't do this kinda thing for a model I was going to have ingame but it will do for this example.

Now onto the left pillar lets add some dirt, first select all the sides (and not the top) and then lets do a box UV onto it on channel 3.


Then Unwrap it to the top dirt texture like so:


Which then gives us this:


Then just for anouther example of how to use dirt, we are going to add some onto one side of the right hand pillar here:


So lets add a planner UV to it like so:


Then UV it to this texture here:


And we end up with this, although the dirt texture is more of a metal rust run look its just for an example.


Now I think that's enough dirt for now, lets move onto the Crack and I'm not talking about the drug for thous who have just woken up :P

For our crack texture lets use the mecity_01_cr.dds, located in \objects\staticobjects\_middle-east\city\textures\mecity_01_cr.dds

Here is a pic of it with and without alpha (on the alpha pic, pink = 100% transparent)

07122009084747.th.jpg 07122009084750.th.jpg

So first lets put this texture into our crack layer on our material like so:


Again like the dirt layer, lets start off with a Box UV then lets edit the UV to to a place on the texture that is pink in the pic above which means the alpha is 100% transparent at that location so lets UV it just under that BF1942 poster:



So first lets add a crack texture onto this face of this pillar:


So we need to add a planer UV for channel 4 like so:


Then lets UV it to this texture here, but before you do you will need to rotate your UV 90degs to the left or right (which ever you think is best) and then UV it to there so the crack is going up the post.


And then it turns out like this, tbh its not the most fitting crack texture for a wall pillar but like everything else here, its just an example.


Then to the side of the wall lets add a crack texture aswell, so select the side of the wall here and do anouther planner UV on channel 4.


Then lets UV map it to this texture here:


And this is how it looks, the texture isn't perfect for this job, normally I would have separated polys for crack textures like this to go onto and that's where pre-planning of textures becomes very important but that's going beyond the basics.


So ye we can call the crack done now, all that's left is to add the bump (normal) textures onto the dirt and crack layers. Luckily there is no more UVing required here since the bump layers just work off the detail and crack layers, and just add a bump to them.

So click the "NDetail" button in the material editor and lets browse to the bump texture for our detail texture, so as our detail texture is called mecity_01_de.dds, we then want the mecity_01_deb.dds texture ;)


And then the same again for the crack bump texture, except this time we click the "NCrack" button and as our crack texture is called mecity_01_cr.dds, we need the mecity_01_crb.dds texture.


So that's pretty much all the materials setup and all the UVs done. Now to get the best impression on how all these layers work together you need to export this into the game and view it in the editor :D

So before we begin to export our model to BF2, lets make sure our export tools are setup for thous of you who might not have them setup.

Go to BF2 > BF2 Export at the top:


The Export window will popup and in the top right hand corner of it will be a small button called "Run Setup", click that.


A new window will popup and in it, we need to define a bunch of settings. The output directory is to what modification all your exports get exported to, I would advise you to export to PR_EDIT but export to w/e mod you like, but export to the "bf2" or "pr" mod at your own risk. I have filled out in it: C:/Program Files (x86)/EA GAMES/Battlefield 2/mods/pr_edit/ Thou this will most likley be different on your PC since I'm on a 64bit system, hence the "Program Files (x86)" in the file path and you might have your BF2 installed onto a different hard drive than C: or in a different location. All in all, its best to just browse to the mod folder and select it by clicking the Browse button.

In section 2 you need to list all the mods you might be using textures etc out of, so in my list I have:







Thou you can include as many mods as you like etc. The first 2 lines, /rawData/ and /mods/bf2/ are 100% critical, as well as a bunch of others if you are exporting to pr / pr_edit.

Your settings should look like this by then end:


Now with the setup out the way we can move onto exporting :mrgreen:

So first select the model, and go BF2 > BF2 Utilities


A new window should popup, in the Wizards, click StaticMesh and the Wizard will set everything up correctly for a very basic simpleobject export with no colmeshes etc.


Then if I look at my Hierarchy (press "H") you can see its setup correct, yours should look something like this (you may need to check "Display Subtree" in the bottom left):


Then go to BF2 > BF2 Export, a new window should pop up and in it you define where your object gets exported too etc.

In the first box, "Object sub-folder path" it defines where the object is exported too, for this example we will just put in "\staticobjects\" without the quotes since we dont plan to use this model ingame but if you do you will need to put it in a file location that makes seance etc.

For the object name just call it something like "palettes_test_wall" without the quotes, this will define the objects name in BF2.

Then in the StaticMesh bit below, there will be a dropdown box with lots of diffrent sizes for the lightmaps. Since we dont want to generate lightmaps for this just change it to "None" as in my pic. Once you have matched all my settings in the pic below, hit export.


Then if you load up the editor and the object, here it is.



Now it dose look pretty shitty for the most part, loads of things stretched etc but it works and now you have a base of knowledge to go form with making statics!

I hope you all found this tut useful.

Cheers, Rhino.

Link to comment
Share on other sites

Thanks a lot for that great tutorial , Rhino ! About time someone cleared it all up :P

Here's two hints to facilitate the workflow a bit more.

1. To access textures directly in the 'Pick Texture' pop-up menu in UVEdit window add a 'Standard' material to your ( Multi/Sub ) material setup up and point its 'Diffuse' map to the desired texture. This will add this texture in the pop-up menu for direct access.

2. If you like to keep this tutorial for a longer time you should save it to your machine. Imageshack is not a very reliable image host for more than a few months :P

Link to comment
Share on other sites

2. If you like to keep this tutorial for a longer time you should save it to your machine. Imageshack is not a very reliable image host for more than a few months :P

In all my years of using Imageshack I've had no problems with it apart from where recently it got hacked and for about a day the images where down, and the silly hackers thought they had killed IS but they where too dumb to realize that IS dose have backup servers :P

I only lost like 2 images I uploaded the day before and I just reuploaded them.

All my other tuts have there images hosted on IS and some are getting quite old now and there images are still up there :D

I do have the images for this tut on my PC thou so I can always upload them again "if" anything happens to them but I very much doubt it.

Link to comment
Share on other sites

ye rgr, I aint seen any but I aint been looking. There are some really old ones I know of but in the last year or so I think IS have a better system etc.

Like my trick with the diffuse map ?

ye I already know of that one but personally I dont use it myself as it means reworking all the materials later on and I like to be able to export test version of my statics when I want with a click of a button without having to redo materials before hand.

Link to comment
Share on other sites

Ah, no no :P

You don't use the Standard materials on your model. The pure existence of these materials is enough to enter the texture names into the pop up menu in UVW Edit.

All you have to do is to add the materials to your already existing 'Multi/Sub' setup ( i mostly ID 10 and up for them ) and don't use the materials on the model. Well, i sometimes use Standard materials for the collsionmeshes, but thats another story.

Link to comment
Share on other sites

  • 2 months later...

great tut rhino..thanx man.


on a side note,using multiple materials creates dynamic lighting problems with statics,the last material is the one that casts the dynamic shadow,i am about to find out if this is the same with a multi-sub material...will edit posts on results...though you probly know anyways..lol

Link to comment
Share on other sites

  • 2 months later...
great tut rhino..thanx man.


on a side note,using multiple materials creates dynamic lighting problems with statics,the last material is the one that casts the dynamic shadow,i am about to find out if this is the same with a multi-sub material...will edit posts on results...though you probly know anyways..lol

not in my experience? In my experience only Alpha materials dont cast dynamic shadows? But besides, 99% of the time a staticobject is casting there shadows on a lightmap, not dynamic shadows.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...