Expand description
glTF export support for RigidModel 3D models.
This module provides functionality to convert Total War’s proprietary RigidModel
format (.rigid_model_v2) to the standard glTF 2.0 format. glTF is widely supported
by 3D modeling software like Blender, Maya, and 3ds Max.
§Features
- Mesh Export: Vertex positions, normals, and texture coordinates
- Material Support: Basic material properties and texture references
- LOD Levels: Each LOD (Level of Detail) is exported as a separate scene
- Embedded Data: Binary data is base64-encoded inline (no external files)
§Limitations
- Animations are not exported (RigidModel doesn’t contain animation data)
- Some advanced material properties may not translate directly to glTF
- Skeleton/rigging data export is limited
§Usage Example
ⓘ
use rpfm_extensions::gltf::gltf_from_rigid;
// Convert RigidModel to glTF
let gltf = gltf_from_rigid(&rigid_model, &mut dependencies)?;
// Write to file
let file = File::create("output.gltf")?;
gltf.to_writer(file)?;§Output Format
The exported glTF uses the JSON format (.gltf) with embedded binary data
rather than the binary format (.glb). This makes the files larger but
easier to inspect and debug.
§Dependencies Integration
The export process can optionally use the Dependencies cache to resolve
texture references and include texture data in the export.
Re-exports§
pub use gltf::json;
Structs§
Functions§
- gltf_
from_ rigid - Converts a RigidModel to glTF format.
- rigid_
from_ gltf - NOT YET IMPLEMENTED.
- save_
gltf_ to_ disk