3D Model Formats

Gorilla3D supports over 30 model file formats for import, from common industry standards to specialized CAD and game engine formats. The framework provides native parsers for the most common formats and uses the Mayo CLI tool for additional CAD formats.

Table of Contents

Supported Formats Overview

Natively Parsed Formats

Format Extension Mesh Materials Animation Skeleton Notes
G3D .g3d Yes Yes Yes Yes Native format, BSON/JSON + ZLib
glTF/GLB .gltf, .glb Yes PBR Yes Yes Industry standard
FBX .fbx Yes Yes Yes Yes ASCII + Binary
COLLADA .dae Yes Yes Yes Yes XML-based, ZIP support
OBJ .obj Yes MTL No No Simple, widely supported
STL .stl Yes No No No ASCII + Binary, ZIP support
PLY .ply Yes Vertex Colors No No Gaussian Splatting support
USD .usd, .usda, .usdc, .usdz Yes Yes Yes Yes ASCII stage, binary crate and archive; UsdSkel
Babylon.js .babylon Yes Yes Yes Yes JSON-based
X3D .x3d, .x3dz Yes Yes Interpolators H-Anim XML/binary
SketchUp .skp Yes Yes No No Via SketchUp C API SDK
STEP .stp, .step Yes No No No B-Spline tessellation

Mayo CLI-Based Formats

These formats use the Mayo CAD viewer CLI tool for import:

Format Extension Description
STEP .stp, .step STEP CAD (alternative loader)
IGES .iges, .igs IGES CAD format
DXF .dxf AutoCAD DXF
BREP .brep, .rle, .occ OpenCascade BREP
3MF .3mf 3D Manufacturing Format
AMF .amf Additive Manufacturing
VRML .wrl, .wrz, .vrml VRML 3D web
DirectX X .x DirectX mesh format
3DS .3ds 3D Studio Max (legacy)
OFF .off Object File Format

Export Formats

Format Extension Unit Notes
G3D .g3d Gorilla.G3D.Exporter Full round-trip (materials, animation, skeleton)
glTF (binary) .glb Gorilla.GLB.Exporter glTF 2.0, PBR materials with embedded images, skins, animations
USD (ASCII) .usda Gorilla.USDA.Exporter Readable stage, UsdSkel skeletons + animations, textures next to the file
USD (crate) .usdc Gorilla.USDC.Exporter Binary crate, same scene structure as .usda
USDZ .usdz Gorilla.USDZ.Exporter ZIP archive with stage and textures — the AR delivery format
OBJ .obj Gorilla.OBJ.Exporter Mesh + MTL materials
STL .stl Gorilla.STL.Exporter Mesh only

Native Format (G3D)

G3D is Gorilla3D's native format, optimized for fast loading:

  • Encoding: BSON/JSON with ZLib compression (current version: 4)
  • Features: Full mesh, materials, skeleton, animation, vertex groups
  • Import/Export: Full round-trip support
  • Recommended for production use after initial import from other formats
// Load G3D natively
GorillaModel1.LoadFromFile('models/character.g3d');

// Save to G3D after importing from another format
GorillaModel1.SaveToFile('models/character.g3d');

Common Formats

glTF / GLB

The GL Transmission Format is the modern standard for 3D content. GLB is the binary variant.

  • PBR materials with metallic-roughness workflow
  • Embedded or external textures
  • Skeletal animation and skinning, including meshes with several primitives and skins shared by several mesh nodes
  • Several nodes referencing the same mesh (f.e. KitBash models)
  • Large GLB files (several GB) are streamed instead of being loaded into memory at once
  • JPEG textures with a defect EXIF header (f.e. exported by Substance) are loaded without their metadata
  • Import: Gorilla.GLTF.Loader, Gorilla.GLB.Loader
  • Export: Gorilla.GLB.Exporter (TGorillaGLBExporter) writes a self-contained .glb

Converting to G3D: When a skinned glTF model is stored as G3D (SaveToFile, the G3D exporter or the .fmx binary data at design time), the joint weights of every primitive and mesh node are stored per mesh. This way the model animates completely after loading the G3D file, without the glTF source.

FBX

Autodesk's FBX format is widely used in game and film production.

  • ASCII and binary variants supported
  • Full animation and skeleton support
  • Separate animation loading from standalone FBX files
  • Units: Gorilla.Format.FBX

COLLADA (DAE)

An XML-based interchange format.

  • Full schema support with animation and skeleton
  • ZIP archive support (compressed DAE)
  • Units: Gorilla.Format.DAE

OBJ (Wavefront)

Simple and widely supported.

  • Static meshes only (no animation)
  • MTL material files
  • Import and export support
  • Units: Gorilla.Format.OBJ

USD (Universal Scene Description)

Pixar's scene description format — the interchange format of DCC tools (Blender, Maya, Houdini, Omniverse) and the delivery format for AR on iOS. Gorilla3D reads and writes all four flavours.

Extension Container Import Export
.usda / .usd ASCII stage — readable and diffable Yes Yes (Gorilla.USDA.Exporter)
.usdc Binary crate — compact, fast to parse Yes Yes (Gorilla.USDC.Exporter)
.usdz ZIP archive with stage and textures Yes Yes (Gorilla.USDZ.Exporter)

