武装突袭3

武装突袭3

评价数不足
3D Model To Arma 3 (Blender)
由 Joshua9797💾 制作
This guide shows how to quickly export a simple 3D model from Blender into Arma 3, including collision, shadow, and roadway setup.
   
奖励
收藏
已收藏
取消收藏
contents:
This tutorial aims to deliver a fast and straightforward result with minimal setup.
🔧 Required Tools
Two essential programs are required:
Both can be downloaded for free via Steam.

📌Note: In contrast to other tutorials where setting up a P-drive is mandatory, we will only be using the Addon Builder from the Arma 3 Tools — no P-drive required.

For Blender, we need the Arma 3 Object Builder” add-on by MrClock.[extensions.blender.org]
Download the latest version of the add-on and simply drag and drop the ZIP file into Blender to install it.


🧊Exporting the Default Cube to Arma 3
We’ll now export Blender’s default cube into Arma 3.
Delete the default light and camera objects — they are not needed.

The grid displayed in Blender represents the ground level in Arma.
To prevent the cube from being partially submerged below the terrain in-game, raise it slightly:
🧩Preparing for LODs
LOD stands for Level of Detail.
Each LOD in Arma 3 serves a specific function and must be assigned to a separate object in Blender.
(only one LOD can be assigned per object).

This means we’ll duplicate the base cube for every LOD type we intend to use.
For now, create one copy each for the following LODs:
  • Resolution
  • Geometry
  • Shadow Volume
  • Roadway
Rename each object to match its respective LOD (e.g. Resolution, Geometry, etc.) for clarity and easier organization:
👀Creating the Resolution LOD
The Resolution LOD is responsible for the visual representation of the model in Arma 3.
  1. Ensure the Resolution cube is selected.
  2. Go to the Data tab (green triangle icon).
  3. Scroll down to Object Builder: LOD Properties — added by the plugin.
  4. Click Is P3D LOD, then set:
    • Type = Resolution
    • Resolution/Index = 1
🎨Assigning a Color to the Resolution LOD
To give the cube some color:
  1. Ensure the Resolution cube is selected.
  2. Open the Materials tab (red sphere icon).
  3. Scroll down to Object Builder: Material Properties — added by the plugin.
  4. Set Texture Source to Color and pick a color you like.
Normally, the color would show up in “Viewport Shading mode”.
However, the Object Builder: Material Properties settings do not affect Blender’s shading preview:

To visualize the color anyway:
  1. Copy the Hex code of the selected color:
  2. Scroll up in the Materials tab.
  3. Paste the code into the Base Color of the material (you can use the default "Material"):
📌Note:
– This color is purely for visualization in Blender. Only the color defined in Object Builder: Material Properties affects how the model looks in Arma.
– You might need to temporarily hide the other cubes to see the color.
🧱Creating the Geometry LOD
The Geometry LOD defines the object's collision shape.

To assign it:
  1. Ensure the Geometry cube is selected.
  2. Go to the Data tab (green triangle icon).
  3. Scroll down to Object Builder: LOD Properties — added by the plugin.
  4. Click Is P3D LOD, then set:
    • Type = Geometry

Enabling collision (mass required):
To make the collision work properly in Arma, the object must have a mass of at least 10 kg.

Steps to assign mass:
  1. Ensure the Geometry cube is selected.
  2. Enter Edit Mode and select all geometry (hotkey: A)
  3. Open the Sidebar (hotkey: N)
  4. Go to the Object Builder tab in the sidebar
  5. Find the section called Vertex Mass Editing
  6. Click Live Editing to activate mass assignment
  7. Under Current Mass, enter at least 10 (kilograms) and confirm with Enter

📌Note:
– It must be a closed mesh (no holes or gaps).
– It does not need to be as detailed as the Resolution LOD — keep it simple for better performance.
🥷Creating the Shadow Volume LOD
The Shadow Volume LOD defines the shape that will cast shadows.

To assign it:
  1. Ensure the Shadow Volume cube is selected.
  2. Go to the Data tab (green triangle icon).
  3. Scroll down to Object Builder: LOD Properties — added by the plugin.
  4. Click Is P3D LOD, then set:
    • Type = Shadow Volume

📌Note:
– It does not need to be as detailed as the Resolution LOD — keep it simple for better performance.
The mesh must consist of triangles:
You can easily do this in Blender:
  • In Edit Mode, select all faces, then go to Face → Triangulate Faces, or press Ctrl + T.
If it doesn't consist of triangles, shadow rendering in Arma 3 may be broken or glitchy:
🚶Creating the Roadway LOD
The Roadway LOD defines walkable surfaces — areas where players can stand or walk.

To assign it:
  1. Ensure the Roadway cube is selected.
  2. Go to the Data tab (green triangle icon).
  3. Scroll down to Object Builder: LOD Properties — added by the plugin.
  4. Click Is P3D LOD, then set:
    • Type = Roadway

This LOD should contain only flat, walkable surfaces — no vertical or steeply sloped polygons.
It's best to delete all faces of the cube except the top one.

Raise the top face by a few centimeters to prevent players' feet from clipping into the model when standing on it.
📤Exporting the Model as a P3D File
Once all LODs are correctly assigned, the model is ready for export as a .p3d file.

Exporting from Blender:
  1. In Blender, go to File → Export → Arma 3 Model (.p3d)
  2. Export the file into a clean, empty project folder of your choice (e.g. myCubeProject)
    (This folder will also contain your config.cpp, textures, and other related files)
  3. Give the file a name (e.g. myCube.p3d).
⚙️Creating the config.cpp File
To make your model usable in-game, the project folder must contain a configuration file named config.cpp.
This file defines, for example, how the model is named in-game.

