VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
- MIL-STD-2525D Symbology

Table of Contents

VR-Vantage renders military symbols natively from the MIL-STD-2525D / APP-6D standard.

Given a DIS entity type, it produces a Symbol Identification Code (SIDC), rasterizes the corresponding symbol from SVG, and makes the image available for display. This chapter shows how a toolkit developer generates and renders a symbol programmatically, and how to customize both the DIS-to-symbol mapping and the symbol artwork through data files.

The chapter covers the public facade and the two data-driven customization paths. The internal icon caching and texture-atlas machinery is not covered here; you interact with it only through the manager interface.

\vrv_milstdsymbology.1 - Core Concepts

\vrv_milstdsymbology.2 - Generating a SIDC and Rendering a Symbol

Most toolkit code works through DtMilStdManagerInterface, the vrvCore-facing facade implemented by DtMilStdManager in vrvMilStd. Retrieve it with DtMilStdManagerInterface::instance(de) after vrvMilStd::init(de) has run.

Generate a SIDC from the fields of a DIS entity type, then obtain the rendered symbol as RGBA pixels:

using namespace makVrv;
// kind, domain, country, category, subcategory, specific, extra,
// forceId (0=Friend 1=Hostile 2=Neutral 3=Unknown).
std::string sidc = milStd.generateSIDC(
/*kind*/ 1, /*domain*/ 2, /*country*/ 225,
/*category*/ 1, /*subcategory*/ 1, /*specific*/ 0, /*extra*/ 0,
/*forceId*/ 0);
// Build a virtual key from symbol parameters and fetch the image.
params.mySidc = sidc;
std::string key = milStd.generateMilStdKey(params);
int width = 0;
int height = 0;
std::vector<uint8_t> rgba;
if (milStd.getSymbolRgba(key, width, height, rgba))
{
// rgba now holds width * height * 4 bytes ready to upload as a texture.
}

The virtual key is also accepted directly by image-consuming APIs such as setBackgroundImage(), and textureAtlasSlot() returns the atlas slot and UV coordinates for a key when you render many symbols at once. Use svgSource() to retrieve the raw SVG for a key when debugging.

\vrv_milstdsymbology.3 - Customizing DIS-to-SIDC Mapping

The rules that turn a DIS entity type into a SIDC are data-driven, loaded from data/MilStd/type_to_sidc_mappings.json by the type-to-SIDC registry. To adjust how entities are classified, edit that file:

Because the mapping is loaded at startup, changes take effect without recompiling. Keep the file plain ASCII with no byte-order mark; the JSON parser does not strip a BOM.

\vrv_milstdsymbology.4 - Overriding Symbol SVGs

To replace the artwork for specific symbols, supply an SVG override. Overrides live under data/MilStd/overrides/ (the active file is sidc_svg_overrides.json) and are loaded by DtMilStdSvgOverrideRegistry. Each override entry:

You can also register overrides programmatically with DtMilStdSvgOverrideRegistry::addSidcOverride() and addEntityTypeOverride(). Override SVGs are rasterized by the LunaSVG-backed DtSvgRasterizer in vrvGraphics; like the mapping JSON, override SVG files must be plain ASCII with no BOM or the rasterizer will silently fall back to the default symbol.

Overrides keep the standard damage indication. When a symbol's status is FullyCapable, Damaged, Destroyed, or FullToCapacity, the manager composites the standard status marks (the capability color bar or the slash/X amplifier marks, per the operational condition mode) on top of the override art, and highlight overrides flow through the same path. Present and Planned draw no overlay. Compositing applies to entity-type entries and to SIDC entries that leave the status slot wildcarded; an entry that pins an exact status value is treated as authoritative per-state art and rendered untouched, so you can author your own damage-state artwork where the standard marks are not what you want.

\vrv_milstdsymbology.5 - Complete Example

The exampleMilStdSymbology example is a complete plugin that loads the JSON registries and the override registry, wires up a manager, generates SIDCs and keys, and builds symbol widgets from the resulting images. It also demonstrates toggling planned/exercise state, switching to APP-6D, and adding and removing SVG overrides at runtime. See exampleMilStdSymbology for the walkthrough and source.

\vrv_milstdsymbology.6 - Related Reference


Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)