Character Geometry File (.gcg)

Golaem Character Geometry (gcg) file is meant to replace FBX character geometry storage. It provides a huge speed boost over FBX, by skipping unnecessary features handled by the FBX format and enabling multithreaded processing. 

A GCG file stores the following data:

  • skeleton definition (bones joint orient and names)
  • A bindpose (position, orientation)
  • A pose to be displayed by default at import (position, orientation, scale)
  • A list of meshes. Each of the meshes holds its vertices positions / normals / UVs / skinning information, triangle definition, vertex caching (baked geometry) and blendshapes definitions.

Its definition can be found in the Golaem Geometry API SDK file glm_crowd_io.h, as GlmGeometryFile struct.

It can be read/written via glmReadGeometryFile() & ​glmWriteGeometryFile() functions. The GlmGeometryFile struct must be reset to 0 priori to use it, for example via a memset.

GCG format handles linear, dual quaternions or blend skinning methods.

Differences between Golaem 5 and Golaem 6 GCG formats

Golaem 5 version of the format is based on a unified vertex management : each vertex with different UV / normal is duplicated. There is only one vertex indices map per mesh, shared for control points, UVs and normals, which defines a triangulated mesh with a unique material. If a multi-material mesh is exported as GCG, it will be split into several mono-material meshes.

Golaem 6 version of the format extends it, to handle non-triangulated polygons. It holds both triangulated and untriangulated versions, for fast previsualization, and to be able to handle features such as subdivision surfaces. This version also splits the indices for control points, UVs and Normals to insure that original topology of the mesh is conserved, and does not duplicate vertices anymore. Note that multi material meshes are still split into several meshes inside GCG format (most of the rendering engines ask to define meshes per material). Golaem 6 GCG may be smaller or bigger than 5, depending on the source asset, but is more versatile regarding rendering features.

Golaem 6 is backward compatible with GCG files written with Golaem 5, whereas Golaem 5 cannot read Golaem 6 GCG files.

Limitations

The speed boost comes at a cost, and here are the limitations to use this format:

  • Bindpose unicity: the bindpose must be unique over the meshes exported (which is globally a good practice anyway). As gcg has space for a unique bindpose, we cannot handle different bindposes for different meshes. 
  • Blendshapes can only be based on deformed mesh targets. Driving transform animation curves is not handled, and should be baked into deformed meshes to work with golaem. Another option could be to output the transform orientation animations as motions.
  • Skeleton scales: the bindpose may have a scale only on root, any other bone must have a local scale at 1. The presentation (current pose) may have a scale on root only. This scale impacts the scale of the character at import.
  • Valid skinning: the skinning should be applied on bones defined in the characterFile, mapped or not. However a fallback to parent bones in hierarchy is present.
  • Each geometry mesh can only have a single baked animation on it. It will be detected by Golaem via history and cacheFile nodes.
  • No deformers on meshes, that would impact vertices count between original and skinned mesh 
  • The GCG file does not store any shader information (anyway, this is matched at previz / render time through our asset management process)
  • Note on internal process : gcg does not handle more than a shader per mesh, thus multi-materials meshes will be split into several meshes at export time.
  • (Golaem 5 only) Subdivision : as GCG stores only triangles, subdivision made on quad faces may not work properly when used with GCG asset.
  • While using the FBX to GCG conversion command, a few users experienced some bad triangulation coming from the way FBX triangulates, resulting in one/a few missing triangle(s). In that case it is advised to convert the asset from the Golaem Character Maker tool (from the geometry tab / character geometry node)