PDA

View Full Version : Texturing Static Texturing Mini-Tutorial


Ratface
2016-03-13, 23:03
Hello, guys! I had made this for the ww2 forum so I thought I'd add it here, too for those who are wanting to learn how UVing works with BF2. This basically follows the same ideas you'll see in Rhino's tutorial seen here: https://www.realitymod.com/forum/f189-modding-tutorials/63654-very-basic-texture-palettes-6.html#post2121844

The difference between UV mapping statics vs. dynamic models is that typically dynamic models have their own texture sheets (which are created after the model has been UV mapped), whereas statics typically work off of many texture sheets that are premade, which must be mapped to. I will cover the latter.

First, we start off with our completed mesh, a basic wall.

http://i.imgur.com/MFYFXsD.jpg

Now, what we want to do is start setting up the our material. Typically, we want to use a total of 2 materials in max: one for the actual textures, and one for the collision mesh. We start by selecting a material and changing it from Standard to Multi/Sub Object. This allows us to fit many materials inside of this single material, and texture our object using different material IDs, which I will explain next.

http://i.imgur.com/stxrnL8.jpg

What we will do, once we've selected the Multi/Sub Object for the material, is to determine the number of materials we think we will use. We can change this at any time. In this case, I will only be using one material, which will be made up of 6 different parts (coming next). To show as an example, I have two materials shown. If I wanted to use a separate set of textures for another part of the model (for a building, let's say doors), I could change the polygons to material ID 2, which would make it use the second material in the Multi/Sub object material. In this case, we will just use the first, so we make sure to select all polygons, go the the "Material ID" section on the right, type "1", and hit enter.

WARNING: By default, material IDs can be fairly random. If, let's say, a polygon's material ID is 8, and we only have 2 materials in the applied Multi/Sub Object material, the export will either crash Max or the polygon will become invisible in the engine after export. BE SURE TO ASSIGN ALL POLYGONS!

http://i.imgur.com/RC8SUgM.jpg

Now, once we have our Multi/Sub Object material set up, we can go to our first material by clicking on it on the list. For BF2 statics, we must use the BF2 Static Object material (see highlighted below), which is given by the POE2 tools I believe. Change the material type to this.

http://i.imgur.com/kBzlzaI.jpg

Alright, so let me quickly explain the 6 types of material types:

-Base: Also known as the color material, we use this to give the base color to an object. Typically, we'll see textures that are meant for this end with "_c.dds", for "color".
-Detail: This is where we add our details such as brick, concrete, etc. This adds a layer on top of the base layer to give, go figure, more detail ;). We typically see textures meant for detail to end with "_de.dds".
-Dirt: Similar to detail, this layer goes above the Detail layer and typically is used to provide grime, but can also be used to add posters, etc. We typically see textures meant for dirt to end with "di.dds".
-Lastly, we have NDetail and NCrack. These are meant to give "3D-ness" to the 2D textures. We don't worry about mapping these because they are meant to be paired up with NDetail and NCrack, and copy their UV maps. If the detail or crack maps you are using have a normal to go with them, you can select them here.

To apply these, you will want to click on the buttons on the left have side, browse for the texture sheet you want to use, and then select it.

AS A QUICK ASIDE! When choosing your materials and texture sheets, try to choose those which have a good balance of both detail as well as variety. For example, if you can find a detail texture sheet that contains both walls, windows, and doors on the sheet, try to map all relevant things to this sheet. This way, you don't overload on too many materials (meaning one material for the walls, one for the doors, etc.). This is important because the more materials equals lower performance, especially in an urban environment!

http://i.imgur.com/ubKtoxq.jpg

For this example, let's use the mecity_01_c.dds (found in objects\staticobjects\_middle-east\city\textures\mecity_01_c.dds) for the base color of the wall.

Similarly, we'll use mecity_02_de.dds for the detail, mecity_01_di.dds for the dirt, and mecity_01_cr.dds for the crack layers, all found in the same directory. We'll browse for all these and add them.