How to create the file:
  1. Inside the project folder (e.g. myCubeProject), right-click and choose New → Text Document
  2. Rename the file to config.cpp
    (Make sure the file extension is actually changed from .txt to .cpp — you may need to enable file extensions in Windows Explorer)

  3. Open the file with a text editor like Notepad or Notepad++ to begin editing
  4. Paste the following into the file:

    // Define the content of this mod (which units it adds, required addons, etc.) class CfgPatches { class cube_mod// Internal name of the mod { units[] = {"MyCubeUnit"};// This mod adds the unit/class called "MyCubeUnit" requiredAddons[] = {"A3_Data_F"};// Ensures that core Arma 3 game data is loaded requiredVersion = 0.1;// Minimum required version of the game to run this mod author = "Joshua9797";// Author information (optional, just metadata) }; }; // Create a custom category for use in the 3DEN editor or Zeus class CfgEditorCategories { class My_Categorie// Internal name of the editor category { displayName = "My Categorie";// Visible name in the editor (3DEN or Zeus) }; }; // Define new vehicles or static objects class CfgVehicles { class House;// Base class from which we inherit (used for static objects/buildings) class MyCubeUnit: House// Define a new unit/class based on "House" { scope = 2;// Makes this object available in the editor (visible and placeable) scopeCurator = 2;// Makes this object available in Zeus (Curator) mode editorCategory ="My_Categorie";// Assigns it to the previously defined editor category displayname = "Cube";// Display name in the editor model = "myCubeProject\myCube.p3d";// Path to the 3D model file (.p3d) description = "Its a Cube!";// Description text (tooltip or metadata) }; };

  5. Make sure to adjust the project folder and P3D file name in the model entry if your files are not named myCubeProject\myCube.p3d.
📦Packing the PBO with Addon Builder
Folder Structure:
Before packing, prepare the following folder structure:
  1. Create a folder whose name starts with @ — for example: @myCube
  2. Inside that folder, create a subfolder named addons
    Your .pbo file will be saved into the addons folder.

Use the Addon Builder (from Arma 3 Tools via Steam) to pack your project folder into a .pbo file.

Steps:
  1. Launch Addon Builder
  2. Set the source directory to your project folder (the one containing your .p3d file)
  3. Set the destination folder to the addons folder (e.g. @myCube\addons)
  4. Click Pack to create the .pbo
🚀 Adding the Mod to the Arma 3 Launcher
Once your .pbo is packed and placed in the @myCube\addons folder, the last step is to load it in Arma 3 as a local mod.

To add your mod:
  1. Open the Arma 3 Launcher
  2. Go to the Mods tab
  3. Click on “add Local mod” (usually at the top left)
  4. Select your @myCube folder
    Your mod should now appear in the mod list and can be activated.
🖼️ Assigning a Texture to the Cube
🚧WIP🚧

Instead of assigning a simple color (as done earlier), you can apply a PAA texture to the Resolution LOD to give the model a proper textured surface.

PAA files are the texture format used by Arma 3.

You can convert a JPG or PNG to a .paa using the online PAA converter[paa.gruppe-adler.de] by Gruppe Adler or the ImageToPAA tool included in the Arma 3 Tools.

Textures must have a power-of-two resolution, such as 1024x2048 or 512x512, in order to be converted successfully.

For our cube, I downloaded a texture from the internet:


In my case, the original texture had a resolution of 1430×1072.

I scaled the width down to 1024 pixels, then extended the canvas horizontally to 2048 pixels, resulting in a final resolution of 2048x1024 — which is valid for Arma 3. (power-of-two dimensions)

After that, I converted the image to a .paa file.

Make sure to place the .paa file inside your project folder, as it must be included in the final .pbo during packing — for example: myCubeProject\textures\myTexture.paa

Now, just like with the color setup, we can assign the .paa texture to the Resolution LOD:
  1. Ensure the Resolution cube is selected
  2. Open the Materials tab (red sphere icon)
  3. Scroll down to Object Builder: Material Properties — added by the plugin
  4. Set Texture Source to File and select your .paa file
  5. The file path must start from the project folder, so make sure it’s adjusted accordingly:
    <Image>

Just like with color assignment, textures set via Object Builder: Material Properties will not be visible in Blender’s Viewport Shading mode.

To preview the texture inside Blender:
  1. Ensure the Resolution cube is selected
  2. Give the default material a name like “myTexture
    <Image>
  3. Switch to the Shading workspace
  4. Make sure the “myTexture” material is selected
  5. Add an Image Texture node and select your original JPG or PNG file
  6. Connect the Image Texture node to the Base Color input of the Principled BSDF shader
    <Image>

At this point, the texture should be visible on the cube in Viewport Shading mode.
However, it may appear stretched, misaligned, or incorrectly placed on the cube.
This is because the UV map is not yet correct and needs to be adjusted.
The Object Builder add-on conveniently includes the UV mapping when exporting the model as a .p3d file.

📌Note: If you're using a downloaded 3D model, UV mapping is often already set up correctly

Fixing the UV Mapping:
  1. Switch to the UV Editing workspace
  2. Make sure you're in Viewport Shading mode
  3. Ensure the right texture is selected
  4. Switch to Edit Mode
  5. Select all faces of the cube (hotkey: A)
  6. The selected faces should now appear over the texture in the UV Editor
  7. Move, scale, and rotate the UV vertices in the UV Editor until the texture appears correctly on the cube
    <Image>

📌Note: In my case, I had to rotate the Resolution cube by 90 degrees at the end so that the grass side of the texture was facing upward.
<Image>