
USDZ Validation Kit
A Swift library and macOS command-line tool for checking USDZ packaging, supported package-local USDA and USDC references, and delivery budgets, with explicit validation coverage and text, JSON, and SARIF reports.
Type: Product
Status: Completed
Date: 10/22/2026
- Swift 6
- Swift Package Manager
- Foundation
- Swift Argument Parser
- XCTest
- LZ4
Overview
USDZ Validation Kit is a Swift library and macOS command-line tool for inspecting packaged 3D assets before delivery. It checks USDZ packaging, supported package-local references, and configurable file and texture budgets, then produces a report that separates observed defects from checks it could not complete.
The project provides the reusable USDZValidation library and the usdz-validator executable. Native inspection reads one local file, read-only, without extraction, USD tools, native subprocesses, or network access. This makes the same checks available to a developer at the terminal or to a Swift application integrating the library. The v0.2.0 release, published October 25, 2026 under the MIT license, delivers the current project scope, including supported native USDA and binary-USDC reference inspection.
Motivation
A 3D asset's delivery package can have problems that are independent of how its scene looks: inconsistent archive records, unsafe member names, missing internal references, or textures that exceed a delivery budget. These checks benefit from repeatable rules and reports that can be inspected or consumed by automation.
USDZ Validation Kit makes those packaging checks explicit while keeping their limits visible. A finding records an observed problem; coverage describes what was inspected; a separate gate decision determines whether the result meets the selected acceptance policy. That distinction helps callers avoid treating an uninspected dependency as a clean bill of health.
From project illustration to validated 3D asset
A procedural reconstruction interprets the illustration’s blue frame, pyramid, teal gridded platform, and lower pale-blue platform. The magnifying glass and exterior glow are omitted from the actual 3D model. This is an interpretation of one image, not an exact recovery of hidden geometry or lighting.
The browser displays a converted GLB companion; the USDZ download is the original validated package. Modeling, conversion, and rendering use external demonstration tools, not validator capabilities. Independent geometry/material comparison and browser inspection checked the GLB; its shading can still differ, including the omitted USD index of refraction.
The saved report from October 29, 2026 records validator 0.2.0, the default general-v1 policy, and complete requested native coverage with no findings or operational errors. This is package, reference, and budget acceptance, not geometry or visual certification. The report applies to the USDZ, not the GLB; the validator was not rerun for this page. The texture-free example does not demonstrate texture inspection on actual textures.
The canonical example includes the source and evidence. After building the CLI, reproduce the validation from the validator repository:
.build/release/usdz-validator validate Examples/layered-cube/model.usdz --format json
Assets: MIT · © 2026 USDZ Validation Kit contributors; redistributed license below.


