The Very Basic of Texture Palettes

Information and tutorials related to modding BF2.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

The Very Basic of Texture Palettes

Post by Rhino »

New Mini-Tutorial with pictures here: https://www.realitymod.com/forum/f189-m ... orial.html


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:
Image

Into this by using vBF2 Texture Palettes.
Image




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.
Image
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/p ... _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
Image
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.
Image

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

Now if I apply this to my model as it is it just looks like **** :p
Image

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
Image


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.
Image

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

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
Image


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:
Image

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

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.
Image


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
Image


Now if I look at my model looks like this:
Image


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
Image


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


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:
Image

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
Image


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.
Image


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:
Image


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.
Image


Like so which then gives me this:
Image


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.
Image

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

Then we end up with this, which looks a little less repetitive :)
Image


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.
Image

Image


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:
Image


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:
Image

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.
Image


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


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:
Image
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:
Image

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

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.
Image

Which then makes our wall look like this:
Image

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.
Image

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

Which then makes our wall look like so :D
Image

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:
Image
Image

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 :)
Image

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 :)
Image
Image

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 :)
Image
Image


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
Image

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

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

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:
Image

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

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:
Image

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 :)
Image

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

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 :)
Image

Then Unwrap it to the top dirt texture like so:
Image

Which then gives us this:
Image

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:
Image

So lets add a planner UV to it like so:
Image

Then UV it to this texture here:
Image

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


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)
Image Image

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

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:
Image
http://img188.imageshack.us/img188/4163/07122009092139.th.jpg[/img]

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

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

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 :)
Image

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 :D
Image

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.
Image

Then lets UV map it to this texture here:
Image

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.
Image


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 :D

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 ;)
Image

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.
Image



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:
Image

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

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:
/rawData/
/mods/bf2/
/mods/poe2/
/mods/pr/
/mods/pr_edit/
/mods/bfp2_edit/
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:
Image



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

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

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.
Image

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):
Image

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.
Image


Then if you load up the editor and the object, here it is :mrgreen:
Image
Image

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 :mrgreen:

Cheers, Rhino.
Last edited by Rhino on 2016-03-14 02:41, edited 1 time in total.
Image
Tonnie
Retired PR Developer
Posts: 2014
Joined: 2007-07-31 14:59

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Tonnie »

THANK YOU!!!

HangMan: BF2 Editor, it has very strict limitations memory wise, and crashes all the time. Its like a girl. Treat it with respect and take it slow and you'll get places. Rush and get ahead of yourself and it will turn around and punch you in the mouth
smee
Posts: 516
Joined: 2007-11-15 10:43

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by smee »

nice tutorial rhino think people will find that very useful. Took a lot of hunting about to get to that stage.
3 x 22" samsung 226bw. Matrox triplehead Quad Pro Q6600 "LGA775 Kentsfield" 2.40GHz (1066FSB) OC 3.2 , 8gb's of 1066mhz ram. 9800GTX OCX. 520mb. 3 x 320gbs samsungs. raid 0

Image
motherdear
Retired PR Developer
Posts: 2637
Joined: 2007-03-20 14:09

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by motherdear »

thank you so much rhino, you just solved the only problem i've been having making statics.

+1 hug to rhino
Image

[R-DEV]OkitaMakoto: "Talking squad level tactics in bed is actually a little known aphrodisiac"
[R-CON]Pantera : "maybe you might learn that we are not super intelligent beings chained in UKF's basement being forced to work on this".
Ragni<RangersPL>
Posts: 1319
Joined: 2007-08-13 10:44

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Ragni<RangersPL> »

Image


This tutorial just saved me a lot of work with reworking couple of my statics textures :D
ImageRANGERS LEAD THE WAY!!!
:29_slaps: Do not post stupid suggestions just because you had a bad round in PR :fryingpan
Nickbond592
Retired PR Developer
Posts: 2713
Joined: 2007-01-30 18:16

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Nickbond592 »

Nice tutorial mate :)
Image


Smeg: Fuzz commands a lot and promotes good teamwork, db flips vehicles, Bosco is an all-round nub, Outlawz is an SP whore, Nickbond is a friggin ninja and Rhino gets kicked for being a n00b.
Chuc
Retired PR Developer
Posts: 7016
Joined: 2007-02-11 03:14

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Chuc »

We all should be expecting LOTS AND LOTS of good statics from now on :mrgreen:
Image
Personal Folio - http://www.studioash.net
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Rhino »

