Enfusion Blender Tools: P3D Conversion – Arma Reforger
Lou Montana (talk | contribs) m (Text replacement - " " to " ") |
Lou Montana (talk | contribs) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
=== Installation === | === Installation === | ||
P3D conversion is part of Enfusion Blender Tools therefor it is necessary to install that addon before proceeding. Installation instructions can be found on [[Arma Reforger:Enfusion Blender Tools#Installation|Enfusion Blenders Tool page]].{{Feature|important|Since 0.9.7 version of the addon, '''running Workbench with net API enabled''' in necessary!}} | |||
=== Related Plugin Settings === | === Related Plugin Settings === | ||
[[Image:armareforger-p3d-conversion-settings2.png|500px|left]] | [[Image:armareforger-p3d-conversion-settings2.png|500px|left]] | ||
There | There is one parameter in this plugin which affect some of the P3D conversion features. | ||
Addon settings can be found in '''Edit → ⚙ Preferences... → Addons → 3D View: Enfusion Tools''' | |||
=== Related parameters === | === Related parameters === | ||
Line 19: | Line 18: | ||
==== Material Conversion Table ==== | ==== Material Conversion Table ==== | ||
Path to material conversion table. By default plugin will use one of conversion table already distributed with the addon | Path to material conversion table. By default plugin will use one of conversion table already distributed with the addon | ||
{{Clear}} | {{Clear}} | ||
Line 36: | Line 32: | ||
This window allows to select the P3D file to be imported & specify import parameters. | This window allows to select the P3D file to be imported & specify import parameters. | ||
* Discard unsupported LODs - | * Discard unsupported LODs - see [[#Obsolete_LODs_Discarding|Obsolete LODs Discarding]] section | ||
* Layer Presets | *Layer Presets | ||
** Here you can define which layer presets will be assigned to each imported LOD | **Here you can define which layer presets will be assigned to each imported LOD | ||
* Rename Materials - | *Rename Materials - see [[#Add_Layer_Presets_.26_Game_Materials|Add Layer Presets & Game Materials section]] section | ||
* Convert axis to single point - | *Convert axis to single point - see [[#Convert_Memory_Points_Axis_to_Single_Socket|Convert Memory Points Axis to Single Socket]] section | ||
[[File:armareforger-p3d-conversion-import2.jpg|800px]] | [[File:armareforger-p3d-conversion-import2.jpg|800px]] | ||
==== Imported Content Overview ==== | ====Imported Content Overview==== | ||
Once P3D import is completed, all your objects will be organised into separate collections. Collections are created using following rule set: | Once P3D import is completed, all your objects will be organised into separate collections. Collections are created using following rule set: | ||
* Each resolution LOD will be in its own - '''LODx''' - collection, | *Each resolution LOD will be in its own - '''LODx''' - collection, | ||
* Geometry related objects (Geometry, Geometry PhysX, View Geometry, etc) are stored in '''Colliders''' collection | *Geometry related objects (Geometry, Geometry PhysX, View Geometry, etc) are stored in '''Colliders''' collection | ||
* Memory points are stored in... '''Memory points''' collection | *Memory points are stored in... '''Memory points''' collection | ||
[[File:armareforger-p3d-conversion-import-mesh.jpg|800px]] | [[File:armareforger-p3d-conversion-import-mesh.jpg|800px]] | ||
=== Functions === | ===Functions=== | ||
==== P3D Import ==== | ====P3D Import==== | ||
Any non binarised P3D model created for Arma 3 or DayZ can be imported into Blender using this plugin | Any non binarised P3D model created for Arma 3 or DayZ can be imported into Blender using this plugin | ||
==== Obsolete LODs Discarding ==== | ====Obsolete LODs Discarding==== | ||
All non compatible LODs are discarded during import. Only the following LODs are imported: | All non compatible LODs are discarded during import. Only the following LODs are imported: | ||
* Resolution LODs | *Resolution LODs | ||
* Geometry | *Geometry | ||
* Geometry PhysX | *Geometry PhysX | ||
* View Geometry | *View Geometry | ||
* Fire Geometry | *Fire Geometry | ||
* Memory | *Memory | ||
There is the possibility to import unsupported LODs by unchecking "'''Discard unsupported LODs'''" option. | There is the possibility to import unsupported LODs by unchecking "'''Discard unsupported LODs'''" option. | ||
==== Objects Renaming ==== | ====Objects Renaming==== | ||
All imported objects are renamed to Enfusion standards so they can be correctly recognised during import to Workbench. | All imported objects are renamed to Enfusion standards so they can be correctly recognised during import to Workbench. | ||
There are 2 main rules: | There are 2 main rules: | ||
* All resolution LODs are receiving '''_LODx suffix'''. LODs are automatically renumbered from 0 to 15. | *All resolution LODs are receiving '''_LODx suffix'''. LODs are automatically renumbered from 0 to 15. | ||
* Geometry LODs receive '''UTM_ prefix'''. | *Geometry LODs receive '''UTM_ prefix'''. | ||
{{Feature|important|The model can only sport up to '''16 resolution LODs'''. Visual LODs above that number are discarded!}} | {{Feature|important|The model can only sport up to '''16 resolution LODs'''. Visual LODs above that number are discarded!}} | ||
==== Add Layer Presets & Game Materials ==== | ====Add Layer Presets & Game Materials==== | ||
Geometries are receiving proper Layer Presets and Game Materials depending on their type and RVMATs they have assigned. | Geometries are receiving proper '''Layer Presets''' and '''Game Materials''' depending on their type and RVMATs they have assigned. | ||
Rules for material renaming can be customised by creating your own version of '''conversion_gameMaterials.txt''' & then selecting that custom file in addon settings | Rules for material renaming can be customised by creating your own version of '''conversion_gameMaterials.txt''' & then selecting that custom file in addon settings | ||
==== Convert Memory Points Axis to Single Socket ==== | ====Convert Memory Points Axis to Single Socket==== | ||
Rotation & translation transformations in RV engine are using 2 memory points to determine axis of movement. Enfusion is using rotation of a single point to determine the origin of transformation. | Rotation & translation transformations in RV engine are using 2 memory points to determine axis of movement. Enfusion is using rotation of a single point to determine the origin of transformation. | ||
== FBX Batch Conversion == | ==FBX Batch Conversion== | ||
[[File:armareforger-p3d-conversion-batch-flow.png|800px]] | [[File:armareforger-p3d-conversion-batch-flow.png|800px]] | ||
=== Preparation === | ===Preparation=== | ||
Batch file '''convertToFBX.bat''' is bundled together with the plugin. You can use this batch file to convert multiple P3Ds at once. This file is located in zip file in the following location: BohemianBlenderTools\p3d_import\batch | Batch file '''convertToFBX.bat''' is bundled together with the plugin. You can use this batch file to convert multiple P3Ds at once. This file is located in zip file in the following location: BohemianBlenderTools\p3d_import\batch | ||
Line 100: | Line 94: | ||
After extracting it to your drive, default parameters will have to be modified: | After extracting it to your drive, default parameters will have to be modified: | ||
==== Blender Executable Location ==== | ====Blender Executable Location==== | ||
Quite self explanatory - provide the path to the Blender executable | Quite self explanatory - provide the path to the Blender executable | ||
set Object=C:\Program Files\Blender Foundation\Blender 2.92\blender.exe | set Object=C:\Program Files\Blender Foundation\Blender 2.92\blender.exe | ||
==== Plugin Location ==== | ====Plugin Location==== | ||
This path should lead to {{hl|P3DtoFBX.py}} file which should be located in the plugin's installation directory. | This path should lead to {{hl|P3DtoFBX.py}} file which should be located in the plugin's installation directory. | ||
set Script=%APPDATA%\Roaming\Blender Foundation\Blender\2.92\scripts\addons\BohemianBlenderTools\p3d_import\P3DtoFBX.py | set Script=%APPDATA%\Roaming\Blender Foundation\Blender\2.92\scripts\addons\BohemianBlenderTools\p3d_import\P3DtoFBX.py | ||
Line 113: | Line 107: | ||
<!-- | <!-- | ||
=== Example === | === Example === | ||
[[File:armareforger-p3d-conversion-batch-example.mp4|800px|link=Special:FilePath/armareforger-p3d-conversion-batch-example.mp4]] | |||
--> | --> | ||
{{GameCategory|armaR|Modding|Tutorials|Official Tools|Enfusion Blender Tools}} | {{GameCategory|armaR|Modding|Tutorials|Official Tools|Enfusion Blender Tools}} |
Latest revision as of 22:36, 8 August 2024
The Enfusion Tools plugin for Blender offers an easy, semi automated way to import & convert to Enfusion standards any model from Real Virtuality 4 engine in unbinarised (MLOD) P3D format. They are distributed with the Arma Reforger Tools package on Steam.
Installation
P3D conversion is part of Enfusion Blender Tools therefor it is necessary to install that addon before proceeding. Installation instructions can be found on Enfusion Blenders Tool page.
Related Plugin Settings
There is one parameter in this plugin which affect some of the P3D conversion features.
Addon settings can be found in Edit → ⚙ Preferences... → Addons → 3D View: Enfusion Tools
Related parameters
Material Conversion Table
Path to material conversion table. By default plugin will use one of conversion table already distributed with the addon
Interface
P3D Import
To begin P3D import, navigate to Enfusion Tools → Import tab & then select "Arma 3 P3D (.p3d)". This will bring you typical Blender File View window where you can select file to import & specify some parameters.
Import Window Interface
This window allows to select the P3D file to be imported & specify import parameters.
- Discard unsupported LODs - see Obsolete LODs Discarding section
- Layer Presets
- Here you can define which layer presets will be assigned to each imported LOD
- Rename Materials - see Add Layer Presets & Game Materials section section
- Convert axis to single point - see Convert Memory Points Axis to Single Socket section
Imported Content Overview
Once P3D import is completed, all your objects will be organised into separate collections. Collections are created using following rule set:
- Each resolution LOD will be in its own - LODx - collection,
- Geometry related objects (Geometry, Geometry PhysX, View Geometry, etc) are stored in Colliders collection
- Memory points are stored in... Memory points collection
Functions
P3D Import
Any non binarised P3D model created for Arma 3 or DayZ can be imported into Blender using this plugin
Obsolete LODs Discarding
All non compatible LODs are discarded during import. Only the following LODs are imported:
- Resolution LODs
- Geometry
- Geometry PhysX
- View Geometry
- Fire Geometry
- Memory
There is the possibility to import unsupported LODs by unchecking "Discard unsupported LODs" option.
Objects Renaming
All imported objects are renamed to Enfusion standards so they can be correctly recognised during import to Workbench.
There are 2 main rules:
- All resolution LODs are receiving _LODx suffix. LODs are automatically renumbered from 0 to 15.
- Geometry LODs receive UTM_ prefix.
Add Layer Presets & Game Materials
Geometries are receiving proper Layer Presets and Game Materials depending on their type and RVMATs they have assigned.
Rules for material renaming can be customised by creating your own version of conversion_gameMaterials.txt & then selecting that custom file in addon settings
Convert Memory Points Axis to Single Socket
Rotation & translation transformations in RV engine are using 2 memory points to determine axis of movement. Enfusion is using rotation of a single point to determine the origin of transformation.
FBX Batch Conversion
Preparation
Batch file convertToFBX.bat is bundled together with the plugin. You can use this batch file to convert multiple P3Ds at once. This file is located in zip file in the following location: BohemianBlenderTools\p3d_import\batch
After extracting it to your drive, default parameters will have to be modified:
Blender Executable Location
Quite self explanatory - provide the path to the Blender executable
set Object=C:\Program Files\Blender Foundation\Blender 2.92\blender.exe
Plugin Location
This path should lead to P3DtoFBX.py file which should be located in the plugin's installation directory.
set Script=%APPDATA%\Roaming\Blender Foundation\Blender\2.92\scripts\addons\BohemianBlenderTools\p3d_import\P3DtoFBX.py
Once those paths are adjusted, you can simply drag and drop single or multiple P3D files on convertToFBX.bat. New FBX files will be created next to the original P3Ds.