Static preview · activate to explore
Drag to rotate; pinch or scroll over the model to zoom. Focus the model and use arrow keys to rotate, Page Up or Page Down to zoom. Swipe vertically to scroll the page.
Native gate passed · 0.2.0 · general-v1 · Complete requested coverage · no findings or operational errors
Saved validation report and scope
- Saved evidence
- October 29, 2026
- Asset
- model.usdz · 530,905 bytes
- SHA-256
- 89ee36e574d27275387367e67199a24ab7b4d356325f2b5f1fdfa60f1f2297a3
- Schema / safety envelope
- 1 / 3
- Policy
- general-v1; default built-in budgets; failOn: error; allowIncomplete: false; sensitive details excluded
- Requested native coverage
- Complete · exit 0 · gate pass
- Native findings / operational errors
- 0 / 0
- Package contents
- One stored model.usdc entry; no textures or external dependencies
- External checker
- Not requested; Apple advice was not run
This saved report covers native package, reference and budget acceptance for the original USDZ, not the converted GLB. It does not establish full USD conformance, geometry validity, renderer compatibility, security certification or identical appearance. Artwork checks on October 28, 2026 and the GLB conversion and visual inspection on October 30, 2026 used external tools; the validator was not rerun for this page update.
Quick Look uses the original USDZ on supporting Apple devices. Availability and appearance depend on the device and viewer.
Asset provenance and conversion checks · MIT · © 2026 USDZ Validation Kit contributors
System Architecture
The project separates inspection from command-line operation:
- Reusable library:
USDZValidationowns configuration, file snapshots, validation, findings, coverage, gate policy, and report encoding. It privately compiles a pinned LZ4 1.10.0 C target for bounded crate-metadata decoding, without requiring a host-installed LZ4 library. The library does not write to standard output or terminate the caller's process. - Thin CLI:
usdz-validatoruses Swift Argument Parser to expose validation and rule-catalogue commands. It selects a profile, loads explicit budget configuration, and sends the report to standard output or a local file. - Bounded native pipeline: Archive indexing and an in-memory package namespace establish which members can be inspected. Subsequent checks examine stored payloads, lexical USDA references, supported binary-USDC references through a shared package-local resolver, encoded-byte budgets, and supported texture headers under fixed resource limits. Bounded internal crate-metadata decoding is the sole decompression exception; ZIP members remain stored-only.
- Reports and optional checker: Text, versioned JSON, and SARIF encoders expose the result. An explicitly requested adapter can run a supported installed Apple
usdchecker, recording its outcome separately from native findings and coverage.
Key Features
- Package structure: Checks supported ZIP metadata, stored-file sizes, 64-byte payload alignment, and CRC-32 checksums. Unsafe indexing prerequisites stop dependent inspection rather than producing speculative findings.
- Package-local paths: Rejects unsafe member names and conflicting entries, then resolves supported asset paths inside the package without reading authored references from the host filesystem.
- Lexical USDA references: Recognizes supported asset literals while distinguishing comments and strings. Missing package-local targets can be reported without claiming to parse full USD grammar or composition.
- Conditional USDC references: Automatically inspects eligible binary layers in the supported subsets of exact crate versions 0.8.0, 0.9.0, and 0.10.0. Supported asset values, sublayers, references/payloads, nested dictionaries, and time samples feed the same package-local resolver as USDA. Unsupported representations retain explicit coverage gaps.
- Safety envelope 3: Admitted numeric-array bodies remain opaque: their elements are not decoded or validated. Bounded count headers and accounting for actual traversal, reads, allocations, and metadata decoding remain enforced, with unchanged numerical resource ceilings.
- Delivery budgets: Configurable thresholds cover archive size, individual file size, file count, individual and total encoded texture bytes, and supported texture dimensions. Encoded-byte totals do not estimate decoded image or GPU memory; dimension checks inspect supported headers without decoding pixels.
- Reports for automation: Text, JSON, and SARIF reports preserve stable finding identities and explicit coverage information. Warning thresholds and incomplete-coverage acceptance configure the gate without removing findings or changing what was checked.
- Report compatibility: Schema major 1 remains in use. The updated report schema accepts safety-envelope versions 1, 2, and 3; consumers using an older strict schema that accepts only 1/2 must update it for envelope-3 reports.
- Versioned profiles:
general-v1selects the native checks;apple-portable-v1adds a warning-only advisory subset. Neither profile certifies compatibility with an Apple renderer.
Verification
The project's recorded v0.2 verification reports 19/19 required gates passed. Debug, release, and Address Sanitizer suites each recorded 338 cases, zero failures, and 11 documented opt-in skips. Dedicated CLI checks, independent fixtures, schema validation, golden report comparisons, and resource measurements complement those suites. These are retained validator results; they were not rerun for this portfolio update.
Private-corpus verification independently matched 59 authored-reference occurrences across five original assets, with complete requested native coverage and default gate acceptance. The private assets remain local. Resource measurements apply only to the recorded host and corpus, not universal memory or timing guarantees. Installed-checker smoke was unrequested/skipped for current v0.2 acceptance; minimum-target, other-host, and cross-host verification remain deferred.
Current Limits
Native reference inspection is package-local: lexical for USDA and conditional for the supported USDC subset. Unsupported crate versions, value representations, reference expressions/templates, and ambiguous layouts retain explicit coverage gaps. Complete reference coverage concerns only the declared supported policy; it does not establish geometry validity or resolve composed dependencies. Native inspection does not perform stage composition or host-filesystem reference resolution.
A successful optional checker run cannot upgrade native coverage. Exit 0 means the configured gate accepted the result; --allow-incomplete accepts native coverage gaps without changing that coverage.
The optional --usdchecker path is for trusted input and supports the pinned installed Apple USD Tools version 0.25.11. Its parsers and resolvers may access filesystem or network resources beyond the native package boundary; it does not have an external filesystem/network sandbox.
The recorded verified environment is macOS 27.0.1, Xcode 27.1, and Swift 6.4 on arm64. The package declares Swift 6 tools and a macOS 15 deployment target, but macOS 15 / Xcode 16 / Swift 6.0 compatibility remains intended and unverified. Intel and non-macOS execution are outside v0.2 support. Release publication and completion of the current project scope do not establish minimum-target, other-host, or cross-host compatibility.
The kit does not repair, convert, render, or preview assets. Passing a gate is not certification of complete USD conformance, Apple renderer compatibility, or asset security.