Import (Gorilla.USD.Loader, one loader registered for all four extensions):

  • Meshes, materials and their textures — inside a .usdz the images are read directly out of the archive
  • UsdSkel skeletons with joint hierarchy and rest poses
  • SkelAnimation clips, which become regular TGorillaAnimation objects in the model's animation manager

Export:

  • Skeletons and animations are written as UsdSkel (SkelRoot → Skeleton → SkelAnimation)
  • Multiple clips per armature are laid out according to MultiAnimMode: VariantSet (default, one variant per clip), SeparateSkelRoots (self-contained root per clip) or SeparateFiles (one sibling file per clip)
  • Stage metadata is configurable: UpAxis (Y), DefaultPrimName (Model), TimeCodesPerSecond (24), and for .usdc also MetersPerUnit (1.0)
  • .usda and .usdc write the textures next to the file, .usdz packs them into the archive
// Import - the extension picks the parser
GorillaModel1.LoadFromFile('models/character.usdz');

// Export as a single AR-ready file
uses Gorilla.USDZ.Exporter;

var LExp := TGorillaUSDZExporter.Create();
try
  LExp.InnerFormat := TUSDZInnerFormat.Usda;  // or Usdc for a binary stage
  LExp.SaveToFile(GorillaModel1.Def as TModelDef, 'character.usdz');
finally
  LExp.Free();
end;

See Models — Model Export for the full exporter properties.

CAD Formats

STEP

Industry-standard CAD format with B-Spline surface tessellation.

  • Native parser with B-Spline to mesh conversion
  • Also available via Mayo CLI
  • Units: Gorilla.Format.STEP

Game/Legacy Formats

Format Extensions Description
Babylon.js .babylon JSON format with materials, animation, skeletons
X3D .x3d Web3D standard with H-Anim humanoid support
MD2/MD3/MD5 .md2, .md3, .md5mesh Quake engine model formats
3DS .3ds Legacy 3D Studio Max
BVH .bvh Motion capture data
Blender .blend Blender native format
LWO/LWS .lwo, .lws LightWave object/scene

Image/Texture Formats

Gorilla3D supports these texture formats:

Format Extension Unit
DDS .dds Gorilla.Format.DDS
TGA .tga Gorilla.Format.TGA (Vampyre Imaging Library)
PNG .png Built-in (FMX)
JPEG .jpg, .jpeg Built-in (FMX)
BMP .bmp Built-in (FMX)

Loading Models

// Simple loading - format auto-detected by extension
GorillaModel1.LoadFromFile('models/scene.gltf');

// Load with the Gorilla loader system
uses Gorilla.Loader;

var LLoader := TGorillaLoader.Create();
try
  LLoader.LoadFromFile('models/character.fbx', GorillaViewport1);
finally
  LLoader.Free;
end;

Loading Specific Formats

// FBX with separate animation
GorillaModel1.LoadFromFile('models/character.fbx');
GorillaModel1.LoadAnimationFromFile('animations/walk.fbx');

// glTF binary
GorillaModel1.LoadFromFile('models/scene.glb');

// USD - ASCII stage, binary crate or archive (textures included)
GorillaModel1.LoadFromFile('models/character.usdz');

// COLLADA from ZIP
GorillaModel1.LoadFromFile('models/scene.dae.zip');

// STL
GorillaModel1.LoadFromFile('models/part.stl');

Exporting Models

// Export to G3D (preserves everything)
GorillaModel1.SaveToFile('output/model.g3d');

Every other format has its own exporter class, and each one registers itself for its extension:

uses System.IOUtils, Gorilla.Exporter,
     Gorilla.GLB.Exporter, Gorilla.USDA.Exporter,
     Gorilla.USDC.Exporter, Gorilla.USDZ.Exporter,
     Gorilla.OBJ.Exporter, Gorilla.STL.Exporter;

var
  LExp: TGorillaExporter;
begin
  // Pick the exporter registered for the extension ('.glb', '.usdz', '.obj', ...)
  LExp := TGorillaExporter.GetExporter(
    LowerCase(TPath.GetExtension(SaveDialog1.FileName)));

  if Assigned(LExp) then
    LExp.SaveToFile(GorillaModel1.Def as TModelDef, SaveDialog1.FileName);
  // NOTICE: the instance belongs to the registry - do not free it
end;

Only the units you actually list in uses register themselves, so include the exporters you want to offer.

Best Practices

  • Import once, use G3D: Import from FBX/glTF/DAE, then save as G3D for faster loading in production
  • glTF for interchange: Use glTF/GLB as the primary exchange format — best PBR material support, and Gorilla3D exports it as a self-contained .glb
  • USD for DCC and AR: .usda while debugging a pipeline (readable, diffable), .usdc when size and parse speed matter, .usdz to hand out one file including textures (iOS Quick Look, AR viewers)
  • FBX for animation: FBX has the most reliable skeletal animation import
  • STL for 3D printing: STL is geometry-only, ideal for CAD/printing workflows
  • DDS textures: Use DDS for GPU-compressed textures (better performance than PNG/JPEG)
  • Check format capabilities: Not all formats support materials, animation, or skeleton — choose accordingly
  • Asset packages: Use the Assets Manager to bundle models with their textures and materials