> For the complete documentation index, see [llms.txt](https://mrcmodding.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mrcmodding.gitbook.io/home/documents/arma-3-models/sections.md).

# Sections

{% hint style="info" %}
This page is meant to supplement and clarify certain informations written on the [community wiki](https://community.bistudio.com/wiki/Section_Count) about model sections, prior knowledge of that article is required.
{% endhint %}

## 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).

<figure><img src="/files/jt8gv1poq0JJVC0fqUuT" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="/files/oMvtvtMHvdfOwtEOhFM6" alt=""><figcaption><p>Mixed sections in a P3D LOD, texture+material on left, number of assigned faces on the right</p></figcaption></figure>

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.

{% hint style="info" %}
For more info on the P3D format, read the [community wiki](https://community.bistudio.com/wiki/P3D_File_Format_-_MLOD#MLOD_LOD).
{% endhint %}

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.

<figure><img src="/files/kz1kx5S7Tkc9pvryVCHd" alt="" width="375"><figcaption></figcaption></figure>

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.

<figure><img src="/files/0x9NvicRny9szWf2woCU" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
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.

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 [Eliteness](https://mikero.bytex.digital/).

![](/files/oMvtvtMHvdfOwtEOhFM6)![](/files/ZtHixcU3ZXmulkqXTIy0)
{% endhint %}

### Section sorting

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 [**Arma 3 Object Builder**](https://mrcmodding.gitbook.io/arma-3-object-builder/home) 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mrcmodding.gitbook.io/home/documents/arma-3-models/sections.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
