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
- Native Format (G3D)
- Common Formats
- CAD Formats
- Game/Legacy Formats
- Image/Texture Formats
- Loading Models
- Exporting Models
- Best Practices
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 | .usdz, .usdc |
Yes | Yes | — | — | Binary Crate + Archive |
| 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 | Notes |
|---|---|---|
| G3D | .g3d |
Full round-trip (materials, animation, skeleton) |
| OBJ | .obj |
Mesh + MTL materials |
| STL | .stl |
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
- Units:
Gorilla.Format.GLTF
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
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
USD (Universal Scene Description)
Pixar's scene description format.
- Binary Crate (
.usdc) and Archive (.usdz) formats - No ASCII (
.usda) support currently - Units:
Gorilla.Format.USD
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');
// 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');
// Export to OBJ
uses Gorilla.Exporter;
// Use the exporter for OBJ and STL export
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
- 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