MrClock's Documentations
  • 🏠Welcome
  • 📄Documents
    • Arma 3 models
      • Proxy coordinates
      • Vertex normals
      • Sections
    • Arma 3 animations
      • Armature reconstruction
      • Frame properties
      • Import into Blender
      • BMTR to plain RTM
  • 📦Blender add-ons
    • Arma 3 Object Builder
  • 🐍Python tools
    • Color converter
  • 🔧Visual Basic .NET tools
    • Color converter
      • Color library TXT
    • Color library and converter
      • Color library XML
    • Class list extractor
    • Editor preview processor
    • Texture converter
  • 🛠️Visual Basic .NET Framework tools
    • Color library and converter
      • COLORLIB file
    • Class list extractor
    • Editor preview processor
    • Generic name ID generator
    • Texture converter
Powered by GitBook
On this page
  • Definition correction
  • Community wiki definition
  • More accurate definition
  • Section fragmentation
  • Section sorting
  1. Documents
  2. Arma 3 models

Sections

Information on sections in MLOD P3D files, supplementary to the community wiki

Last updated 1 year ago

This page is meant to supplement and clarify certain informations written on the about model sections, prior knowledge of that article is required.

Definition correction

Community wiki definition

According to the community wiki:

A section is essentially a combination of material and texture, which contains one specific shader, with it is specific settings and maps.

This definition is mostly correct, but doesn't explain the phenomenon of section duplication (indicated in the Resource Library of Object Builder), which is often deemed to be a bug by modders (this doesn't seem to be the case).

When this happens, Object Builder displays multiple instances of the same texture-material pair as separate sections, with different face counts assigned to them. The community wiki definition offers no explanation for this.

More accurate definition

After some testing, it's clear that the section duplication shown in the above example is because the sections are mixed together in the face list of the P3D LOD.

Therefore perhaps a better definition would be:

A section is a collection of faces in a P3D LOD, using the same texture+material pair, and written contiguously in the face list of the P3D file.

Section fragmentation

In the MLOD P3D format the mesh faces are stored in a list. Each face definition contains the path to the assigned texture and material file.

Suppose we want to have a simple cube with 6 faces, and 2 materials (3-3 faces each).

Ideally, every face belonging to the same texture-material pair should be written contiguously in the file. This would result in the lowest number of sections, 2 in this case.

However, if we copy-paste geometries in the LOD in Object Builder, or a 3rd party software of our choice doesn't group the faces based on their materials during exports, the face list may become fragmented. In this case the faces otherwise belonging to different sections end up being mixed after one another. This leads to more sections. In the worst case scenario (when faces from different sections are alternating one by one), it may lead to almost as many sections as faces, 6 in our example.

How much this is optimized during coversion to ODOL format is not certain, but inspection of files shows that fragmentation might not be reliably resolved during the process, especially considering the issue of alpha face order.

Section sorting

For more info on the P3D format, read the .

A model with 13 sections (originally 5, if it wasn't fragmented) ended up with 7 sections after the conversion to ODOL, according to Mikero's .

Since the section count tends to have a significant impact on performace, it's important to minimize it. When using tools to export to P3D format directly, we should use one that makes sure the sections are not mixed together (like the for Blender by me), or use the sorting option included in Object Builder itself (Faces >> Sort). This will collect the faces belonging to the same texture-material pair, and reorder the face list accordingly.

📄
community wiki
Eliteness
Arma 3 Object Builder
community wiki
Mixed sections in a P3D LOD, texture+material on left, number of assigned faces on the right