This is a follow up to my ` BISoldier Model Tutorial `tutorial.
I got some great feedback form the tutorial but, there were also issues that would take a lot of fixing due to the base model being used.
What I aim to do with this tutorial is run through the whole process again, this time with a far better base model whilst also addressing the issues that were brought to my attention.
Main Issues that are fixed:
A bit of information on the base model used for this tutorial...
For this tutorial I will be using one of Synides decoded MLOD models. Synide made this model (amongst others) available on his FTP. Unfortunately he cannot make the models available 24/7 so, I have made this model only available for download in .ZIP format. The file is completely unaltered and is as Synide provided it.
One bit of advice I will give you at this stage is don't rush! I know you are probably very eager to get your model working in-game but rushing will only lead to mistakes being made - which in turn will lead to frustration at having to re-do the steps again!
This tutorial is written as to be understood by people who may have never touched an OFP/ArmA editing tool. That said, learning is also progressive. The tutorial is designed to be read from start to finish. I will go into some detail early on in the tutorial but I will be less specific later when certain repetitive tasks have already been covered.
I am assuming that readers of this tutorial have a basic knowledge of computers. If you do not have even the basic knowledge then I suggest you familiarise yourself with some basic functions like creating and renaming files and folders, how to copy and paste (and their shortcuts) and showing hidden file types.
I will, where possible list shortcuts to these basic functions but I don't want to detract too much from the tutorial itself.
I also suggest you read a few lines ahead of yourself when you progress through the tutorial. I have written it methodically so it should be quite easy to follow but a quick glance through each part will give you some idea of what lies ahead. Some tasks may seem confusing, reading just a little ahead of where you are up to will probably answer your questions.
Before we can even attempt to get our unit in game there are a few prerequisites.
The tutorial will start with me assuming the following criteria have been carried out by the reader:
The first thing to do before we start is set up our folder that we will be working from. Simply create a new folder on your Tools Drive (P:\) and name it ` BISoldier `. You can name the folder whatever you wish but for ease of following the tutorial and to save confusion later, it may be better to stick to this. This is the folder we will be working from and eventually will pack to make our addon.
Next we need now is to place the files inside this folder that will form our addon.
Locate the us_soldier_ru_sleeves.rar file (see ` What we will need ` chapter) and unzip it to the BISoldier folder we just created.
On unzipping the .rar file you will see we have two new files, us_soldier_p3dm.p3d and us_soldier.rpt - The .p3d file is the actual model and the .rpt file is a generated report listing information on the .p3d model. The .rpt file is not actually needed for the final addon but we will keep it for now as it holds some much needed information for the next stage.
To personalise our model and set the folder up ready for the associated files we need to to do the following:
The content of your BISoldier folder should now look similar to this (depending on OS):
In this part of the tutorial we are going to look at fixing the decoded MLOD model.
Synide did a great job of decoding most of the BI ODOL models, I don't know too much about the process he uses but from what I gather a small error occurs during the decoding process.
Apparently with Direct X, a vertice cannot belong to more than one face, this means that during decoding the model `breaks`.
Luckily this can quite easily be fixed manually by us in O2PE.
What we have just done is joined all the `broken` parts of the first resolution Lod (1.000) that decoding had affected by merging the vertices that were extremely close to each other.
We now need to do this for all the Lods listed. (Maybe not all the Lods need this doing but merging them anyway doesn't seem to harm them)
For your reference here are the Lods you will be merging in the bisoldier.p3d :
We now have the model in our addon folder, what we need to do now to make our model standalone is to gather the associated files that go with it.
This is where the .RPT file that you unzipped along with the .P3D earlier comes in handy. There are other ways to find out what textures and material are used on a model but for this tutorial we will use the .RPT file.
You will see all sorts of information relating to our model but for now all we are interested in is this bit:
This part of the .RPT file gives a list of the textures and materials used on our model. These are the textures we will need to locate and place in our own BISoldier folder. You can see the location and path in which the model in its current state will look for the textures.
It is worth noting at this point the texture file extension is .PAA and the material file extension is .RVMAT
It is always worth taking time to look at the paths for few minutes and familiarising yourself with them. The listed paths tell you exactly which .pbo files we need to extract in order to get the textures and materials for our model.
You can see from our .RPT file that we only need to extract the characters.pbo and wheeled.pbo - This what we will do now:
The contents of the .PBO file will then be extracted to your ArmA addons folder.
The contents of the wheeled.pbo will now be extracted to your ArmA addons folder.
Just to summarise, you should have located both the characters.pbo and the wheeled.pbo , extracted them both using Kegetys ArmA Tools and the extracted folders should now be residing in your ArmA addons folder by default.
What we do now is take the first texture/material listed in our .RPT file and locate it in the characters folder.
You will notice one of the files is NOT located in the characters\data folder but in the characters\hhl folder:
This file must be copied and pasted in to your BISoldier\hhl folder
You will also notice that 2 of the files are located in the wheeled folder and NOT in the characters folder:
It is OK to copy these from the wheeled\data folder and paste them into your BISoldier\data folder
Your BISoldier/data folder should now look like this (or similar dependant on OS)
The contents of your BISoldier\hhl folder should look like this:
For now, this is the source textures and materials gathered as per the .RPT file, their will be a few more to gather later. Each material file (.rvmat) needs accompanying files for them to work so, we need to open each file and acquire them.
First we will have a short break from this and actually fix the texture & material paths to our model.
Now we have gathered the texture and material files associated with our model as listed in the .RPT file, we have enough sources to correct the paths in our model via O2PE.
You should see your model visible on the screen with no opening error messages.
Don't concern yourself with all thee options and menu's at this stage. We won't be using 99.9% of them for this tutorial!
This will bring up a window showing you all the files associated with the model.
You will notice that the paths are in red, this because the paths are incorrect. By incorrect I mean that O2PE has searched for the path name on the local drive (P:\) and didn't find them. If we actually packed up our model with the current paths it would still work as once the bisoldier.pbo was in our addons folder it would be able to locate these files. Because the paths are incorrect it also means that if we view our model it will not have any textures.
Lets do this..
You will see once the viewer has loaded that we get an error message:
This is because – as stated earlier, our model will be searching for the textures in the default location and cannot find them on the Tools Drive .
As this tutorial is aimed at making a stand-alone model them we need to correct those paths to point to our BISoldier folder and not the above listed ones.
You will see once you select a file that it appears in the Name to rename section at the bottom of the window
What we do now in the New name section is to type the New path to our BISoldier folder. Like so:
You will see now that our previously red texture path has turned black – a good indication that all is good so far.
If your text didn't turn black it means either the path is wrong or the texture isn't located in that location. Check both again.
If everything went as planned then you need to rename ALL the texture and material paths so they point to the correct location – our BISoldier folder. You will find the Windows Copy/Paste function (CTRL+C/CTRL+P) a very useful tool at this stage.
You list should now look like this:
Now we can go back to the viewer/bulldozer again and see what difference renaming the paths has made.
You may be surprise at this stage with an error message:
Don't worry about that we, will come to that in a second..
You can see model will have improved somewhat but, there is still something not quite right - That is what the error message was telling you.
Before we continue, let's just go back and look at that error message again:
The message is telling us that the us_soldier_equip.nohq.paa file was not found.
I know for those of you who are keeping up with me so far are thinking “but that file name wasn't listed in our .RPT file or our texture and material window in O2PE?”
You are correct – It wasn't. This error has to do with the .rvmat (material) files. As I mentioned earlier, each .rvmat requires a number of other files present to work.
What I am going to show you next is how to locate those required files so we can get our material working OK.
We will need to rename the paths inside the .rvamts with a program called MatEditor , MatEditor is located inside the Oxygen 2 Personal Edition folder (Default location is: Program Files \ Bohemia Interactive \ Tools \ Oxygen 2 Personal Edition \ MatEditor.exe )
The only problem is that the MatEditor will not directly open the files and you will get an error message warning you of this.
To make it so that the .rvmat files can be open by MatEditor we need to open them up and save them again in EliteNess .
It doesn't really matter which .rvmat you open first but for ease, speed and to be methodical open up the files in order. In this case you will NOT need to open the ` empty_nzw.rvmat ` file as it contains no info we need to amend.
For this tutorial choose ` us_helmet_reflections.rvmat` first
You should now see the information contained in the .rvmat
On closer inspection of this information you will notice texture paths listed.
texture = "ca\characters\data\molle_equipacu_nohq.paa";
You will also notice that these files were NOT asked for in the .RPT file or the Mass Texture & Material renaming tool in O2PE! If you are REALLY paying attention you will also notice that the file listed is probably the one that gave us an error message in O2PE when we tested out model in the Viewer!
Now, we could just rename the file here to suit our needs then save. But as this is a learning tutorial I want to show you how to use the MatEditor to rename material paths too.
All we are going to do at this stage is save the file again.
Use EliteNess to open up and then save all the .rvmat`s in the list. You do not need to alter them in anyway.
For this tutorial you will only be opening and saving the following files:
Why are we doing this again? After opening the .rvmat files and saving them in EliteNess they will now open up directly in MatEditor without any errors.
*REMEMBER you only need to open up and save .RVMAT files – leave the .PAA files alone*
Once you have opened and saved all the .rvmat files contained in our BISoldier\data folder we can move onto the locating, gathering and renaming of the required files.
Again, for this tutorial we do NOT need to open the ` empty_nzw.rvmat ` file.
.rvmat files can be opened up in any order but to keep it easy for you to track which files you have fixed then I suggest you start at the beginning. In this case open up ` us_helmet_reflections.rvmat ` file first.
Certain settings (Diffuse, Forced Diffuse, Emissive, Specular, Specular Power, Default Texture) can be ignored for this tutorial.
You will see however that some settings have a path name assigned to them (Stage Config boxes). You will also see that the path is again incorrect for our model and still has reference to the ca\characters folder:
This is why we got our error message when previewing our model earlier in the Viewer/buldozer
The good thing is, we now know what files are missing and which we need to locate and transfer to our BISoldier\data folder.
At this point we need to do TWO things.
With a bit of window swapping (ALT+TAB) we can easily move around between the different windows and MatEditor relocating and renaming the required files.
I will use the currently opened .rvmat as an example.
The file is now in place, lets fix the path in MatEditor :
It is important at this stage to use the same character case as used in you folders and files, if you called your folder bisoldier then don't type BISoldier here as the files are CaSe SeNsItIvE. Copy/Pasting is recommended to ensure correct paths are named.
To recap, we should have gone from this:
Don't use the ` File> Save` or `File> Save As…` options, these have given me strange errors with the .rvmats. Clicking the ` Save!` button is fine.
You will also see now the red asterix is gone, letting you know the file saved OK.
The process of opening up the .rvmats, finding the textures we need, copy/pasting them from the ca\characters folder to our BISoldier folder and finally renaming the paths HAS to be done on ALL the .rvmat files associated with our model.
For your reference, here is a list of what files are associated with the relevant .rvmats for this tutorial. During the process described above, I had to locate and move the Associated files from the extracted characters\data and characters\hhl folders (from within our ArmA addons folder) and place them in our BISoldier\data and BISoldier\hhl folders.
Material (.rvmat) name:
Material (.rvmat) name:
Material (.rvmat) name:
Material (.rvmat) name:
Material (.rvmat) name:
Also for your reference, here is list of the path names I had to change whilst amending the .rvamat files.
These are the original path names:
..and a list of what I had to change them to (in order)
At this stage your BISoldier\data folder should look similar to this:
And your BISoldier\hhl folder should similar to this:
With this done we can now close down MatEditor and return to our bisoldier.p3d model O2PE.
If you have been following the tutorial closely your instance of O2PE should have been saved and closed down.
If everything went as planned you should not receive any error messages regarding textures. If you did you need to make a note of the textures mentioned in the error message and go through the process again. It is more than likely you moved the wrong textures into our BISoldier folder (which is easily done) or you misnamed one of your .rvmats paths in the MatEditor.
You WILL however get error messages pertaining to missing proxys (i.e xxx_proxy.p3d ) – don't worry about this, these messages are OK.
You should now be seeing a significant change in our soldier model:
At this stage the model could be bundled along with a config.cpp file and will work perfectly fine in-game.
One thing you won't have noticed about your model while scrutinising it and admiring your work in the Viewer/bulldozer is that it hasn't any wound textures. In this section we will look at getting the wound textures to work on your model.
Like the previous parts of this tutorial, this part is going to see us gathering the relevant files and renaming the paths so they point to our BISoldier folder making it stand-alone
What I want to do first is explain very quickly about the format for defining wound textures.
If you look at a configuration file for a unit model you will see a section that defines the wound class , you will also see the relevant .rvmat files listed:
Let's break those listed .rvmat files down in order and describe what they are/what they do:
Now let's look at the next set of .rvmat files
So, how do we know what files are associated with the wounds?
There a few ways of doing this. I will guide you through the method which seem the most quickest and practical to me first.
As far as I can see in Armed Assault , on every soldier model there are two files present that follow the same name format. Look at any unit model configuration and you will see a file that ends in ` _hhl.rvmat ` and a file that ends in `_body.rvmat `
NOTE: Queens Gambit does not appear use the same format when naming the .rvmats. A little experimentation will have to be carried out in this case.
Right back at the beginning of the tutorial when we gathered the texture and material files you will notice we had these two files:
What we do at this point is quite simple.
The us_rukavy_hhl_wound1.rvmat and us_rukavy_hhl_wound2.rvmat, by the way they are named, are clearly associated with our us_rukavy_hhl.rvmat file.
Next we are going to locate the wound files that are associated with our _ body.rvmat file.
Just as with the us_rukavy_hhl_wound1.rvmat and us_rukavy_hhl_wound2.rvmat, files, the us_soldier_rukavy_body_wound1.rvmat and us_soldier_rukavy_body_wound2.rvmat are clearly associated with our us_soldier_rukavy_body.rvmat file.
To recap what we just did:
The next step of this part of the tutorial is to do what we have been doing with all the .rvmat files that we have added to our BISoldier\data or BISoldier\hhl folder – we are going to correct the paths inside them.
Because the us_rukavy_hhl.rvmat and us_soldier_rukavy_body.rvmat have previously been opened and corrected in an earlier part of the tutorial we do not need to re-do these. The only files we need to fix the paths on are the last 4 we added. Namely:
The format for fixing the paths is just the same as we have been doing all through this tutorial so I will no go into great detail.
An important thing to note at this time (in case you still haven't grabbed the process yet) is to ensure any files you are changing the paths for ARE actually located in the BISoldier\data folder!
If they are not, you must acquire them from the relevant extracted folder (mostly characters\data or characters\hhl for this tutorial) and place them in out BISoldier folder.
For your reference, during the process of re-naming paths in this part of the tutorial I had to move the following files from the extracted characters\data or characters\hhl folders and place them in our BISoldier\data or BISoldier\hhl folders respectively:
The soldier now has working wounds. All we will have to do is ensure we add the relevant wound .rvmat files to the config.cpp file in the next part of the tutorial.
Before I move onto the next section, I want to go over another method in which you can check what the required wound .rvmats are for a certain model. In this method I will show you how to check the actual Bohemia Interactive configuration file and see what wound files they used on various classes.
I must warn you, this is a great way to check what files the developers of Armed Assault used on various unit classes in-game BUT, this method isn't 100% foolproof. During the research for this tutorial and the follow up testing on various models, I realised that it isn't quite as easy as I had imagined.
For starters the configuration file had no listing of the model I was using for this tutorial (us_soldier_ru_sleeves.p3d). Searching the configuration file I found that the model was more than likely defined as the soldierWB class but the wound files associated with the soldierWB class didn't work during testing.
That said, this is a sound method of seeing exactly what files are needed. You just need to know the correct part of the configuration file to look.
Fixing the wound textures: Method B
First of all we need to establish what `class` of infantry model we are using. I chose the SoldierWB class to demonstrate this part of the tutorial.
If you are not sure what class of model you are using for you own projects check out the Resources section of this tutorial where you will find a link to the Bohemia Interactive Wiki page regarding Infantry classes.
The next thing we need to establish is what wound textures and materials are associated with the SoldierWB class. To do this we need to do the following:
The location of Kegetys ArmA Tools will vary dependant on where you chose to unzip it – there is no default location for this. (Example - unRap on my HD is located at P: \ armatools \ unRap \ unRap.exe )
Opening the config.bin file will then give you the following message:
After unRap has finished you will a get a confirmatory message:
The config.bin file should have now decoded as a config.cpp and will be located in the same characters folder as the config.bin file
A good text editor will allow you to Search or Find text.
I am using MS Notepad and will use the Find function ( Edit> Find )
In the Find box we will type soldierWB as this is the class we are using for our model.
Immediately matching text is found:
A little knowledge, trial and error is needed in this section. Luckily I have already done the homework and I know this is the correct class.
Looking just a little further down the config under the SoldierWB section you will see the following:
Now you know the file names of the .rvmats you need, all you need to do follow the steps for the first method I showed you in this part of the tutorial.
One bit of advice I will give you at this stage. Don't rush! I know you are probably very eager to get your model working in-game but rushing will lead to making mistakes - which will in turn lead to frustration at having to re-do steps again.
Configuration files can vary differently from addon to addon. Because of this I won't be writing a lengthy description on how to write one for your addon. No doubt any future projects you have will need a far more adequate config.cpp than the one I am going to supply.
NOTE: I have only added a simple weapons loadout to this model. If you wish to amend the loadout in future see the Resources section of the is tutorial where you will find links to the ArmA Weapons page on the Bohemia Interactive Wiki.
Even though I have provided the config.cpp file for download I am still going to show you how to make the config.cpp file. You will still need to know how to make one for your future addons.
Make sure when naming the config.cpp file that your folder options are set up as not to hide known file types!
If Windows are hiding file types then you will actually be calling your folder config.cpp.txt but all you will see on screen is config.cpp
To check whether your folder option are setup to view know file types
Now you have your config.cpp file in your BISoldier folder all we need to do is copy the configuration text to it.
This is probably the easiest part of the whole tutorial. All we are going to do is simply `pack` our BISoldier folder into a format that Armed Assault recognises – a .PBO file.
Before we crate the .PBO file you can delete an files you think got into te folder durin gte tutorial that you do not need. If you followed the tutorial to the letter the only file you should have in there is the ` us_soldier_ru_sleeves.rpt ` file.
For your reference here is what should be in your BISoldier folder:
As with most things I have explained here in the tutorial there are more than one ways to achieve our aim. For this tutorial I am going to go with the method that more suites this tutorial.
That's it, you can now close down all open programs/windows and boot up Armed Assault for testing.
I mentioned at the start of the part of the tutorial that there are two ways to do this. The other way is to use a program called BinPBO Personal Edition . This program can be found under your Armed Assault Tools instaltion folder (typically Program Files\Bohemia Interactive\Tools\BinPBO Personal Edition)
Kegetys cpbo v2.03 is a great tool but, in the very near future addons are going to have to be `signed` by the creator. Signing of the .PBO is something that can be done with BinPBO Personal Edition.
The other extremely useful thing BinPBO Personal Edition allows you to do is Binarize the .PBO
Binarizing is a method of optimizing your .PBO file for fast loading by Armed Assault . Any content of the folder you are binarizing that is not needed by Armed Assault may be discarded during the binarization. Because of the optimization and loss of un-needed data you will see a reduction in file size between a .PBO created with Kegetys cpbo v2.03 and a .PBO created with BinPBO
I will not go in-depth into the use of BinPBO in this tutorial but I do highly recommend you learn about its use for when you decide to publicly release an addon.
Once you have booted up Armed Assault you can just go straight to the editor and load up the Rahmadi Island . As Rahmadi is only small it only takes a few seconds to load which is great when all we want to do is test things.
You should get no error messages at all and you model should work perfectly.
Things to test that have caused problems in the past are:
This is caused when the vertices haven't been merged. See Part 2 of the tutorial on how to fix this.
If the `Cats-eyes` do not look like they are reflective it is probably down to the ` us_helmet_reflections.rvmat ` file not being present in your BISolder folder OR you have not properly corrected the paths to point to your BISolder folder. Check you have renamed the paths in the Mass Texture & Material renaming tool in O2PE and also amended the paths inside the ` us_helmet_reflections.rvmat` file with MatEditor.
This is down to the config.cpp file. I'm not 100% sure what causes this but I do know that defining the Skeleton as ` class OFP2_ManSkeleton ` and defining the ` BISoldier` as ` ArmaMan ` in the config.cpp fixed the problem.
Wounds not showing on all or part of the model is down to the correct wounds not being defined in the config.cpp , the wound .rvmat files not being present in our BISoldier folder or the paths not being renamed properly (or at all)
You need to go through Part 6 of his tutorial again I'm afraid.
I have had quite a number of PM`s from people asking for help with the wound textures and they have sent me models to fix. I have fixed them, and sent them back only for the person to reply stating they still do not work. What I will say is this…
Please, Please, PLEASE make sure you have not got Blood disabled in the ArmA video options! You need to set it to at least `Low` to see the effect of the wound textures.
Hopefully now you have an understanding on how to create a `stand-alone` unit we can get away from simple retexturing of units and we can start to see some different models appearing. If you want to take it a step further you can now start editing the model in O2PE and an art package such as Adobe Photoshop to create unique load outs and textures for your units.
Using the methods I have described in this tutorial I very quickly made a new unit model to demonstrate that it DOES work. I used parts of no less than 4 different models from Armed Assault and Queens Gambit.
The method described in this tutorial was discovered by hard work done by members of the Bohemia Interactive Studios community. All I did was write the tutorial.
Members I would especially like to thank (usually because one of their posts played a key part in this tutorial) are, in no particular order:
Synide, RavenDK, ADOGMC, Pantiflex, CameronMcDonald, dbobrick, Jackal326, danelectro_dc, AimPoint and RockofSL
… not forgetting Bohemia Interactive for giving us this great game.
|about us | contact us | ©2007 ambient occlusion studios|