arma3:port-arma2-to-arma3-tutorial-varanon
Differences
This shows you the differences between two versions of the page.
arma3:port-arma2-to-arma3-tutorial-varanon [2018/06/10 22:29] – created initial page. snakeman | arma3:port-arma2-to-arma3-tutorial-varanon [2024/08/03 12:22] (current) – links added. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Porting From ArmA 2 to ArmA 3 ====== | ====== Porting From ArmA 2 to ArmA 3 ====== | ||
+ | |||
+ | [[https:// | ||
**Porting Models from ArmA 2 to ArmA 3 Tutorial** by Varanon, Community Upgrade Project (CUP). | **Porting Models from ArmA 2 to ArmA 3 Tutorial** by Varanon, Community Upgrade Project (CUP). | ||
Line 6: | Line 8: | ||
====== Introduction ====== | ====== Introduction ====== | ||
- | CUP's goal is to take Arma 2 assets released by Bohemia Interactive, | + | CUP's goal is to take ArmA 2 assets released by Bohemia Interactive, |
For a lot of people, this seems to be a scary thought at first. Where to start ? What to do ? People feel lost. | For a lot of people, this seems to be a scary thought at first. Where to start ? What to do ? People feel lost. | ||
Line 15: | Line 17: | ||
====== About this Guide ====== | ====== About this Guide ====== | ||
- | This guide will walk you through all the steps required to get a model into Arma 3, including the associated config work and model modifications. To make this as practical as possible, we will take an existing | + | This guide will walk you through all the steps required to get a model into ArmA 3, including the associated config work and model modifications. To make this as practical as possible, we will take an existing |
====== What we need... ====== | ====== What we need... ====== | ||
- | First of all, make sure the Arma 3 Tools are installed. You can get them from Steam' | + | First of all, make sure the ArmA 3 Tools are installed. You can get them from Steam' |
====== Gathering the files ====== | ====== Gathering the files ====== | ||
- | The first thing we always do when starting a new asset is classifying it and creating an appropriate directory. The Pickup (PK) from Arma 2 is a Datsun. To find out the exact model name, we search for Pickup_PK_Ins (the class name from Arma 2) and look for the line "// | + | The first thing we always do when starting a new asset is classifying it and creating an appropriate directory. The Pickup (PK) from ArmA 2 is a Datsun. To find out the exact model name, we search for Pickup_PK_Ins (the class name from ArmA 2) and look for the line "// |
- | **WARNING: Some models from Arma 2 have been updated in Arma 2: Operation Arrowhead. This means that there might be an overriding config entry in the expansion’s configs.** | + | **WARNING: Some models from ArmA 2 have been updated in ArmA 2: Operation Arrowhead. This means that there might be an overriding config entry in the expansion’s configs.** |
The Pickup (PK) is called Datsun_Armed, | The Pickup (PK) is called Datsun_Armed, | ||
Line 35: | Line 37: | ||
First, we copy the model, // | First, we copy the model, // | ||
- | **VERY IMPORTANT**: | + | **VERY IMPORTANT**: |
Next, copy the Data folder. This usually contains the //.rvmat// files that are used to determine surface characteristics and textures of the model. Finally, copy the **' | Next, copy the Data folder. This usually contains the //.rvmat// files that are used to determine surface characteristics and textures of the model. Finally, copy the **' | ||
Line 42: | Line 44: | ||
====== Importing into Blender ====== | ====== Importing into Blender ====== | ||
- | Start up Blender and select "// | + | Start up Blender and select "// |
Line 49: | Line 51: | ||
If you loaded the model into ObjectBuilder and subsequently Buldozer, you would notice that the model is white and no textures are shown. This is because the model references textures by their full path relative to the P:\ drive. | If you loaded the model into ObjectBuilder and subsequently Buldozer, you would notice that the model is white and no textures are shown. This is because the model references textures by their full path relative to the P:\ drive. | ||
- | The //.p3d// file references textures and materials (//.rvmat// files). The latter are included in the official released data. The former are not. Luckily, the texture files can be extracted from the Arma 2 data files. If you set up a P:\ drive via mikero' | + | The //.p3d// file references textures and materials (//.rvmat// files). The latter are included in the official released data. The former are not. Luckily, the texture files can be extracted from the ArmA 2 data files. If you set up a P:\ drive via mikero' |
- | Which textures we need is determined by two sources: The model will reference texture files and .rvmat files, and the .rvmat files in turn will reference texture files. Remember that the data folder we copied earlier already contained most of the specific .rvmats for the model. Some will be in general directories (like for example // | + | Which textures we need is determined by two sources: The model will reference texture files and .rvmat files, and the .rvmat files in turn will reference texture files. Remember that the data folder we copied earlier already contained most of the specific .rvmats for the model. Some will be in general directories (like for example // |
We start with the model itself: In Blender, make sure the right side toolbar is open (press the ' | We start with the model itself: In Blender, make sure the right side toolbar is open (press the ' | ||
Line 61: | Line 63: | ||
**Note:** ObjectBuilder has a similar functionality. Select Tools – Mass Texture & Material renaming. | **Note:** ObjectBuilder has a similar functionality. Select Tools – Mass Texture & Material renaming. | ||
- | Next up, rvmat files. These are text files which in turn reference texture files again. Luckily, relocating them is relatively easy: Either use MoveObject, or use the appropriate function in the Arma 3 Toolbox within Blender. Since the Blender Toolbox uses an internal list of textures that are specific to CUP, we'll use that one. Select the output folder, then select the rvmats one by one and click on Relocate RVMat. | + | Next up, rvmat files. These are text files which in turn reference texture files again. Luckily, relocating them is relatively easy: Either use MoveObject, or use the appropriate function in the ArmA 3 Toolbox within Blender. Since the Blender Toolbox uses an internal list of textures that are specific to CUP, we'll use that one. Select the output folder, then select the rvmats one by one and click on Relocate RVMat. |
Once you're done with this, it's a good time to check if your model works correctly. Export from Blender as a //.p3d// and open the model in ObjectBuilder. Then, start buldozer. If you get any errors at this point complaining about missing textures or rvmat, go back and correct them. You either have a wrong path somewhere, or did not copy the texture/ | Once you're done with this, it's a good time to check if your model works correctly. Export from Blender as a //.p3d// and open the model in ObjectBuilder. Then, start buldozer. If you get any errors at this point complaining about missing textures or rvmat, go back and correct them. You either have a wrong path somewhere, or did not copy the texture/ | ||
Line 80: | Line 82: | ||
Open the properties panel (press N if it's closed). Now, shift-select all Layers in Blender. The p3d importer puts each LOD on a different layer as a new object. Now, select the object named ' | Open the properties panel (press N if it's closed). Now, shift-select all Layers in Blender. The p3d importer puts each LOD on a different layer as a new object. Now, select the object named ' | ||
- | The others need their paths adapted. Some of the common proxies, like muzzleflashes and Capture-The-Flag type flags have Arma 3 equivalents. Again, refer to the Wiki for an up-to-date list of those. | + | The others need their paths adapted. Some of the common proxies, like muzzleflashes and Capture-The-Flag type flags have ArmA 3 equivalents. Again, refer to the Wiki for an up-to-date list of those. |
To select a new model for a proxy, click on the small file select box next to the path name. Navigate to //P:\a3// or //P:\CUP// to find the correct proxy. Note that the same proxy might appear on more than one LOD including the special LODs like fire geometry etc. To make renaming those easier, copy the path from one proxy, and paste it into the appropriate other proxy paths. Don't mind the p:\ prefix or //.p3d// suffix, it gets stripped outomatically later. | To select a new model for a proxy, click on the small file select box next to the path name. Navigate to //P:\a3// or //P:\CUP// to find the correct proxy. Note that the same proxy might appear on more than one LOD including the special LODs like fire geometry etc. To make renaming those easier, copy the path from one proxy, and paste it into the appropriate other proxy paths. Don't mind the p:\ prefix or //.p3d// suffix, it gets stripped outomatically later. | ||
Line 93: | Line 95: | ||
If you preview this in Buldozer, you can see the animations and confirm that they are working. | If you preview this in Buldozer, you can see the animations and confirm that they are working. | ||
- | Arma 2 models don't usually support all the animations present in Arma 3. Some might be missing, like, in our example, the dampers (the wheels can't contract to cope with terrain). Simply inherit those from the base class (check out // | + | ArmA 2 models don't usually support all the animations present in ArmA 3. Some might be missing, like, in our example, the dampers (the wheels can't contract to cope with terrain). Simply inherit those from the base class (check out // |
We will revisit model.cfg in a later section again. | We will revisit model.cfg in a later section again. | ||
Line 151: | Line 153: | ||
For the Datsun, the // | For the Datsun, the // | ||
- | Going over each config item is way beyond the scope of this document, so I will present the finished // | + | Going over each config item is way beyond the scope of this document, so I will present the finished // |
Line 158: | Line 160: | ||
We're now ready to try. Launch Mikero' | We're now ready to try. Launch Mikero' | ||
- | If there are any errors, correct them (pboProject should tell you of the nature of the error). Then load up Arma 3 with the // | + | If there are any errors, correct them (pboProject should tell you of the nature of the error). Then load up ArmA 3 with the // |
Of course, you will notice that the thing handles like it's made from rubber, but we're going to fix that soon. Also, the crew animations are wrong. This is our next step. | Of course, you will notice that the thing handles like it's made from rubber, but we're going to fix that soon. Also, the crew animations are wrong. This is our next step. | ||
Line 182: | Line 184: | ||
You will also notice that there are multiple instances of references to animations from other vehicles, like the MH6 bench sitting pose, or the HMMWV gunner dead pose, or the Stryker dead pose... unfortunately, | You will also notice that there are multiple instances of references to animations from other vehicles, like the MH6 bench sitting pose, or the HMMWV gunner dead pose, or the Stryker dead pose... unfortunately, | ||
- | The MH6 animations will be found in the air directory of your Arma 2 data release, or, if you checked out the git repository, in // | + | The MH6 animations will be found in the air directory of your ArmA 2 data release, or, if you checked out the git repository, in // |
After you copied over the files, we need to create // | After you copied over the files, we need to create // | ||
Line 195: | Line 197: | ||
====== Turrets: Adding the gunner ====== | ====== Turrets: Adding the gunner ====== | ||
- | So we got the passengers working now, but we still need to deal with the gunner position. This is handled by //class Turret//. For a discussion of //class Turret//, see the biki. We'll only discuss the parts that are in need of adaption for Arma 3. | + | So we got the passengers working now, but we still need to deal with the gunner position. This is handled by //class Turret//. For a discussion of //class Turret//, see the biki. We'll only discuss the parts that are in need of adaption for ArmA 3. |
- | Copy the original turret description into the // | + | Copy the original turret description into the // |
We also need to make sure that the gunner can look down the sights of the gun. This is achieved with the config entry // | We also need to make sure that the gunner can look down the sights of the gun. This is achieved with the config entry // | ||
Line 217: | Line 219: | ||
====== Turret, take 2: Variable muzzle flash ====== | ====== Turret, take 2: Variable muzzle flash ====== | ||
- | We're now moving on to our very first Arma 3 specific feature: Currently, if you fire, the muzzle flash is static. We want it to be variable, like in Arma 3 vehicles. | + | We're now moving on to our very first ArmA 3 specific feature: Currently, if you fire, the muzzle flash is static. We want it to be variable, like in ArmA 3 vehicles. |
This requires a slight adaption in both // | This requires a slight adaption in both // | ||
Line 302: | Line 304: | ||
====== Making the model behave: Geometry LOD ====== | ====== Making the model behave: Geometry LOD ====== | ||
- | Arma 3 models have the weights of individual components set to zero, and artificial " | + | ArmA 3 models have the weights of individual components set to zero, and artificial " |
To prepare, remove the weight from all components except the wheels. Then, add cubes to the model and place each into their own selection (name them // | To prepare, remove the weight from all components except the wheels. Then, add cubes to the model and place each into their own selection (name them // | ||
Line 313: | Line 315: | ||
In Blender, create a copy of the Geometry LOD and move it to a different layer for easier access. Set the LOD type to " | In Blender, create a copy of the Geometry LOD and move it to a different layer for easier access. Set the LOD type to " | ||
- | To achieve this, you need to make sure the wheel' | + | To achieve this, you need to make sure the wheel' |
Also, the axis for damper movements are possibly not in, so we need to add them. They are usually called "// | Also, the axis for damper movements are possibly not in, so we need to add them. They are usually called "// | ||
Line 328: | Line 330: | ||
===== Lights: Adding reflectors, light cones and more ===== | ===== Lights: Adding reflectors, light cones and more ===== | ||
- | Arma 2 vehicles have rather simplistics lights: Most of the time, it's a polygon or a few polygons in front of the actual lights containing a flare texture that is made visible when the lights are turned on. In Arma 3, this has been replaced by several additional features: | + | ArmA 2 vehicles have rather simplistics lights: Most of the time, it's a polygon or a few polygons in front of the actual lights containing a flare texture that is made visible when the lights are turned on. In ArmA 3, this has been replaced by several additional features: |
* Automatically placed lens flares | * Automatically placed lens flares | ||
Line 381: | Line 383: | ||
For tail and brake lights, a special red emmissive material is used, either with a red color texture, or you can even use the body texture of the car if you can re-use polygons from the car model itself. Note that this will require some minor modeling experience. | For tail and brake lights, a special red emmissive material is used, either with a red color texture, or you can even use the body texture of the car if you can re-use polygons from the car model itself. Note that this will require some minor modeling experience. | ||
- | What you basically do is to use polygons shaped like the actual light source but offset a tiny bit in front of the actual light, and give it a special material. In fact, this is similar to what the original | + | What you basically do is to use polygons shaped like the actual light source but offset a tiny bit in front of the actual light, and give it a special material. In fact, this is similar to what the original |
We'll walk through one example of " | We'll walk through one example of " | ||
Line 439: | Line 441: | ||
</ | </ | ||
- | The problem in our case is that the animation looks rather awkward due to the position of the hands. A better solution in this case would be to replace the driver animation with a default driver anim from Arma 3. | + | The problem in our case is that the animation looks rather awkward due to the position of the hands. A better solution in this case would be to replace the driver animation with a default driver anim from ArmA 3. |
This, however, requires some adaption. Mostly because the driver proxy is not in the correct position. You will need to move it so it fits. You might want to try different versions (// | This, however, requires some adaption. Mostly because the driver proxy is not in the correct position. You will need to move it so it fits. You might want to try different versions (// | ||
Line 448: | Line 450: | ||
===== Some special effects: Exhaust effects ===== | ===== Some special effects: Exhaust effects ===== | ||
- | Every car has one or more exhaust pipes, which spew out black, toxic vapor when the car is burning fuel. In Arma 3, the effect is handled by class Exhausts in // | + | Every car has one or more exhaust pipes, which spew out black, toxic vapor when the car is burning fuel. In ArmA 3, the effect is handled by class Exhausts in // |
<code cpp> | <code cpp> | ||
Line 520: | Line 522: | ||
===== Reflections and more: Picture-in-Picture ===== | ===== Reflections and more: Picture-in-Picture ===== | ||
- | Mirrors are an exiting new feature for Arma 3, and require some modeling work to set up the appropriate mirror surfaces. Don't be alarmed, though, all you need to do is duplicate polygons, much like you already did for the lights. | + | Mirrors are an exiting new feature for ArmA 3, and require some modeling work to set up the appropriate mirror surfaces. Don't be alarmed, though, all you need to do is duplicate polygons, much like you already did for the lights. |
- | For performance reasons, | + | For performance reasons, |
So in the Datsun case, we have three mirrors, one inside, and two outside. They will only be visible in View – Cargo. First of all, we need to "cut out" the polygons that make up the actual reflecting surface. Select the appropriate polygons, and press CTRL+D to duplicate, click right immediately and use the handles to pull out the surface a tiny bit. | So in the Datsun case, we have three mirrors, one inside, and two outside. They will only be visible in View – Cargo. First of all, we need to "cut out" the polygons that make up the actual reflecting surface. Select the appropriate polygons, and press CTRL+D to duplicate, click right immediately and use the handles to pull out the surface a tiny bit. | ||
Line 543: | Line 545: | ||
===== Doing some damage: Hit points ===== | ===== Doing some damage: Hit points ===== | ||
- | In essence, hit points work in the same way as they did in Arma 2. However, | + | In essence, hit points work in the same way as they did in ArmA 2. However, |
Additionally, | Additionally, | ||
- | A new feature in Arma 3 is the ability to set the radius for the hitpoints, allowing them to be packed tighter to gain more control over the form used. | + | A new feature in ArmA 3 is the ability to set the radius for the hitpoints, allowing them to be packed tighter to gain more control over the form used. |
The easiest way of creating the dense hitpoint mesh for the engine is to copy the hitpoints from the sample model. Otherwise, create a grid (say, 7 x 5 vertices), remove all the edges and faces, and duplicate it some 5 times at even intervals. Add them to the selection " | The easiest way of creating the dense hitpoint mesh for the engine is to copy the hitpoints from the sample model. Otherwise, create a grid (say, 7 x 5 vertices), remove all the edges and faces, and duplicate it some 5 times at even intervals. Add them to the selection " | ||
+ |
arma3/port-arma2-to-arma3-tutorial-varanon.1528669779.txt.gz · Last modified: 2018/06/10 22:29 by snakeman