http://i.imgur.com/veuJgL6.jpg

OK, so from here,we will do the UV map for the base color. First, apply the UV modifier and select all faces. For this, I unclick the "normalize map" checkbox, and click the "box" UV option. From these, hit "Edit". In the top right corner you'll see a dropdown box. Click this, and hit "Pick Texture". Browse your way to the same directory your base color was at and select it. It should show up on the UV map screen.

From here, just select your faces and take them where you will to give a good texture to your model. Easy as that!

NOTE: If the texture sheet seems shrunk, hit "options" in the bottom right of the UV map window, and uncheck "use custom bitmap size". This will allow you to see the texture sheet properly and allow you to map to it better. Takes a little bit of practice but it gets fun when you get used to it ;)

http://i.imgur.com/1LNoNcG.jpg

So, now we'll do the same for the rest of the material parts. To do this, collapse the UV map modifier to the object, and apply a new UV map modifier. To access the next texture sheet to UV it, under Parameters, under Channel, change the "Map Channel" to 2. This will allow us to work with the second, and likewise, the third, fourth, etc.

NOTE: Only work with one channel per modifier! As soon as you finish with one channel, collapse the UV modifier and apply a new one, then change the channel!

From there, repeat as you would with the base color layer. Your UVs will be screwed up initially for the model, but that is because we are working with a new layer that hasn't had it mapping done yet!

NOTE: For these other textures, they have an alpha map that only allows certain details to come through. For an example, on a crack map, you will only be applying the crack details, not the actual detail color, etc. that may be in it's background.

http://i.imgur.com/NY67JZ3.jpg

So, to speed things up, here is the detail mapped...

http://i.imgur.com/bMiCdFI.jpg

The dirt layer mapped...

http://i.imgur.com/lIo3Wey.jpg

And finally the crack layer mapped...

http://i.imgur.com/YewaaMg.jpg

Now, we'll set up the object for export, export it, and open it up in BFMeshview! This is what we end up with:

http://i.imgur.com/3N1Xgsx.jpg

There we go! Obviously it takes more work and more material types for a larger object such as a house or a church, but the same principles apply, just with more materials!

Let me know if I missed anything and I'll edit it in, thank you :)

W.Darwin
2016-03-13, 23:55
Great! Genious! Much appreciated! Gracias!



[edit: Everytime I try to export my models to BF2 this is what happens, '' C:\Users\Line\AppData\Local\VirtualStore\Program Files (x86)\EA GAMES\Battlefield2\mods\bf2\Objects\staticobjects\ '' Why?

I had to look up my Hard drive to find that the Object are exported in this place? Why do they not just export in the /programfile (86) ?? ]




Rhino, This is a edit, I didn't find the use of making a new post but, HOLY TARP! I had to figure this out how?? I was stuck at this point in your old tutorial for 2 days D: It was written no where

The post below was answered to this question:

I cannot find the way to load my texture in the material map/browser help!

http://i.imgur.com/ckJgEH7.png

Rhino
2016-03-14, 02:40
Select Bitmap, then browse to the texture.

W.Darwin
2016-03-14, 02:58
Well, i will post a new reply still, Thanks! hehe, but now my 3d model export in the wrong files. I think I can still export them Manually inside BF2editor thou

Rhino
2016-03-14, 03:06
1, you shouldn't remove stuff from your posts when editing, that could have helped someone in the future with the same problem....

2. the exporting part of this tutorial explains it: https://www.realitymod.com/forum/f189-modding-tutorials/86683-statics-creating-simple-structure.html

3. you shouldn't ask things unrelated to a tutorial in a tutorial topic.

W.Darwin
2016-03-14, 03:16
Copy! Wont happen twice.

Kiaksar2142
2016-07-12, 04:47
Its really useful tutorial =) Thank you!
will try to texture the bridge (not destroyed one) from BF2142 =)