Skip to content
Sarah Kieffert edited this page Dec 22, 2024 · 3 revisions

REAL VIRTUALITY 4 - TEXTURING

Before focusing on the specific section that interests us, it’s important to trace the evolution of Arma and the technologies used.

Arma 3, released in 2013, is based on the in-house engine Real Virtuality 4 by Bohemia Interactive. The first version of the engine was created in 2000 and was designed to be flexible and cutting-edge. It allows the creation of open-world and massive sandbox games, both in single-player and multiplayer. It was used in Operation Flashpoint (later renamed Arma: Cold War Crisis) and for each installment of the Arma series until Arma Reforger. The engine was also used in the VBS2 and VBS3 simulators, used by the military forces of 128 countries. Arma 3 is based on the latest version of this engine, Real Virtuality 4, marking the end of the lifecycle for this engine that has already lasted for more than 20 years.

RVMAT

An RVMAT (Real Virtuality Material) is a configuration file linked to a 3D model that defines its properties, such as color, reflection, and surface details. This file has the .rvmat extension and must be linked to the 3D model in the Object Builder (Oxygen 2) software.

The baking process involves embedding texture details into a model, while binarization is an optimization process that occurs when the model is imported into the game.

Stages

Stages are layers that make up a material. Each stage is specific to a shader and changes based on the selected shader type. Shaders are responsible for rendering in the game and are managed by the graphics card.

The most commonly used shader in Arma is Super, which consists of 7 stages and is the most flexible for creating buildings, vehicles, and objects. Here is the composition of an RVMAT using this shader:

  1. Stage 1 : Normal Map (_nohq)
  2. Stage 2 : Detail Map (_dt)
  3. Stage 3 : Macro Map (_mc)
  4. Stage 4 : Ambient Shadow Map (_as)
  5. Stage 5 : Specular Map Diffuse Inverse (_smdi)
  6. Stage 6 : Fresnel
  7. Stage 7 : Environment Map

Understanding RVMAT

Here’s an example of the parameters used in a typical RVMAT:

Name Default Value
ambient {1,1,1,1}
diffuse {1,1,1,1}
forcedDiffuse {0,0,0,1}
emissive {0,0,0,0}
specular {1,1,1,1}
specularPower 20

Example Materials:

  • RifleMetal: {1,1,1,1} (ambient), {1,1,1,1} (diffuse), {0.2,0.2,0.2,0} (specular), power 5
  • Metal: {1,1,1,1} (ambient), {1,1,1,1} (diffuse), {0.2,0.2,0.2,0} (specular), power 5
  • SpecularGlass: {1,1,1,1} (ambient), {1,1,1,1} (diffuse), {0.5,0.5,0.8,0} (specular), power 5
  • Water: {0.016,0.0264,0.04,0.4} (ambient), {0.032,0.128,0.128,1.0} (diffuse), {1,1,1,0} (specular), power 4

Texture Maps

Real Virtuality uses its own texture maps, sometimes combining multiple maps that would normally be separate in other engines. Here are the main maps to use:

  • ColorMap / Diffuse (_CA _CO): Represents the primary color of the model. Use the _CA suffix to include transparency, and _CO to prevent it.
  • Normal Map (_NOHQ - _NOPX): Simulates the depth and details of the object. _NOHQ is for high-quality normal maps (up to 4096 pixels).
  • Specular Map (_SMDI): Defines the shine and highlight points of the texture. Use TexView2 to generate this map.
  • Ambient Occlusion Map (_AS): Also called Ambient Shadow, it manages shadow intensity and ambient occlusion.

Texture Resolution

The resolution of textures impacts both visual quality and performance. It is important to find a balance to avoid negatively affecting performance.

  • 32x32 to 256x256: Icons/Markers
  • 512x512: Low-res accessories
  • 1024x1024: Small building elements, small objects, weapon accessories
  • 2048x2048: Buildings (walls/doors), vehicles, and weapons – Standard definition (2GB VRAM)
  • 4096x4096: Buildings (walls/doors), vehicles, and weapons – High definition (4GB VRAM)

For most objects, buildings, and vehicles, it is recommended to use 2048x2048 textures for optimal in-game performance.

Real Virtuality automatically scales texture resolutions based on the player's graphical settings. Below are the details of the resolution based on the player’s graphic settings:

  • Low: up to 512px
  • Normal: up to 1024px
  • High / Very High: up to 2048px
  • Ultra: up to 4096px

Despite customized resolution settings, a 4K texture will still impact loading times and GPU load (VRAM). A player not using the “Ultra” texture quality setting will not see native 4K and will instead see a 2048 MIP map of lower quality. This is why 2048px textures are preferred.

Formats

RV4 and Arma 3 support several classic formats (PNG/TGA/JPG/JPEG/TIF/BMP) but use two proprietary formats for textures: PAA and PAC.

These formats were useful for Arma 2, but Arma 3 handles both formats in the same way. Conversion to PAA/PAC is done using the tools provided in the BI development kit: TexView2 and ImageToPAA.

  • TexView2: Used for quick conversion, one-shot textures, or to apply specific filters to images.
  • ImageToPAA: Used for most other cases. There is also a Photoshop CS3 plugin for processing images in PAA format.

BI tools recognize the following source formats: JPEG, PNG, TGA, PAC, PAA, TIFF, BMP. Other formats are either unsupported or not suitable.

The PAA format supports transparency, and to use it, you must start with uncompressed TGA (RGBA) 24-bit or PNG 8-bit images.

List of Shaders

Pixel Shaders

  • AlphaNoShadow
  • AlphaShadow
  • Detail
  • DetailMacroAS
  • Grass
  • Interpolation
  • Normal
  • NormalDXTA
  • NormalMap
  • NormalMapDetailMacroASSpecularDIMap
  • NormalMapDetailMacroASSpecularMap
  • NormalMapDetailSpecularDIMap
  • NormalMapDetailSpecularMap
  • NormalMapDiffuse
  • NormalMapDiffuseMacroAS
  • NormalMapGrass
  • NormalMapMacroAS
  • NormalMapMacroASSpecularDIMap
  • NormalMapMacroASSpecularMap
  • NormalMapSpecularDIMap
  • NormalMapSpecularMap
  • NormalMapSpecularThrough
  • NormalMapThrough
  • Refract
  • SpriteRefract
  • Terrain
  • Water
  • WaterSimple
  • White
  • WhiteAlpha

Vertex Shaders

  • Basic
  • BasicAlpha
  • NormalMap
  • NormalMapAlpha
  • NormalMapAS
  • NormalMapDiffuse
  • NormalMapDiffuseAlpha
  • NormalMapDiffuseAS
  • NormalMapSpecularThrough
  • NormalMapSpecularThroughNoFade
  • NormalMapThrough
  • NormalMapThroughNoFade
  • Point
  • ShadowVolume
  • Sprite
  • Super
  • Terrain
  • TerrainAlpha
  • Water
  • WaterSimple

Why is it so difficult to convert my maps from a metal workflow to SMDI : ㅤ SMDI maps are composed of: :red_square: = White :green_square: = Specular map :blue_square: = Glossiness map

While Glossiness maps can be replaced by Roughness maps (because you can actually invert a glossiness map), metallic maps are not equivalent to specular maps. This is because the shading method is totally different.

Metallic maps are in grayscale (black and white) 0 = ⬛ Black = Non-metallic 1 = ⬜ White = Fully metallic

Specular maps are based on RGB values that dictate how the reflection should work. They are RGB, they don't work in the same way and can't be interchanged.