Surpher/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Sandbox]]
[[Category:Sandbox]]
==Intro==
[Tutorial]Simple Re-texturing Guide (From Start To Finish) by Amit
This is a character retexture guide for Arma 3, it will guide you through the retexuring of a blufor riflemans uniform, vest and helmet.
The focus will be more on the config.cpp and getting the character in game rather than the editing of textures.
The same process can be applied to retexture any game model that makes use of [[CfgVehicles_Config_Reference#hiddenSelections | hiddenselections]].


==== Required Tools ====
I’ve seen various guides on different stages of the texturing process, but I have not yet seen a single complete guide with all the steps laid out from start to finish with zero shortcuts taken. I've gotten a few requests for information on how I did my retextures, so I wrote this guide to allow complete novices to be able to get in on basic texturing. Using these exact methods, you’ll be able to achieve what you see in my Ghosthawk thread.
* [[BI Tools 2.5]]
** [[TexView 2]] Converting textures to and from bis formats.
** [[BinPBO]] Packing your files ready for use in game.
** [[Tools Drive]] Optional - Creates a workspace.
* [http://dev-heaven.net/projects/mikero-pbodll/files Eliteness] Unpacking pbo files and derapifiying congig.bin files.
: requires [http://dev-heaven.net/projects/mikero-pbodll/files DePbo.dll]
* Text Editor [http://notepad-plus-plus.org/ Notepad++]
* Image Editor [http://www.gimp.org/ GIMP]


==== Texture Templates ====
Set aside 2-4 hours to do this the first time because it takes time to get the hang of it.
[http://www.armaholic.com/page.php?id=19280 PSD Templates for NATO Soldiers by Saul] [http://forums.bistudio.com/showthread.php?149538-PSD-Templates-for-NATO-Soldiers BI Forums]


[http://www.armaholic.com/page.php?id=19350 PSD Templates for OPFOR Soldiers by Saul] [http://forums.bistudio.com/showthread.php?149538-PSD-Templates-for-NATO-Soldiers BI Forums]
Credits
Before I begin I want to credit the people who made this possible:


[http://www.armaholic.com/page.php?id=19167 .psd templates [NATO] by topas] [http://forums.bistudio.com/showthread.php?149204-psd-templates-NATO BI Forums]
    Bohemia Interactive for providing their proprietary tools to assist us.
    Stiltman for his texture configuration guide
    Surpher for his automated Photoshop script for converting normal maps to height and occlusion maps
    Topas for his BLUFOR Infantry template
    Saul for his BLUFOR, OPFOR, and INDEP infantry height, cavity, and occlusion map templates


[http://www.armaholic.com/page.php?id=21265 PSD and PDN Templates for Independent Uniforms by b00ce] [http://forums.bistudio.com/showthread.php?157411-PSD-and-PDN-Templates-for-Independent-Uniforms BI Forums]


==== Where to find original character textures & config files ====
C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Addons\characters_f.pbo
: characters_f\config.bin - Classes for uniforms, vests and headgear.
: characters_f\blufor\config.bin - Classes for the blufor units.
: characters_f\blufor\data - The majority of the blufor unit textures.


: characters_f\OPFOR\config.bin - Classes for the opfor units.
Right from the start you'll need Bohemia Interactive's official mod tools (40mB). Install everything included there even if you don't think you'll be using certain tools. Texturing is often the gateway to more advanced mod creation and while you may not think you'll get into that now, something might change your mind later and you'll be glad to already have the tools installed.
: characters_f\OPFOR\data - The majority of the opfor unit textures.


C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Addons\characters_f_beta.pbo
Note: The Arma2Work folder will be put in a virtual hard drive called P:\ in My Computer. It is essential to almost all modding that you have this available.
: characters_f_beta\INDEP\config.bin - Classes for the independent units.
: characters_f_beta\INDEP\data - The majority of the independent unit textures.


== Unpacking the characters_f.pbo file ==
I'll outline my actions briefly and then run through the procedure from start to finish unlike most other guides. Don't worry if you don't understand the terms in the following list, it'll be explained after. Also, to prevent readers from being overwhelmed by the amount of information, I have put each section in spoilers so they can open them as needed.
This part is optional you do not have to unpack the characters_f.pbo file to get at the config files and textures. There is a working [[Surpher's_Sandbox#Config.cpp file|config.cpp]] below and there are [[Surpher's_Sandbox#Texture Templates|texture templates]] released by community members.


''' Copying the pbo file to a safe location '''
Actions
* Navigate to C:\Program Files (x86)\Steam\steamapps\common\Arma 3\
1. Create new blank mission in Arma 3.
: or
2. Install BI Tools, Eliteness, the DePBO.Dll, and PAA plug-in for image editor.
* Start Steam and go to Library, right-click on Arma3 and select properties.  
3. Use Eliteness to extract files from the pbo of choice.
* In properties click the Local File tab and then click on the Browse Local Files button and it will bring up a file dialog.
4. Access the texture file that you want and open it in your image editor of choice.
* Navigate to the Addons folder and copy the characters_f.pbo file to a different folder away from the game files.
5. Import a downloaded texture or custom texture and use overlaying techniques to fit it over the original skin.
6. Export the final texture design as a TGA file, open it in TexView2, and save it as a PAA file.
7. Test that the texture actually works by placing the item in the editor and using setObjectTexture script command.
8. Copy the textures to my addon build folder and edit the config to allow it to be available in the editor.
9. Use BinPBO to pack the data into a pbo file. That pbo will get installed like any mod you download from online.  


''' Unpacking the pbo file and derapifying the config.bin files ready for editing '''
Preparation
* Now start Eliteness and navigate to the location where you copied the characters_f.pbo file.
Run Arma 3’s editor and create a new blank mission. Call it whatever you want and then exit the game.
* Double-click on the characters_f.pbo file and you will be ask if you want to extract the file, click OK.
* Navigate to the newly created characters_f folder and double-click on config.bin and then go to the File menu a click Save As.
* Name the file characters_f_config.cpp
* Now navigate to the blufor folder and double-click on config.bin and then go to the File menu a click Save As.
* Name the file blufor_config.cpp
* The characters_f_config.cpp and blufor_config.cpp can now be opened in a text editor to be used as reference.


''' Getting the original textures ready for editing '''
Currently the way I extract the textures (well, all the files including the models) is by using a program called Eliteness (75kB) to extract the files from the PBO file using Mikeo's DePBO.dll (171kB) file. After downloading both of those, use WinRar or 7zip to extract the files in the Eliteness download to a folder anywhere on your computer. Extract only the DePbo.dll file from the 2nd download into the folder where the Eliteness files are. If you don't do this, then the program won't be able to extract files from the PBOs. You'll also need an image editor that supports opening PAA files. I personally use Photoshop CS5 along with this PAA plugin (160kB). It works with both Photoshop and The GIMP. If you do not own either of those, you'll need to convert the PAA file to a TGA using TexView 2. Instructions to do this are in the Texture Editing section.
* Navigate to the data folder in the blufor folder.
* Double-click on clothing1_co.paa and it should open in Texview2 if you have it installed.
* Go to the file menu and click Save As and give the file name a .tga extension.
* Do the same for vests_rgr_co.paa and equip1_co.paa
* The newly created .tga file can now be opened in a image editor.


== Texture Editing ==
If you’re using photoshop, place it in: C:\Program Files\Adobe\Adobe Photoshop CS5\Plug-ins\File Formats\


== Workspace Setup ==
If you’re using the GIMP, place it in: C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\
Whether or not you choose to setup the P: drive your folder structure will most likley be the same.
P:\Example
: \Retextured_blufor
: config.cpp
:: \data
:: texture files


== Getting your retextured unit into Arma 3 ==
Once you have done that, open Eliteness. On the left pane browse to your Arma 3 folder, go into the addons folder and click on the category of whatever you're looking to edit. For me, I wanted to get straight to work on the Ghosthawk, so I would look for it in air_f.pbo, but the only stuff contained in there was the alpha aircraft. The aircraft added in the beta are in air_f_beta.pbo. Another example is if you want to edit one of the APCs added in the beta, you would have to open up the "armoured_f_beta.pbo" file in Eliteness. In the left pane when you see the pbo you want to extract, double-click on it. It'll ask for a confirmation. Click yes. It'll extract the files to the /Steamapps/Common/Arma 3/Addons folder.
=== Config file editing ===
 
<syntaxhighlight lang="cpp">
Previously there were no folders in the Addons folder, only the pbo files. Now you'll have a folder called whatever the PBO was labelled. Open that and then look for the vehicle you want. In my case the Ghosthawk is known as heli_transport_01. So I opened that folder, opened the Data folder and looked for the texture I want. There are two versions of the Ghosthawk (black and green), but I primarily use the green one for my textures as you may have noticed.
enum {
 
destructengine = 2,
The PAA textures you want to grab are anything that relates to the section of the skin you want to edit BUT also has “_co.paa” on the end. This signifies that you editing the actual base colour of the skin. I won’t go into the specifics as to what the other ones mean.
destructdefault = 6,
 
destructwreck = 7,
Once again, for example, the Ghosthawk has the exterior and the interior. I was only interested in the exterior so I opened “heli_transport_01_ext01_blufor_co.paa”. I quickly noticed that there was no tail or rotor sections present in that skin. I assumed “ext01” meant exterior 1 to signify there are more parts to be displayed on the model in-game. Sure enough when I opened “heli_transport_01_ext02_blufor_co.paa” the tail portion of the helicopter was present. That was good news.
destructtree = 3,
 
destructtent = 4,
Make no mistake, there are A LOT of files you will be working with at this point, so organization is key. You should create a dedicated folder called “Arma 3 Texturing” in My Pictures to hold the numerous files you’ll be handling. After that, create a folder called whatever you are editing. For me it was the Ghosthawk. Inside that folder copy the relevant PAAs you want to edit here so you have a base to work from. I’m going to assume you have an idea of what you want to add to your skin, so create a new folder with the name of that. For me, I was editing camouflage patterns so I called the folder “camos”. Inside that folder I created subfolders for each pattern I wanted to create (e.g. Crystal, Hex, Russian, etc). Yes, a lot of folders I know, but this will help keep your retextures separated and easy to find. Next we can move onto the actual editing of the skin.
stabilizedinaxisx = 1,
 
stabilizedinaxesxyz = 4,
Texture Editing
stabilizedinaxisy = 2,
Open your image editing program. From within the program, open any PAA files you copied from the original Data folder to the Arma 3 Retexture\{mod name here}\ folder. You’ll be asked to discard mip maps. Click YES. Mip maps are used for displaying textures at various ranges so that the full-res version doesn’t need to be used all the time. This helps speed up rendering of the texture at range. So now you have the base skin open in your program like you’re a surgeon and it’s your patient with its chest cavity exposed. Soon you will be performing surgical actions, so you can call yourself a doctor for the next few steps. We are, afterall, doctoring the textures to our liking, heh.
stabilizedinaxesboth = 3,
 
destructno = 0,
Note: If the PAA plugin does not work, then convert the PAA to a TGA in TexView 2 and then open that in the editing program. To do this, open the PAA in TexView, go to File>Save As, name the file what you want, but change the ".paa" to ".tga" and then change the file type to "All Files". Save it and now you have a proper TGA file. It's a hassle, but necessary if the PAA plugin is not an option for you.
stabilizedinaxesnone = 0,
 
destructman = 5,
The best looking retextures are probably produced using the pen tool, but that’s a bit too advanced for beginners. A great alternative for quick edits is the Polygonal Lasso Tool. Personally, that’s what I use since you can be somewhat rough with it and your skins will still show up fine in-game. At least, that is my experience and you can confirm it by checking them out using the link to my WIP thread above.
destructbuilding = 1
 
};
If you are doing work on editing infantry, there is a set of handy BLUFOR infantry PSD templates (205mB) made by Topas to make the entire process much easier. The set includes 4 templates: Uniform, Vest, Helmet & Misc. Equipment, and Armour. It is very easy to use those templates. Just open the PSD of the section you want to edit, disable all the layers except for "Layer 1", import your texture in and match it up to cover the same area as "Layer 1". Then, re-enable the layers that you disabled earlier and that should be ready for exporting. There are also some templates created by Saul to help with making cleaner looking retextures, but you'll need to actually do some work to shape your textures properly using these templates. Saul's BLUFOR, OPFOR, and INDEP (248mB) templates each include cavity, height, and ambient occlusion maps. Usually, the only one that you will require is the ambient occlusion map to be placed over top your retexture (diffuse map). This will be explained in a bit more detail a nearing the end of this section.
 
Unfortunately, we don't have templates for everything other than the BLUFOR infantry. So for anything else, select the Polygonal Lasso tool in Photoshop or its equivalent in the GIMP. In Photoshop you may have to right-click the Lasso Tool icon and select “Polygonal Lasso tool” in order to access it. Click on the outside edge of the section you want to edit and continue clicking along the edge of it until you end up back at the start. The final click will need to be on the first point you click to close the selection. If you mess up one of the points, hit Delete to remove it and try again. If there are windows or other shapes inside the select that you do not want to be textured over, then look in the top left section of the mainbar. You’ll see four icons with squares. You want to click on the one 3rd from the left (one solid square, one dim square). What this allows you to do is use the lasso tool to select the sections you DON’T want to end up in the final selection. When you’re done, you’ll want to duplicate that selection into a new layer to preserve the outline for later when you add your custom texture. To do this, hit Ctrl+J on the keyboard. I’m not sure what the hotkey is for the GIMP. You’ll see a new layer called “Layer 1” in the layers pane above the “Background” layer. You can click the little eye icon for Layer 1 since we won’t need to look at it anymore.
 
Note: Be sure to save your project as a PSD right now. You do not want to redo this tedious process.
 
Now, this is the part where you must import your custom texture into the project. Whether you crafted the pattern by hand or downloaded it from the internet matters not. The only thing that matters is that it is a high enough resolution to look good on whatever you’re texturing. The Ghosthawk is a large aircraft, so I aimed for textures 2048x2048 pixels in size and resized them to be smaller if necessary. Usually you’ll want your texture to cover the entire original texture’s area. Drag and drop your custom texture into the image editing workspace. It’ll now be the top layer as “Layer 2”. This is what you want, but it’s clearly not what you want it to look like ingame. Basically, you need to find a way to overlay the texture over the original such that the detail of the base texture is kept, but your own texture shows up. I find that the Color Dodge layer blend mode works fine for 90% of the custom textures I’ve used. To do this, select the new texture in the layer pane and click the drop down in the top left of the pane to select “Color Dodge”. What you see now will depend on the colour of both the base skin and the new texture. What you should see is a decent blend between the two. If it looks too dark, you may have to play around with the blending setting on the layer to find one that does look decent. I find that Soft Light will work alright with darker texture combinations.
 
Align the new texture over all the sections as mentioned before. Now, look down to the layers pane you should see little preview windows of each layer. Hold Ctrl and click on that little preview, but make sure the the new texture (Layer 2) is still selected. Now hit Ctrl+J again to duplicate that layer into Layer 3. Now you should have the area that you want retextured looking super bright. This is fine, just tick the little eye icon on Layer 2 to disable it. Now you should have it looking the way you want it.
 
At this point you’ll want to make a judgement call. If your texture looks comfortably visible and bright, then you should add a layer that darkens the overall retexture a bit. In my experience, when the sun hits the skin in-game, nice vivid looking skins from photoshop turn into bright glare generators. To do this, create a new layer by hitting Ctrl+Shift+N on your keyboard. Make sure that new layer (Layer 4) is selected and then do the Ctrl+Click thing on the retexture. It’ll show the selection and now hit Shift+F5 on your keyboard. In the Content section select Black and in Blending, keep mode at normal and opacity at 100%. Hit enter. Your skins turned completely black. No worries, just go to the Opacity area in the Layers pane for Layer 4 and lower it to something that looks less bright, but still comfortably colourful (or whatever you’re going for). I generally use something around the 45% mark. Example to follow.
 
Too Bright
Just Right
 
Once you have your texture looking the way you want it, you now need to put something called an ambient occlusion map over your texture. This allows you to retain the sharp detail of whatever you are texturing over. This becomes especially important if you plan to completely replace the original texture and to not use overlaying techniques. If you used Topas' template earlier for your infantry texture, don't worry about this part. If you used Saul's template then you already have the ambient occlusion map in the PSD file. If you were not using either of those, then you will need to generate the occlusion map yourself. Surpher has kindly uploaded an automated script for using the normal map of the model to generate the height and occlusion maps. You may obtain the script fromhis reply to this thread. You will need the program xNormal (156mB) in order for the script to run properly.
 
Download the action file and place it in Adobe Photoshop CSx\Presets\Actions folder, where "CSx" is whatever version of Photoshop you have. Examples: CS, CS5, CS5.1
Download and install xNormal. You don't need any of the video codecs, but they are highly useful to have on your PC in general.
Once both of those are installed, go into the /Steamapps/Common/Arma 3/Addons/ folder and go back to the folder where the original textures are. For whatever "_co.paa" texture you opened in Photoshop/GIMP, find the corresponding "_nohq.paa" file, open it in TexView 2, save it as a TGA instead of PAA (change file extension to .tga), and then open that up in Photoshop. At the top of the program, click on "Window", then "Actions". This opens the actions pane. You may or may or may not need to add the downloaded action manually. Click this: then click "Load actions", browse to the action file and open that up. The new action will show up in the Actions pane. Click the little blue arrow next to "Normal Map Conversion" and highlight the entry "Normal _To_AO_&_Height" Then hit the little play button at the bottom of the Actions pane. This will create the height and occlusion maps. When it's done, drag and drop the occlusion map layer onto your retexture's document space and set the occlusion map layer's blending to "Multiply". The edges of your texture should bee more accentuated and darker. You may close all other documents open in Photoshop except your retexture.
 
Now you can export the texture.
 
You’ll want to export it as a .TGA (Targa) file because the PAA plugin doesn’t do a good job of regenerating the new mip maps in the new PAA file. TexVeiw 2 gets the job done properly and quickly. Call the tga files whatever you like. For my Ghosthawk skins I used “{pattern name}.tga” and “{pattern name}_tail.tga” formats. Highlight both of the TGA files in the project folder and hit enter to open them both with TexView 2. Go to File>Save As. In the file name box remove the .tga on the end and then click save. Do that for both files. The time it'll take to convert each tga file into the PAA file will vary depending on the resolution of the texture, so be patient. You’ll know it’s finished when you have the square box cursor back on the texture in TexView 2. This completes the texture editing section.
 
 
In-game Texture Test
Alright, you’ve made it this far and you’re almost to the point of getting it in-game for glorious viewing. There is one of two things you can do:
 
1. Test the new textures using the setObjectTexture command or
2. Edit the config file and package it up into a PBO right away.
 
I highly recommend testing the textures in-game BEFORE packaging them into a PBO addon because this way you can quickly see what the skins actually look like in-game and inspect them. It’s very useful for finding areas of the skin that need to be polished. The reason this is so quick and easy is because the files stay as PAA format rather than the extra step of writing the config code, binarizing it into a PBO and then adding it as an addon to Arma 3. All you have to do is drop the PAA files in to the folder containing the blank mission files from the first step. The mission folder is in Documents\Arma 3\missions\{mission name}.stratis.
 
Launch Arma 3, go to the editor and open the blank mission you created earlier. Navigate to the Stratis airfield and plop the item down onto the runway. In my case I placed a regular Ghosthawk. In the initialization box I put the following:
 
Code:
 
this setObjectTexture [0,"russian.paa"]; this setObjectTexture [1,"russian_tail.paa"]
 
In order for the custom textures to show up, you need to specify what they are replacing and where they are located. The 0 represents hidden selection #1 on the ghosthawk. This is the main body, so I wrote the PAA name for the body and the 1 in the second entry specifies the location of the tail’s texture. A third entry with 2 would likely replace the glass as the hidden selections appear to be in the order that the textures are from the Data folder extracted from the pbo. Now, click okay and then hit Preview to check it out. You should now be able to see your newly created retexture. Use the overcast feature in the editor to see how it looks in both full sunlight, 50% overcast and 100% overcast at midday. That should help give the best representation of what your skins will look like. Remember, if it looks too bright or something, you can just open the PSD file again and make tweaks.
 
Configuration Creation
Your configuration file will depend on the type of item you are editing. Finding the code is somewhat of a drag if you aren’t familiar with scripting/programming. Below I will include the exact ones I use as a template to help you guys with yours. So far I have only tested infantry helmets and vests along with vehicles.
 
I’ll begin with vehicles (specifically helicopters) for the configuration. Unfortunately I do not recall where I got the code for the helicopters, but I know that it is a mix of someone’s helicopter config and my own configuration. If I find the article again I will add them to the credits.
 
You’ll want to start by creating a new folder somewhere on your computer to hold the mod files before they are packaged into the PBO. I suggest going into the P:\ drive and creating a new folder called “my_projects” and inside that call your mod whatever you want. I called mine “UH80. In that folder create another folder called “Data” and also create a new .txt file by right-clicking on the white space then going to New > Text Document. Name the document “config” and replace the .txt on the end with .cpp. Click yes to confirm the change of file type. Inside the Data folder, copy and paste your final PAA files into this folder.
 
Many addons combine everything into a single PBO (e.g. Infantry/vehicle skins), but some also separate items like weapons from skins. This is most likely to organization easier. To keep things simple, we’ll begin with a standalone addon where the item you edited is not mixed with other types of textures. So, we’ll keep vehicles separate from infantry, although, there is no reason why you can’t have both together in the same configuration.
 
For helicopters, this is the code you’ll be using:
Image
 
Don’t add any of this to the config.cpp file just yet. Let’s analyze this code first and find what you need to change in order to make your skins work. In section 1 you see:
Code:
 
class UH80_skins {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Air_F_Beta_Heli_Transport_01"};
    };
 
The “class UH80_skins” represents the name of your modification. The UH80_skins will be changed to whatever you named the mod. Make sure there are no spaces, though. Use underscores for spaces. The rest of this section can be left alone.
 
Section 2 looks like:
Code:
 
class Heli_Transport_01_base_F;
    class UH80_crystal_FG: Heli_Transport_01_base_F
 
Under cfgVehicles, the class of the base vehicle needs to be defined. That’s what the “class Heli_Transport_01_base_F;” is. The part relevant to our interests is where you see “UH80_crystal_FG”. This specifies the class name to be reserved for the specific pattern in the game. You will need to change that to whatever you want the class name to be in-game. The “:Heli_Transport_01_base_F” stays the same.
 
Note: If two items have the same class name from two different addons, there will be a conflict, so try to make it fairly unique to your addon.
 
Section 3 is the meat and the potatoes:
Code:
 
{
            _generalMacro = "B_Heli_Transport_01_F";
            scope = 2;
            side = 1;
            faction = "BLU_F";                //Change to your faction
            displayName="UH-80 Crystalhawk (Foliage)";
    crew = "B_Helipilot_F";            //Change to your pilot
    hiddenSelections[]= {"camo1","camo2"};
    hiddenSelectionsTextures[]= {"P:\UH80\Data\crystal.paa","P:\UH80\Data\crystal_tail.paa"};           
    typicalCargo[] = {"B_Helipilot_F"};
            availableForSupportTypes[] = {"Drop","Transport"};
      };
 
This section only has a few things to edit, thankfully. The line “displayName="UH-80 Crystalhawk (Foliage)";” is what defines the name of the item in the editor. So, if I wanted to name that vehicle to something else, I’d just replace the "UH-80 Crystalhawk (Foliage)" with the new name. “hiddenSelections[]= {"camo1","camo2"};” is used for selecting what areas of the model will be replaced with the custom texture. Earlier I mentioned that the hidden selections appear to be in the order that they appear in the Data folder. This is true for the Ghosthawk so I used camo1 and camo2 to define those selections. If the model only requires one hidden selection to be used, then use just “camo”. The line below that is what assigns the textures to the hidden selections. Change "P:\UH80\Data\crystal.paa" and "P:\UH80\Data\crystal_tail.paa" to the textures that you created.
 
That’s it. The rest can be left as they are. If you want to change with faction to add the vehicle to, then use the Six Config Browser to find the class name of the faction you want to use and replace it with that. In the top right section of the site, click on the mod name in the white box and select ARMA 3 Beta. That will give you the correct class names. If there’s a specific infantry unit you want to place as the default crew for when you spawn the vehicle, you can edit that field with the class name of the unit.
 
I’m not entirely sure everything you see above is absolutely needed just for changing the textures, but I left it in just to give you an idea of what is taken into account when the mods are processed in the editor and how to change certain things.
 
So now that you know what needs to be changed, copy the following code into your config.cpp file and make the necessary changes.
Spoiler:
Code:


class DefaultEventhandlers;
class CfgPatches
class CfgPatches
{
{
class Retextured_A3_Characters_F_BLUFOR
    class {mod class name here} { //e.g. UH_80_unique
{
        units[] = {};
units[] = {};
        weapons[] = {};
weapons[] = {};
        requiredVersion = 0.1;
requiredVersion = 0.1;
        requiredAddons[] = {"A3_Air_F_Beta_Heli_Transport_01"};
requiredAddons[] = {"A3_Characters_F"};
    };
};
};
};


class CfgVehicles
 
class cfgVehicles
{
{
class B_Soldier_base_F;
    class Heli_Transport_01_base_F;
    class [COLOR="#FF0000"]{name the specific texture}[COLOR="#FF0000"]: Heli_Transport_01_base_F   
class Retextured_B_Soldier_F: B_Soldier_base_F
        {
{
            _generalMacro = "B_Heli_Transport_01_F";
author = "YourName";
            scope = 2;
_generalMacro = "B_Soldier_F";
            side = 1;
scope = 2;
            faction = "BLU_F";  <--Change if necessary for your mod               
displayName = "Retextured Blufor Soldier";
            displayName="{name of the vehicle in the editor}";
model = "\A3\characters_F\BLUFOR\b_soldier_01.p3d";
        crew = "B_Helipilot_F"  <--Change if necessary for your mod
nakedUniform = "U_BasicBody";
        hiddenSelections[]= {"camo1","camo2"};  <--Change to reflect how many sections you are replacing
uniformClass = "Retextured_U_B_CombatUniform";
        hiddenSelectionsTextures[]= {"{path to texture 1}","{path to texture 2}"};           
hiddenSelections[] = {"Camo"};
        typicalCargo[] = {"B_Helipilot_F"};
hiddenSelectionsTextures[] = {"PathToYourTexture_co.paa"};
            availableForSupportTypes[] = {"Drop","Transport"};
linkedItems[] = {"Retextured_V_PlateCarrier1","Retextured_H_HelmetB","NVGoggles","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
      }; 
respawnLinkedItems[] = {"Retextured_V_PlateCarrier1","Retextured_H_HelmetB","NVGoggles","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
 
};
};
 
 
 
For helmets, this is the code you’ll be using:
Spoiler:
Code:
 
enum {
    //  = 2,    // Error parsing: Empty enum name
    DESTRUCTENGINE = 2,
    DESTRUCTDEFAULT = 6,
    DESTRUCTWRECK = 7,
    DESTRUCTTREE = 3,
    DESTRUCTTENT = 4,
    STABILIZEDINAXISX = 1,
    STABILIZEDINAXESXYZ = 4,
    STABILIZEDINAXISY = 2,
    STABILIZEDINAXESBOTH = 3,
    DESTRUCTNO = 0,
    STABILIZEDINAXESNONE = 0,
    DESTRUCTMAN = 5,
    DESTRUCTBUILDING = 1,
};
 
class CfgPatches {
    class {mod class name here} {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Characters_F_BLUFOR"};
    };
};
 
class cfgWeapons {
    class ItemCore;
    class HeadgearItem;
   
    class example_HelmetB : ItemCore {
        scope = 2;
        weaponPoolAvailable = 1;
        displayName = "{what you want to call the helmet}";
        picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.paa";
        model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
        hiddenSelections[] = {"camo"};
        hiddenSelectionsTextures[] = {"{path to helmet PAA file}"};
       
        class ItemInfo : HeadgearItem {
            mass = 100;
            uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
            modelSides[] = {3, 1};
            armor = 3*0.5;
            passThrough = 0.8;
            hiddenSelections[] = {"camo"};
        };
    };
};
 
 
 
Most of what you see above isn’t too important. Just edit the sections that are highlighted in red text. The same will be true for the vests and uniforms.
 
The code for vests:
Spoiler:
Code:
 
class CfgPatches {
    class {mod class name here} {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Characters_F_BLUFOR"};
    };
};
 
class cfgWeapons {
    class Vest_Base;
    class VestItem;
   
    class example_PlateCarrier1_rgr : Vest_Base {
        scope = 2;
        displayName = "{what you want to call the vest}";
        picture = "\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
        model = "\A3\Characters_F\BLUFOR\equip_b_vest02";
        hiddenSelections[] = {"camo"};
        hiddenSelectionsTextures[] = {"{path to vestPAA file}"};
       
        class ItemInfo : VestItem {
            uniformModel = "\A3\Characters_F\BLUFOR\equip_b_vest02";
            containerClass = "Supply100";
            mass = 50;
            armor = 5*0.5;
            passThrough = 0.7;
            hiddenSelections[] = {"camo"};
        };
    };
};
 
 
 
 
Now, Stiltman made a note about using uniforms on soldiers, so you must read and understand what he says before continuing on with uniform retextures:
 
Spoiler:
Quote Originally Posted by Stiltman View Post
Uniforms seem to be working a little bit diffrent from what i gather they are in fact soldiers
and when switching uniform the game just switches class/model on your soldier.
so one would have to make a new soldier aswell as a new item.
 
this example will put your soldier under bluefor as Uniform Test Soldier
 
for the soldier its in CfgVehicles.
 
Code:
 
class Example_Soldier_F : B_Soldier_base_F {
        _generalMacro = "B_Soldier_F"; //unsure what this does
        scope = 2;
        displayName = "Uniform Test Soldier";
        uniformAccessories[] = {};
        nakedUniform = "U_BasicBody"; //class for "naked" body
        uniformClass = "Example_CombatUniform_mcam"; //the uniform item
        hiddenSelections[] = {"Camo"};
        hiddenSelectionsTextures[] = {"pathtoyouraddonretexturefile.paa"};       
    };
 
and then the uniform item linking it to the soldier class
making it an item in the gear menu without this it works as regular arma 2
and it will show no uniform in gear.
 
Code:
 
class Example_CombatUniform_mcam : Uniform_Base {
        scope = 2;
        displayName = "Example Mcam uniform";
        picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";
        model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
       
        class ItemInfo : UniformItem {
            uniformModel = "-";
            uniformClass = "Example_Soldier_F"; //would be same as our made soldier class
            containerClass = "Supply20"; //how much it can carry
            mass = 80; //how much it weights
        };
    };
 
 
 
Full code for uniforms:
enum {
    //  = 2,    // Error parsing: Empty enum name
    DESTRUCTENGINE = 2,
    DESTRUCTDEFAULT = 6,
    DESTRUCTWRECK = 7,
    DESTRUCTTREE = 3,
    DESTRUCTTENT = 4,
    STABILIZEDINAXISX = 1,
    STABILIZEDINAXESXYZ = 4,
    STABILIZEDINAXISY = 2,
    STABILIZEDINAXESBOTH = 3,
    DESTRUCTNO = 0,
    STABILIZEDINAXESNONE = 0,
    DESTRUCTMAN = 5,
    DESTRUCTBUILDING = 1,
};
 
class CfgPatches {
    class {mod class name here} {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Characters_F_BLUFOR"};
    };
};
 
class CfgVehicles {
 
    class B_Soldier_base_F;
 
    class Example_Soldier_F : B_Soldier_base_F {
        _generalMacro = "B_Soldier_F"; //unsure what this does
        scope = 2;
        displayName = "{what you want to call the soldier}";
        nakedUniform = "U_BasicBody"; //class for "naked" body
        uniformClass = "{give the uniform a class name}"; //e.g. "Example_Soldier_F"
        hiddenSelections[] = {"Camo"};
        hiddenSelectionsTextures[] = {"{path to uniform PAA file}"};
    };
 
};
};


class cfgWeapons
class cfgWeapons {
{
    class Uniform_Base;
class Uniform_Base;
    class UniformItem;
class UniformItem;
   
class ItemInfo;
    class {use uniform a class name from above} : Uniform_Base {
        scope = 2;
class Retextured_U_B_CombatUniform: Uniform_Base
        displayName = "{Display name for the uniform}";
{
        picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";
scope = 2;
        model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
displayName = "$STR_A3_Combat_fatigues";
       
picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";
        class ItemInfo : UniformItem {
model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
            uniformModel = "-";
class ItemInfo: UniformItem
            uniformClass = "Example_Soldier_F"; //would be same as our made soldier class
{
            containerClass = "Supply20"; //how much it can carry
uniformModel = "-";
            mass = 80; //how much it weights
uniformClass = "Retextured_B_Soldier_F";
        };
containerClass = "Supply20";
    };
mass = 80;
};
};
class Vest_Camo_Base;
class Retextured_V_PlateCarrier1: Vest_Camo_Base
{
scope = 2;
displayName = "$STR_A3_V_PlateCarrier1_rgr0";
picture = "\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
model = "\A3\Characters_F\BLUFOR\equip_b_vest02";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"PathToYourTexture_co.paa"};
class ItemInfo: ItemInfo
{
uniformModel = "\A3\Characters_F\BLUFOR\equip_b_vest02";
containerClass = "Supply120";
mass = 60;
armor = "5*0.5";
passThrough = 0.7;
hiddenSelections[] = {"camo"};
};
};
class ItemCore;
class HeadgearItem;
class Retextured_H_HelmetB: ItemCore
{
scope = 2;
weaponPoolAvailable = 1;
displayName = "$STR_A3_H_HelmetB0";
picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.paa";
model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"PathToYourTexture_co.paa"};
class ItemInfo: HeadgearItem
{
mass = 100;
uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
modelSides[] = {3,1};
armor = "3*0.5";
passThrough = 0.8;
hiddenSelections[] = {"camo"};
};
};
};
};
</syntaxhighlight>


=== Packing the PBO file ===
* Open BinPBO.
* Change the Addon souce directory.
* Change the Desination directory.
* Make sure the Create signature and Binarize checkboxes are unticked.
* Click the Pack Button.


=== Loading your pbo into Arma 3 ===
And that should be it for configurations of gear and vehicles. I don’t believe this is possible on weapons.
* Create a personal mod folder with a addons folder inside.
 
** C:\Users\UserName\Documents\Arma 3\@MyAddonsFolder\addons
 
* Copy your newly created pbo to the addons folder.
PBO (addon binarization)
* Start Arma 3
Spoiler:
* In the main menu click on Configure and then on Expansions.
 
* In the menu click on your mod folder to highlight it.
So you finally have all your files ready. Your PAA files are in the P:\my_addons\{mod_name}\Data\ folder and the config.cpp file is configured and placed in the P:\my_addons\{mod_name}\ folder. There’s only two steps left to do before you can finally see your skins in-game working as an addon. You must pack the files back into a format that the Arma engine can read and then add it to the command line or use a mod manager.
* Click on Enable then on OK.
 
* Restart Arma 3.
 
    Fire up the tool BinPBO Personal Edition.
    Point the Addon source to your mod’s folder, so: P:\my_addons\{mod_name\.
    Point the Destination to your Arma 3 folder, but inside its own addon folder, so: Steamapps\common\Arma 3\@{mod_name}\Addons
    Make sure the “clear temp folder” and “Binarize” boxes are checked and then hit the “pack” button.
 
 
 
Depending on how many files it has to process the can take anywhere from 10 seconds to 5 minutes (for really large packs).
 
Now you can either open up your Arma 3 properties and add the mod to the command line or you can use a mod manager.
 
The easiest way to manage your mods is to use a mod manger. I recommend using Arma 3 Launcher by Head. It automatically detects your arma install folders (includes A2/OA) and you can save multiple profiles for Addons. This is particularly useful for switching quickly between test Addons, Zoombies DayZ, Co-op/MP friendly, or simply because one mod is conflicting with another.
 
The more tedious way to add mods to the game to read is by opening the game’s properties in your Steam library. Click “Set Launch Options” and add “-mod=@{mod_name}” to the line and then hit enter. If you have more than one mod to run with the game, write it like this: “-mod=@{mod1};@{mod2};@{mod3}” and so on.
 
And that's it! Go in-game and start testing out your new textures!
 
 
I hope you have learned enough to get started on your own mods. If there are any questions, you may definitely post them in this thread. I expect there may be questions about the configuration, so post those here as well and I will contact Stiltman to guide us together on that topic.
 
Enjoy!
 
 
 
 
 
 
 
 
 


__NOEDITSECTION__
__NOEDITSECTION__

Revision as of 11:54, 5 April 2014

[Tutorial]Simple Re-texturing Guide (From Start To Finish) by Amit

I’ve seen various guides on different stages of the texturing process, but I have not yet seen a single complete guide with all the steps laid out from start to finish with zero shortcuts taken. I've gotten a few requests for information on how I did my retextures, so I wrote this guide to allow complete novices to be able to get in on basic texturing. Using these exact methods, you’ll be able to achieve what you see in my Ghosthawk thread.

Set aside 2-4 hours to do this the first time because it takes time to get the hang of it.

Credits Before I begin I want to credit the people who made this possible:

   Bohemia Interactive for providing their proprietary tools to assist us.
   Stiltman for his texture configuration guide
   Surpher for his automated Photoshop script for converting normal maps to height and occlusion maps
   Topas for his BLUFOR Infantry template
   Saul for his BLUFOR, OPFOR, and INDEP infantry height, cavity, and occlusion map templates


Right from the start you'll need Bohemia Interactive's official mod tools (40mB). Install everything included there even if you don't think you'll be using certain tools. Texturing is often the gateway to more advanced mod creation and while you may not think you'll get into that now, something might change your mind later and you'll be glad to already have the tools installed.

Note: The Arma2Work folder will be put in a virtual hard drive called P:\ in My Computer. It is essential to almost all modding that you have this available.

I'll outline my actions briefly and then run through the procedure from start to finish unlike most other guides. Don't worry if you don't understand the terms in the following list, it'll be explained after. Also, to prevent readers from being overwhelmed by the amount of information, I have put each section in spoilers so they can open them as needed.

Actions 1. Create new blank mission in Arma 3. 2. Install BI Tools, Eliteness, the DePBO.Dll, and PAA plug-in for image editor. 3. Use Eliteness to extract files from the pbo of choice. 4. Access the texture file that you want and open it in your image editor of choice. 5. Import a downloaded texture or custom texture and use overlaying techniques to fit it over the original skin. 6. Export the final texture design as a TGA file, open it in TexView2, and save it as a PAA file. 7. Test that the texture actually works by placing the item in the editor and using setObjectTexture script command. 8. Copy the textures to my addon build folder and edit the config to allow it to be available in the editor. 9. Use BinPBO to pack the data into a pbo file. That pbo will get installed like any mod you download from online.

Preparation Run Arma 3’s editor and create a new blank mission. Call it whatever you want and then exit the game.

Currently the way I extract the textures (well, all the files including the models) is by using a program called Eliteness (75kB) to extract the files from the PBO file using Mikeo's DePBO.dll (171kB) file. After downloading both of those, use WinRar or 7zip to extract the files in the Eliteness download to a folder anywhere on your computer. Extract only the DePbo.dll file from the 2nd download into the folder where the Eliteness files are. If you don't do this, then the program won't be able to extract files from the PBOs. You'll also need an image editor that supports opening PAA files. I personally use Photoshop CS5 along with this PAA plugin (160kB). It works with both Photoshop and The GIMP. If you do not own either of those, you'll need to convert the PAA file to a TGA using TexView 2. Instructions to do this are in the Texture Editing section.

If you’re using photoshop, place it in: C:\Program Files\Adobe\Adobe Photoshop CS5\Plug-ins\File Formats\

If you’re using the GIMP, place it in: C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\

Once you have done that, open Eliteness. On the left pane browse to your Arma 3 folder, go into the addons folder and click on the category of whatever you're looking to edit. For me, I wanted to get straight to work on the Ghosthawk, so I would look for it in air_f.pbo, but the only stuff contained in there was the alpha aircraft. The aircraft added in the beta are in air_f_beta.pbo. Another example is if you want to edit one of the APCs added in the beta, you would have to open up the "armoured_f_beta.pbo" file in Eliteness. In the left pane when you see the pbo you want to extract, double-click on it. It'll ask for a confirmation. Click yes. It'll extract the files to the /Steamapps/Common/Arma 3/Addons folder.

Previously there were no folders in the Addons folder, only the pbo files. Now you'll have a folder called whatever the PBO was labelled. Open that and then look for the vehicle you want. In my case the Ghosthawk is known as heli_transport_01. So I opened that folder, opened the Data folder and looked for the texture I want. There are two versions of the Ghosthawk (black and green), but I primarily use the green one for my textures as you may have noticed.

The PAA textures you want to grab are anything that relates to the section of the skin you want to edit BUT also has “_co.paa” on the end. This signifies that you editing the actual base colour of the skin. I won’t go into the specifics as to what the other ones mean.

Once again, for example, the Ghosthawk has the exterior and the interior. I was only interested in the exterior so I opened “heli_transport_01_ext01_blufor_co.paa”. I quickly noticed that there was no tail or rotor sections present in that skin. I assumed “ext01” meant exterior 1 to signify there are more parts to be displayed on the model in-game. Sure enough when I opened “heli_transport_01_ext02_blufor_co.paa” the tail portion of the helicopter was present. That was good news.

Make no mistake, there are A LOT of files you will be working with at this point, so organization is key. You should create a dedicated folder called “Arma 3 Texturing” in My Pictures to hold the numerous files you’ll be handling. After that, create a folder called whatever you are editing. For me it was the Ghosthawk. Inside that folder copy the relevant PAAs you want to edit here so you have a base to work from. I’m going to assume you have an idea of what you want to add to your skin, so create a new folder with the name of that. For me, I was editing camouflage patterns so I called the folder “camos”. Inside that folder I created subfolders for each pattern I wanted to create (e.g. Crystal, Hex, Russian, etc). Yes, a lot of folders I know, but this will help keep your retextures separated and easy to find. Next we can move onto the actual editing of the skin.

Texture Editing Open your image editing program. From within the program, open any PAA files you copied from the original Data folder to the Arma 3 Retexture\{mod name here}\ folder. You’ll be asked to discard mip maps. Click YES. Mip maps are used for displaying textures at various ranges so that the full-res version doesn’t need to be used all the time. This helps speed up rendering of the texture at range. So now you have the base skin open in your program like you’re a surgeon and it’s your patient with its chest cavity exposed. Soon you will be performing surgical actions, so you can call yourself a doctor for the next few steps. We are, afterall, doctoring the textures to our liking, heh.

Note: If the PAA plugin does not work, then convert the PAA to a TGA in TexView 2 and then open that in the editing program. To do this, open the PAA in TexView, go to File>Save As, name the file what you want, but change the ".paa" to ".tga" and then change the file type to "All Files". Save it and now you have a proper TGA file. It's a hassle, but necessary if the PAA plugin is not an option for you.

The best looking retextures are probably produced using the pen tool, but that’s a bit too advanced for beginners. A great alternative for quick edits is the Polygonal Lasso Tool. Personally, that’s what I use since you can be somewhat rough with it and your skins will still show up fine in-game. At least, that is my experience and you can confirm it by checking them out using the link to my WIP thread above.

If you are doing work on editing infantry, there is a set of handy BLUFOR infantry PSD templates (205mB) made by Topas to make the entire process much easier. The set includes 4 templates: Uniform, Vest, Helmet & Misc. Equipment, and Armour. It is very easy to use those templates. Just open the PSD of the section you want to edit, disable all the layers except for "Layer 1", import your texture in and match it up to cover the same area as "Layer 1". Then, re-enable the layers that you disabled earlier and that should be ready for exporting. There are also some templates created by Saul to help with making cleaner looking retextures, but you'll need to actually do some work to shape your textures properly using these templates. Saul's BLUFOR, OPFOR, and INDEP (248mB) templates each include cavity, height, and ambient occlusion maps. Usually, the only one that you will require is the ambient occlusion map to be placed over top your retexture (diffuse map). This will be explained in a bit more detail a nearing the end of this section.

Unfortunately, we don't have templates for everything other than the BLUFOR infantry. So for anything else, select the Polygonal Lasso tool in Photoshop or its equivalent in the GIMP. In Photoshop you may have to right-click the Lasso Tool icon and select “Polygonal Lasso tool” in order to access it. Click on the outside edge of the section you want to edit and continue clicking along the edge of it until you end up back at the start. The final click will need to be on the first point you click to close the selection. If you mess up one of the points, hit Delete to remove it and try again. If there are windows or other shapes inside the select that you do not want to be textured over, then look in the top left section of the mainbar. You’ll see four icons with squares. You want to click on the one 3rd from the left (one solid square, one dim square). What this allows you to do is use the lasso tool to select the sections you DON’T want to end up in the final selection. When you’re done, you’ll want to duplicate that selection into a new layer to preserve the outline for later when you add your custom texture. To do this, hit Ctrl+J on the keyboard. I’m not sure what the hotkey is for the GIMP. You’ll see a new layer called “Layer 1” in the layers pane above the “Background” layer. You can click the little eye icon for Layer 1 since we won’t need to look at it anymore.

Note: Be sure to save your project as a PSD right now. You do not want to redo this tedious process.

Now, this is the part where you must import your custom texture into the project. Whether you crafted the pattern by hand or downloaded it from the internet matters not. The only thing that matters is that it is a high enough resolution to look good on whatever you’re texturing. The Ghosthawk is a large aircraft, so I aimed for textures 2048x2048 pixels in size and resized them to be smaller if necessary. Usually you’ll want your texture to cover the entire original texture’s area. Drag and drop your custom texture into the image editing workspace. It’ll now be the top layer as “Layer 2”. This is what you want, but it’s clearly not what you want it to look like ingame. Basically, you need to find a way to overlay the texture over the original such that the detail of the base texture is kept, but your own texture shows up. I find that the Color Dodge layer blend mode works fine for 90% of the custom textures I’ve used. To do this, select the new texture in the layer pane and click the drop down in the top left of the pane to select “Color Dodge”. What you see now will depend on the colour of both the base skin and the new texture. What you should see is a decent blend between the two. If it looks too dark, you may have to play around with the blending setting on the layer to find one that does look decent. I find that Soft Light will work alright with darker texture combinations.

Align the new texture over all the sections as mentioned before. Now, look down to the layers pane you should see little preview windows of each layer. Hold Ctrl and click on that little preview, but make sure the the new texture (Layer 2) is still selected. Now hit Ctrl+J again to duplicate that layer into Layer 3. Now you should have the area that you want retextured looking super bright. This is fine, just tick the little eye icon on Layer 2 to disable it. Now you should have it looking the way you want it.

At this point you’ll want to make a judgement call. If your texture looks comfortably visible and bright, then you should add a layer that darkens the overall retexture a bit. In my experience, when the sun hits the skin in-game, nice vivid looking skins from photoshop turn into bright glare generators. To do this, create a new layer by hitting Ctrl+Shift+N on your keyboard. Make sure that new layer (Layer 4) is selected and then do the Ctrl+Click thing on the retexture. It’ll show the selection and now hit Shift+F5 on your keyboard. In the Content section select Black and in Blending, keep mode at normal and opacity at 100%. Hit enter. Your skins turned completely black. No worries, just go to the Opacity area in the Layers pane for Layer 4 and lower it to something that looks less bright, but still comfortably colourful (or whatever you’re going for). I generally use something around the 45% mark. Example to follow.

Too Bright

Just Right

Once you have your texture looking the way you want it, you now need to put something called an ambient occlusion map over your texture. This allows you to retain the sharp detail of whatever you are texturing over. This becomes especially important if you plan to completely replace the original texture and to not use overlaying techniques. If you used Topas' template earlier for your infantry texture, don't worry about this part. If you used Saul's template then you already have the ambient occlusion map in the PSD file. If you were not using either of those, then you will need to generate the occlusion map yourself. Surpher has kindly uploaded an automated script for using the normal map of the model to generate the height and occlusion maps. You may obtain the script fromhis reply to this thread. You will need the program xNormal (156mB) in order for the script to run properly.

Download the action file and place it in Adobe Photoshop CSx\Presets\Actions folder, where "CSx" is whatever version of Photoshop you have. Examples: CS, CS5, CS5.1 Download and install xNormal. You don't need any of the video codecs, but they are highly useful to have on your PC in general. Once both of those are installed, go into the /Steamapps/Common/Arma 3/Addons/ folder and go back to the folder where the original textures are. For whatever "_co.paa" texture you opened in Photoshop/GIMP, find the corresponding "_nohq.paa" file, open it in TexView 2, save it as a TGA instead of PAA (change file extension to .tga), and then open that up in Photoshop. At the top of the program, click on "Window", then "Actions". This opens the actions pane. You may or may or may not need to add the downloaded action manually. Click this: then click "Load actions", browse to the action file and open that up. The new action will show up in the Actions pane. Click the little blue arrow next to "Normal Map Conversion" and highlight the entry "Normal _To_AO_&_Height" Then hit the little play button at the bottom of the Actions pane. This will create the height and occlusion maps. When it's done, drag and drop the occlusion map layer onto your retexture's document space and set the occlusion map layer's blending to "Multiply". The edges of your texture should bee more accentuated and darker. You may close all other documents open in Photoshop except your retexture.

Now you can export the texture.

You’ll want to export it as a .TGA (Targa) file because the PAA plugin doesn’t do a good job of regenerating the new mip maps in the new PAA file. TexVeiw 2 gets the job done properly and quickly. Call the tga files whatever you like. For my Ghosthawk skins I used “{pattern name}.tga” and “{pattern name}_tail.tga” formats. Highlight both of the TGA files in the project folder and hit enter to open them both with TexView 2. Go to File>Save As. In the file name box remove the .tga on the end and then click save. Do that for both files. The time it'll take to convert each tga file into the PAA file will vary depending on the resolution of the texture, so be patient. You’ll know it’s finished when you have the square box cursor back on the texture in TexView 2. This completes the texture editing section.


In-game Texture Test Alright, you’ve made it this far and you’re almost to the point of getting it in-game for glorious viewing. There is one of two things you can do:

1. Test the new textures using the setObjectTexture command or 2. Edit the config file and package it up into a PBO right away.

I highly recommend testing the textures in-game BEFORE packaging them into a PBO addon because this way you can quickly see what the skins actually look like in-game and inspect them. It’s very useful for finding areas of the skin that need to be polished. The reason this is so quick and easy is because the files stay as PAA format rather than the extra step of writing the config code, binarizing it into a PBO and then adding it as an addon to Arma 3. All you have to do is drop the PAA files in to the folder containing the blank mission files from the first step. The mission folder is in Documents\Arma 3\missions\{mission name}.stratis.

Launch Arma 3, go to the editor and open the blank mission you created earlier. Navigate to the Stratis airfield and plop the item down onto the runway. In my case I placed a regular Ghosthawk. In the initialization box I put the following:

Code:

this setObjectTexture [0,"russian.paa"]; this setObjectTexture [1,"russian_tail.paa"]

In order for the custom textures to show up, you need to specify what they are replacing and where they are located. The 0 represents hidden selection #1 on the ghosthawk. This is the main body, so I wrote the PAA name for the body and the 1 in the second entry specifies the location of the tail’s texture. A third entry with 2 would likely replace the glass as the hidden selections appear to be in the order that the textures are from the Data folder extracted from the pbo. Now, click okay and then hit Preview to check it out. You should now be able to see your newly created retexture. Use the overcast feature in the editor to see how it looks in both full sunlight, 50% overcast and 100% overcast at midday. That should help give the best representation of what your skins will look like. Remember, if it looks too bright or something, you can just open the PSD file again and make tweaks.

Configuration Creation Your configuration file will depend on the type of item you are editing. Finding the code is somewhat of a drag if you aren’t familiar with scripting/programming. Below I will include the exact ones I use as a template to help you guys with yours. So far I have only tested infantry helmets and vests along with vehicles.

I’ll begin with vehicles (specifically helicopters) for the configuration. Unfortunately I do not recall where I got the code for the helicopters, but I know that it is a mix of someone’s helicopter config and my own configuration. If I find the article again I will add them to the credits.

You’ll want to start by creating a new folder somewhere on your computer to hold the mod files before they are packaged into the PBO. I suggest going into the P:\ drive and creating a new folder called “my_projects” and inside that call your mod whatever you want. I called mine “UH80. In that folder create another folder called “Data” and also create a new .txt file by right-clicking on the white space then going to New > Text Document. Name the document “config” and replace the .txt on the end with .cpp. Click yes to confirm the change of file type. Inside the Data folder, copy and paste your final PAA files into this folder.

Many addons combine everything into a single PBO (e.g. Infantry/vehicle skins), but some also separate items like weapons from skins. This is most likely to organization easier. To keep things simple, we’ll begin with a standalone addon where the item you edited is not mixed with other types of textures. So, we’ll keep vehicles separate from infantry, although, there is no reason why you can’t have both together in the same configuration.

For helicopters, this is the code you’ll be using: Image

Don’t add any of this to the config.cpp file just yet. Let’s analyze this code first and find what you need to change in order to make your skins work. In section 1 you see: Code:

class UH80_skins {

       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Air_F_Beta_Heli_Transport_01"};
   };

The “class UH80_skins” represents the name of your modification. The UH80_skins will be changed to whatever you named the mod. Make sure there are no spaces, though. Use underscores for spaces. The rest of this section can be left alone.

Section 2 looks like: Code:

class Heli_Transport_01_base_F;

   class UH80_crystal_FG: Heli_Transport_01_base_F

Under cfgVehicles, the class of the base vehicle needs to be defined. That’s what the “class Heli_Transport_01_base_F;” is. The part relevant to our interests is where you see “UH80_crystal_FG”. This specifies the class name to be reserved for the specific pattern in the game. You will need to change that to whatever you want the class name to be in-game. The “:Heli_Transport_01_base_F” stays the same.

Note: If two items have the same class name from two different addons, there will be a conflict, so try to make it fairly unique to your addon.

Section 3 is the meat and the potatoes: Code:

{

           _generalMacro = "B_Heli_Transport_01_F"; 
           scope = 2; 
           side = 1; 
           faction = "BLU_F";                 //Change to your faction 
           displayName="UH-80 Crystalhawk (Foliage)";
   crew = "B_Helipilot_F";             //Change to your pilot 
   hiddenSelections[]= {"camo1","camo2"};
   hiddenSelectionsTextures[]= {"P:\UH80\Data\crystal.paa","P:\UH80\Data\crystal_tail.paa"};            
   typicalCargo[] = {"B_Helipilot_F"}; 
           availableForSupportTypes[] = {"Drop","Transport"}; 
      };

This section only has a few things to edit, thankfully. The line “displayName="UH-80 Crystalhawk (Foliage)";” is what defines the name of the item in the editor. So, if I wanted to name that vehicle to something else, I’d just replace the "UH-80 Crystalhawk (Foliage)" with the new name. “hiddenSelections[]= {"camo1","camo2"};” is used for selecting what areas of the model will be replaced with the custom texture. Earlier I mentioned that the hidden selections appear to be in the order that they appear in the Data folder. This is true for the Ghosthawk so I used camo1 and camo2 to define those selections. If the model only requires one hidden selection to be used, then use just “camo”. The line below that is what assigns the textures to the hidden selections. Change "P:\UH80\Data\crystal.paa" and "P:\UH80\Data\crystal_tail.paa" to the textures that you created.

That’s it. The rest can be left as they are. If you want to change with faction to add the vehicle to, then use the Six Config Browser to find the class name of the faction you want to use and replace it with that. In the top right section of the site, click on the mod name in the white box and select ARMA 3 Beta. That will give you the correct class names. If there’s a specific infantry unit you want to place as the default crew for when you spawn the vehicle, you can edit that field with the class name of the unit.

I’m not entirely sure everything you see above is absolutely needed just for changing the textures, but I left it in just to give you an idea of what is taken into account when the mods are processed in the editor and how to change certain things.

So now that you know what needs to be changed, copy the following code into your config.cpp file and make the necessary changes. Spoiler: Code:

class CfgPatches {

   class {mod class name here} { //e.g. UH_80_unique
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Air_F_Beta_Heli_Transport_01"};
   };

};


class cfgVehicles {

   class Heli_Transport_01_base_F; 
   class [COLOR="#FF0000"]{name the specific texture}[COLOR="#FF0000"]: Heli_Transport_01_base_F     
       { 
           _generalMacro = "B_Heli_Transport_01_F"; 
           scope = 2; 
           side = 1; 
           faction = "BLU_F";  <--Change if necessary for your mod                
           displayName="{name of the vehicle in the editor}";
       crew = "B_Helipilot_F"  <--Change if necessary for your mod
       hiddenSelections[]= {"camo1","camo2"};  <--Change to reflect how many sections you are replacing
       hiddenSelectionsTextures[]= {"{path to texture 1}","{path to texture 2}"};            
       typicalCargo[] = {"B_Helipilot_F"}; 
           availableForSupportTypes[] = {"Drop","Transport"}; 
      };  

};


For helmets, this is the code you’ll be using: Spoiler: Code:

enum {

    //  = 2,    // Error parsing: Empty enum name
   DESTRUCTENGINE = 2,
   DESTRUCTDEFAULT = 6,
   DESTRUCTWRECK = 7,
   DESTRUCTTREE = 3,
   DESTRUCTTENT = 4,
   STABILIZEDINAXISX = 1,
   STABILIZEDINAXESXYZ = 4,
   STABILIZEDINAXISY = 2,
   STABILIZEDINAXESBOTH = 3,
   DESTRUCTNO = 0,
   STABILIZEDINAXESNONE = 0,
   DESTRUCTMAN = 5,
   DESTRUCTBUILDING = 1,

};

class CfgPatches {

   class {mod class name here} {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Characters_F_BLUFOR"};
   };

};

class cfgWeapons {

   class ItemCore;
   class HeadgearItem;
   
   class example_HelmetB : ItemCore {
       scope = 2;
       weaponPoolAvailable = 1;
       displayName = "{what you want to call the helmet}";
       picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.paa";
       model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
       hiddenSelections[] = {"camo"};
       hiddenSelectionsTextures[] = {"{path to helmet PAA file}"};
       
       class ItemInfo : HeadgearItem {
           mass = 100;
           uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
           modelSides[] = {3, 1};
           armor = 3*0.5;
           passThrough = 0.8;
           hiddenSelections[] = {"camo"};
       };
   };

};


Most of what you see above isn’t too important. Just edit the sections that are highlighted in red text. The same will be true for the vests and uniforms.

The code for vests: Spoiler: Code:

class CfgPatches {

   class {mod class name here} {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Characters_F_BLUFOR"};
   };

};

class cfgWeapons {

   class Vest_Base;
   class VestItem;
   
   class example_PlateCarrier1_rgr : Vest_Base {
       scope = 2;
       displayName = "{what you want to call the vest}";
       picture = "\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
       model = "\A3\Characters_F\BLUFOR\equip_b_vest02";
       hiddenSelections[] = {"camo"};
       hiddenSelectionsTextures[] = {"{path to vestPAA file}"};
       
       class ItemInfo : VestItem {
           uniformModel = "\A3\Characters_F\BLUFOR\equip_b_vest02";
           containerClass = "Supply100";
           mass = 50;
           armor = 5*0.5;
           passThrough = 0.7;
           hiddenSelections[] = {"camo"};
       };
   };

};



Now, Stiltman made a note about using uniforms on soldiers, so you must read and understand what he says before continuing on with uniform retextures:

Spoiler: Quote Originally Posted by Stiltman View Post Uniforms seem to be working a little bit diffrent from what i gather they are in fact soldiers and when switching uniform the game just switches class/model on your soldier. so one would have to make a new soldier aswell as a new item.

this example will put your soldier under bluefor as Uniform Test Soldier

for the soldier its in CfgVehicles.

Code:

class Example_Soldier_F : B_Soldier_base_F {

       _generalMacro = "B_Soldier_F"; //unsure what this does
       scope = 2;
       displayName = "Uniform Test Soldier";
       uniformAccessories[] = {};
       nakedUniform = "U_BasicBody"; //class for "naked" body
       uniformClass = "Example_CombatUniform_mcam"; //the uniform item
       hiddenSelections[] = {"Camo"};
       hiddenSelectionsTextures[] = {"pathtoyouraddonretexturefile.paa"};        
   };

and then the uniform item linking it to the soldier class making it an item in the gear menu without this it works as regular arma 2 and it will show no uniform in gear.

Code:

class Example_CombatUniform_mcam : Uniform_Base {
       scope = 2;
       displayName = "Example Mcam uniform";
       picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";
       model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
       
       class ItemInfo : UniformItem {
           uniformModel = "-";
           uniformClass = "Example_Soldier_F"; //would be same as our made soldier class
           containerClass = "Supply20"; //how much it can carry
           mass = 80; //how much it weights
       };
   };


Full code for uniforms: enum {

    //  = 2,    // Error parsing: Empty enum name
   DESTRUCTENGINE = 2,
   DESTRUCTDEFAULT = 6,
   DESTRUCTWRECK = 7,
   DESTRUCTTREE = 3,
   DESTRUCTTENT = 4,
   STABILIZEDINAXISX = 1,
   STABILIZEDINAXESXYZ = 4,
   STABILIZEDINAXISY = 2,
   STABILIZEDINAXESBOTH = 3,
   DESTRUCTNO = 0,
   STABILIZEDINAXESNONE = 0,
   DESTRUCTMAN = 5,
   DESTRUCTBUILDING = 1,

};

class CfgPatches {

   class {mod class name here} {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Characters_F_BLUFOR"};
   };

};

class CfgVehicles {

   class B_Soldier_base_F;
   class Example_Soldier_F : B_Soldier_base_F {
       _generalMacro = "B_Soldier_F"; //unsure what this does
       scope = 2;
       displayName = "{what you want to call the soldier}";
       nakedUniform = "U_BasicBody"; //class for "naked" body
       uniformClass = "{give the uniform a class name}"; //e.g. "Example_Soldier_F"
       hiddenSelections[] = {"Camo"};
       hiddenSelectionsTextures[] = {"{path to uniform PAA file}"};
   };

};

class cfgWeapons {

   class Uniform_Base;
   class UniformItem;
   
   class {use uniform a class name from above} : Uniform_Base {
       scope = 2;
       displayName = "{Display name for the uniform}";
       picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";
       model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
       
       class ItemInfo : UniformItem {
           uniformModel = "-";
           uniformClass = "Example_Soldier_F"; //would be same as our made soldier class
           containerClass = "Supply20"; //how much it can carry
           mass = 80; //how much it weights
       };
   };

};


And that should be it for configurations of gear and vehicles. I don’t believe this is possible on weapons.


PBO (addon binarization) Spoiler:

So you finally have all your files ready. Your PAA files are in the P:\my_addons\{mod_name}\Data\ folder and the config.cpp file is configured and placed in the P:\my_addons\{mod_name}\ folder. There’s only two steps left to do before you can finally see your skins in-game working as an addon. You must pack the files back into a format that the Arma engine can read and then add it to the command line or use a mod manager.


   Fire up the tool BinPBO Personal Edition.
   Point the Addon source to your mod’s folder, so: P:\my_addons\{mod_name\.
   Point the Destination to your Arma 3 folder, but inside its own addon folder, so: Steamapps\common\Arma 3\@{mod_name}\Addons
   Make sure the “clear temp folder” and “Binarize” boxes are checked and then hit the “pack” button.


Depending on how many files it has to process the can take anywhere from 10 seconds to 5 minutes (for really large packs).

Now you can either open up your Arma 3 properties and add the mod to the command line or you can use a mod manager.

The easiest way to manage your mods is to use a mod manger. I recommend using Arma 3 Launcher by Head. It automatically detects your arma install folders (includes A2/OA) and you can save multiple profiles for Addons. This is particularly useful for switching quickly between test Addons, Zoombies DayZ, Co-op/MP friendly, or simply because one mod is conflicting with another.

The more tedious way to add mods to the game to read is by opening the game’s properties in your Steam library. Click “Set Launch Options” and add “-mod=@{mod_name}” to the line and then hit enter. If you have more than one mod to run with the game, write it like this: “-mod=@{mod1};@{mod2};@{mod3}” and so on.

And that's it! Go in-game and start testing out your new textures!


I hope you have learned enough to get started on your own mods. If there are any questions, you may definitely post them in this thread. I expect there may be questions about the configuration, so post those here as well and I will contact Stiltman to guide us together on that topic.

Enjoy!