|
Modding Tutorials Information and tutorials related to modding BF2. |
|
Thread Tools | Display Modes |
|
2009-07-12, 09:05 | #1 | |
Retired PR Developer
|
The Very Basic of Texture Palettes
New Mini-Tutorial with pictures here: https://www.realitymod.com/forum/f18...-tutorial.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 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/tut..._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 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 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 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 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 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) 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: http://img188.imageshack.us/img188/4163/07122009092139.th.jpg[/IMG] 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 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: Quote:
Your settings should look like this by then end: Now with the setup out the way we can move onto exporting 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. | |
|
||
Last edited by [R-DEV]Rhino; 2016-03-14 at 02:41..
|
2009-07-12, 09:13 | #2 |
Retired PR Developer
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
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 |
|
2009-07-12, 10:18 | #3 |
Join Date: Nov 2007
Posts: 508
United Kingdom
Location: hemel
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
nice tutorial rhino think people will find that very useful. Took a lot of hunting about to get to that stage.
|
|
|
2009-07-12, 10:39 | #4 |
Retired PR Developer
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
thank you so much rhino, you just solved the only problem i've been having making statics.
+1 hug to rhino |
[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". |
|
2009-07-12, 11:03 | #5 |
Guest
Posts: n/a
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
Very interesting and useful! Thank you very much Rhino
|
2009-07-12, 11:27 | #6 |
Join Date: Aug 2007
Posts: 1,316
Poland
Location: The 44 Islands ;)
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
This tutorial just saved me a lot of work with reworking couple of my statics textures |
2009-07-12, 11:56 | #7 |
Retired PR Developer
Join Date: Jan 2007
Posts: 2,712
United Kingdom
Location: Wales
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
Nice tutorial mate
|
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.
|
|
2009-07-12, 12:40 | #8 |
Retired PR Developer
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
We all should be expecting LOTS AND LOTS of good statics from now on
|
Personal Folio - http://www.studioash.net |
|
2009-07-12, 12:56 | #9 | |
Retired PR Developer
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
cheers.
Quote:
Thou the best way to learn that stuff is simply with experience and looking at existing statics. | |
|
||
2009-07-12, 12:59 | #10 |
Join Date: Nov 2007
Posts: 4,067
Vietnam
Location: Quang Tri Province
|
Re: [Static Object Tutorial] The Very Basic of Texture Palettes
Fank you Rhin00b. This will help loads. Nice one for putting all that time into it.
|
[R-Div]Robbi "There's nothing more skanky than eating out of a tub of hummus with a screwdriver."
[R-DEV]Matrox "CHINAAAAAAA!!!" |
|
Tags |
basic, object, palettes, static, statics, texture, tutorial |
|
|