Learn

File Formats for Godot Assets

Understanding the various files that make up a game in the Godot Engine.

3D Models

The Godot engine supports the following formats for 3D assets:

  • GLTF
  • OBJ
  • FBX
  • DAE (Collada)

For the most part, developers who are creating or commissioning their own assets should stick to the GLTF format. GLTF has first class support in Godot, and offers a wide range of features (materials, rigging, animation, etc.) without any additional configuration needed.

Having said that, the FBX format is a de facto industry standard, so many existing assets for other engines may only be available as FBX models. Using this format in Godot requires installing a plugin that converts the FBX asset to GLTF.

OBJ assets are widely supported, but come with a more limited feature set than the other formats. Unlike GLTF and FBX models, OBJ files tend to contain only mesh data and material information, rather than full scenes. This means they're typically used with a MeshInstance3D node, and work best as static objects.

In earlier versions of Godot, the preferred mesh format was Collada (DAE). However, now that the engine supports GLTF, this format has largely fallen out of favor as Collada assets are significantly less common than the others.

Images & Textures

Per the documentation, Godot supports the following image formats:

  • Bitmap (.bmp)
  • DirectDraw Surface (.dds)
  • OpenEXR (.exr)
  • Radiance HDR (.hdr)
  • JPEG
  • PNG
  • TGA
  • SVG
  • WebP

Generally speaking, the most common formats are JPEG, PNG, SVG, and OpenEXR. Each has its own strengths, and use cases.

JPEG images feature lossy compression, and typically boast smaller file sizes than PNG. This is the most common format for images on the Web, as well as premade textures. However, since it's a lossy format, JPEG images tend to have compression artifacts which make it less suitable for use cases like pixel art

PNG is a lossless compression format, which means each pixel is stored with perfect precision, which generally takes up more space than JPEG compressed images. That being said, Godot will use one of several VRAM compression algorithms by default when importing images, so you may need to manually re-import PNG images with lossless compression if the textures don't look as crisp in game as the source image.

SVG images use math to store shape information, rather than a grid of pixels, which means SVG resources can be scaled to any resolution without appearing pixelated. Internally, Godot converts SVG resources to raster (pixel grid) images for faster rendering performance, which negates this advantage.

OpenEXR images are most commonly used for panoramic skyboxes in Godot.

Audio

The following audio formats are supported:

  • WAV
  • Ogg Vorbis
  • MP3 (Godot 3.3 and later)

WAV files contain lossless audio. This provides the highest quality audio, at the expense of potentially massive file sizes.

Ogg Vorbis and MP3 files both use lossy audio compression. This takes up less storage space than lossless audio, but will introduce audible compression artifacts that impact the clarity of the sound. MP3 is a more widely supported format, while the Ogg Vorbis codec is more common in the Open Source community, as the MP3 format was encumbered by software patents until the last one expired in 2017.

Generally speaking, WAV files are used for short sound clips such as footsteps, gunshots, powerup sound effects, or brief vocalizations, while the game soundtrack would generally use a lossy format to save space.

Godot-Specific Formats

The Godot Engine has a number of its own file formats:

  • TSCN files contain Scene objects in the game. This is essentially the tree of Nodes in the Scene panel, along with the various properties specified in the Inspector
  • TRES files contain Resources. These resources can be things like a material, or a World Environment, or animation among various other things
  • GD files contain GDScript code

Filed to:

Learn

Read more