cheers.
[R-DEV]Chuc wrote:We all should be expecting LOTS AND LOTS of good statics from now on :mrgreen:
Well as the title says this really only covers the basics, making good statics and how to use the palettes to the full is a little bit more in-depth :p

Thou the best way to learn that stuff is simply with experience and looking at existing statics.
Image
Smegburt_funkledink
Posts: 4080
Joined: 2007-11-29 00:29

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Smegburt_funkledink »

Fank you Rhin00b. This will help loads. Nice one for putting all that time into it. :15_cheers
[R-Div]Robbi "There's nothing more skanky than eating out of a tub of hummus with a screwdriver."
[R-DEV]Matrox "CHINAAAAAAA!!!"
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Rhino »

Sgt.Smeg wrote:Fank you Rhin00b. This will help loads. Nice one for putting all that time into it. :15_cheers
it took me less time than I expected in fact, I did the first 1/2 on xfire when going though it with tonnie before I had to leave yesterday morning to Bristol and then when I got back I just opened up the chatlog, edited it, reuploaded all the images and made thumbnails for them etc then continued from there soo all in all think it took around 4 to 6hrs to do it.
Image
Tomato-Rifle
Posts: 2091
Joined: 2007-12-31 22:24

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Tomato-Rifle »

When i click "export" 3ds max crashes :(

It worked yesterday when i did the other static box.
Last edited by Tomato-Rifle on 2009-08-05 14:41, edited 1 time in total.
Image
Hyperion
Posts: 40
Joined: 2008-09-14 17:33

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Hyperion »

The exporter might crash if:
  1. your objects sub-folder path is to long, or
  2. your textures are not placed somewhere in your BF2 folder.
Hope that helps!
Tomato-Rifle
Posts: 2091
Joined: 2007-12-31 22:24

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Tomato-Rifle »

Ahh, it worked, i didnt list

/mods/pr_edit/

in the box where we are supposed to put location of the texture files or w/e. :P

Some of the texture files i couldn't find, the MEC file with the graffiti but only the Asian graffiti in the middle east folder :/.


Anyway, here it is. A little different from yours:

Image
Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Rhino »

Tomato_With_A_Rifle wrote:Ahh, it worked, i didnt list

/mods/pr_edit/

in the box where we are supposed to put location of the texture files or w/e. :P

Some of the texture files i couldn't find, the MEC file with the graffiti but only the Asian graffiti in the middle east folder :/.
ye that's because as they are in the vBF2 object files, you need to extract them out of the mods/bf2/objects/objects_client/server.zips (in fact only the client for the textures thou you will most likley want to extract the server files too, thou do them after you have extracted the client files).

Nice work on the wall, looks good :)
Image
Tomato-Rifle
Posts: 2091
Joined: 2007-12-31 22:24

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Tomato-Rifle »

When i try to add lods to the model (like it tells you in the Creating Your First Static In Max / Gmax tutorial) it screws up the textures, it moves them around. am i not supposed to make cols??

And i today i made this thing :P just to try things out

Image

The real thing

Image
Last edited by Tomato-Rifle on 2009-08-06 01:58, edited 2 times in total.
Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Rhino »

cool, nice work. you need more dirt on the base and you really shouldn't be using a custom texture, also you could do with more dirt on the feet and over it etc

and dunno why your lods are screwing up the main model you must be doing something wrong. And ye eventually you will need to make both LODs and COLs to finalize a model. Best thing to do is go about the editor forums and look for info on them.
Image
space
Posts: 2337
Joined: 2008-03-02 06:42

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by space »

Very useful tutorial Rhino ;) I wasted 2 weeks of my life trying to get my head around texture palettes, but once you get it, it all seems fairly easy. I'm sure this will help alot of people ;)
danpoor
Posts: 4
Joined: 2009-09-03 02:13

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by danpoor »

How do I apply the DDS texture to the uvw unwrap. I can't find it in the selection list. I am probly missing something simple.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Static Object Tutorial] The Very Basic of Texture Palettes

Post by Rhino »

danpoor wrote:How do I apply the DDS texture to the uvw unwrap. I can't find it in the selection list. I am probly missing something simple.
what version of 3DsMax are you using? most versions of Max should support DDS by default but some I think you need to install a plugin. Or are you using GMax?
Image
Post Reply

Return to “Modding Tutorials”