- this building is nice, but I'd like it in a different color scheme
- I'd like to use this Middle East building in my woodland map, but it would load Middle East texture palettes that nothing else on the map uses
- I want a pink fortress
- BFMeshView
- pr_edit set up and ready to go
First, run BFMeshView and open muttrah_fort's static mesh from your pr_edit directory (ie. "C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr_edit\objects\staticobjects\pr\citybuildings\muttrah_fort\meshes\muttrah_fort.staticmesh").
You should now have this (click on lod0 and materials to expand subtree):
![Image](http://i.imgur.com/fechsUV.jpg)
As you can see, muttrah_fort uses its own unique textures. To make our pink fortress, we'll need a texture that contains the color. Let's change the color texture used.
Expand lod0 and material 0 (if you haven't yet) then right-click on the color texture used in the material and select Edit:
![Image](http://i.imgur.com/C5qg6Vg.jpg)
You'll see an Edit Material window. Click on the three dots at the end of the Texture 1 line and you'll now have a Browse window:
![Image](http://i.imgur.com/BJIVD3f.jpg)
Navigate to \objects\staticobjects\_middle-east\city\textures and select mecity_01_c.dds. Your Edit material window should now look like this:
![Image](http://i.imgur.com/tDNP4FL.jpg)
Click Apply. Congrats, your fort now looks like a mess.
![Image](http://i.imgur.com/ihOV9qE.jpg)
But hold on, we'll get there, you can see the pink already!
With lod0 selected, go to Tools > UV Editor.
BFMeshView UV Editor explained
![Image](http://i.imgur.com/Cz66pHh.jpg)
Zoom/Move In/Out - Hold right-click and drag in/out to zoom in/out to the position the mouse pointer is at - this is your basic movement around the UV Editor window.
"UV 1 Base" - select which channel to edit (leave the Lightmap channel alone for this)
"Material 0" - corresponds with the material in the subtree (see red arrow)
Toolbar (from left to right):
- Select tool - before you can do anything you need to select the UV vertices (white dots)
- Move tool - move selected vertices
- Scale tool - scale selected vertices
- Left/Right/Up/Down arrows - move vertices one bitmap lenght - useful when trying to move overlapping UVs apart for editing while keeping them in the same position on the texture
- Rotate - rotates UV
- Scale - scales selected UV but with a dialog (use number higher than 1 to scale up, fractions of 1 to scale down)
- Collapse - collapses UV (don't use in this case!)
For the purposes of our mission, I'll scale and move the UVs to fit the pink section of our texture.
![Image](http://i.imgur.com/XdsdzzG.jpg)
Our fort is now colored pink, but the detail and dirt textures are keeping it somewhat dark.
![Image](http://i.imgur.com/PyYli7C.jpg)
We can repeat this process for the other three channels (detail, dirt and crack) and adjust/change the textures better. You may also need to do this for each material unless one material covers most of the object (as in this case). You will also need to repeat this process for all the lods so your static looks the same from distance.
For now let's skip to getting this in game.
Go to File > Save As and save the static mesh in the same folder (this is required) as the original with a new name.
![Image](http://i.imgur.com/uaCv7Bn.jpg)
That's it for BFMeshView. Close it and now open the folder where you just saved the mesh (\objects\staticobjects\pr\citybuildings\muttrah_fort). You should see two files, muttrah_fort.con and muttrah_fort.tweak. Copy them and rename them to muttrah_fort_pink.con and muttrah_fort_pink.tweak respectively.
![Image](http://i.imgur.com/PcklnDF.jpg)
In the .con file, edit the lines highlighted blue, leave rest as it:
Same in .tweak:GeometryTemplate.create StaticMesh muttrah_fort_pink
CollisionManager.createTemplate muttrah_fort_pink
ObjectTemplate.create SimpleObject muttrah_fort_pink
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator EDMUND:Edmund_Fovargue
ObjectTemplate.collisionMesh muttrah_fort
ObjectTemplate.mapMaterial 0 concrete 0
ObjectTemplate.mapMaterial 1 metal 0
ObjectTemplate.mapMaterial 2 Base 0
ObjectTemplate.mapMaterial 3 stairs 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.geometry muttrah_fort_pink
include muttrah_fort_pink.tweak
Save and close.rem *** Generated with Bf2Editor.exe [created: 2006/5/15 12:52]
GeometryTemplate.setSubGeometryLodDistance 0 0 100
GeometryTemplate.setSubGeometryLodDistance 0 1 150
GeometryTemplate.setSubGeometryLodDistance 0 2 300
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
GeometryTemplate.glowing 0
GeometryTemplate.noLighting 0
ObjectTemplate.activeSafe SimpleObject muttrah_fort_pink
ObjectTemplate.creator TJENS:Tom
ObjectTemplate.modifiedByUser "Edmund Fovargue"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry muttrah_fort_pink
ObjectTemplate.setCollisionMesh muttrah_fort
ObjectTemplate.mapMaterial 0 concrete 12
ObjectTemplate.mapMaterial 1 metal 21
ObjectTemplate.mapMaterial 2 Base 12
ObjectTemplate.mapMaterial 3 stairs 34
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
What we've done here is make a copy of the original static using the new static mesh we've created in BFMeshView and the original collision mesh.
Fire up your BFEditor, your pink fortress is ready!
![Image](http://i.imgur.com/8VVHWn5.jpg)
On a more serious note, here's what you can also do with this:
![Image](http://i.imgur.com/arjH8p7.jpg)
Enjoy.