Cogs supports and defines multiple file and data formats for different purposes. Where possible, the file support is achieved either using a combination of standardized syntax/format and custom (mostly implicit) schema definitions, or via third party format parsers/readers.
File extension | Format | Cogs.js | Cogs Extension | Notes |
---|---|---|---|---|
.3ds | 3D model format | no | AssetImporter | Models and Meshes |
.asset | JSON | yes | Cogs Asset model format | |
.cogsbin | Cogs 3D model format | yes | Models and Meshes | |
.config | JSON | yes | Cogs Configuration description | |
.dae | 3D model format | no | AssetImporter | Models and Meshes |
.dds | Texture | no | Images and Textures | |
.dxf | 3D model format | no | Dime | Models and Meshes |
.fbx | 3D model format | no | AssetImporter | Models and Meshes |
.glb | 3D model format | yes | Models and Meshes | |
.gltf | 3D model format | yes | Models and Meshes | |
.b3dm | 3D model format | yes | Just a ".glb"-file container Models and Meshes | |
.es30.glsl | GLSL | yes | WebGL 2 Rendering Shader | |
.hlsl | HLSL | no | Rendering Shader | |
.input | JSON | no | Cogs Input Mapping | |
.iv | 3D model format | no | Coin | Models and Meshes |
.jpeg | Texture | yes | Images and Textures | |
.jpg | Texture | yes | Images and Textures | |
360.json | 360 Image Data | yes | Image360 | Image360 |
.material | Cogs Material format | yes | Material Definitions | |
metadata.json | Point Cloud | yes | PoCloud | Point Cloud |
.ktx | Texture | no | Images and Textures | |
.m4v | Video | yes | Video | |
.mp4 | Video | yes | Video | |
.mpeg | Video | yes | Video | |
.obj | 3D model format | no | AssetImporter | Models and Meshes |
.ogex | 3D model format | no | AssetImporter | Models and Meshes |
.permutation | Engine Permutations | yes | Engine Permutations | |
.pipeline | JSON | yes | Cogs Render Pipeline format | |
ScannerPosition.pos | 360/PoCloud | yes | 360/PoCloud | Stores Laser Scan Position |
.png | Texture | yes | Images and Textures | |
.rvm | 3D model format | no | RVM | Models and Meshes |
.rvmdump | Cogs CAD format | no | RVM | Used in CAD import pipeline BuildOctreeCommand |
.scene | JSON | no | Cogs Scene Format | |
.step | STEP 3D model format | no | Cogs NavisExtract | NavisExtractor + RvmParser task 'apply-step-file' to extract parameters (Beta) |
.stp | STEP 3D model format | no | Cogs NavisExtract | NavisExtractor + RvmParser task 'apply-step-file' to extract parameters (Beta) |
tileset.json | 3D Tiles | yes | OGC3DTiles | OGC 3D Tiles |
.tga | Texture | no | Images and Textures | |
.ttf | Font format | no | Fonts | |
.vue | 3D model format | no | RVM | Models and Meshes |
.wgsl | WebGPU Shader | yes | WebGPU Rendering Shader | |
.wrl | 3D model format | no | Coin | Models and Meshes |
The following extensions are currenly supported by Cogs.Core.GLTFLoader
:
Configuration files are used to set and/or modify runtime variables in the engine. All variables are key/value pairs where the key is a string and the value is one of the following:
Configuration files are written using JSON syntax, and supports some JSON features that are mapped automatically to the flat key/value structure used by Cogs.
{
"boolKey": true,
"intKey": 0,
"doubleKey": 1.0,
"stringKey": "string value",
// Keys may contain . to signify a grouping or scope of variables
"myscope.mykey": "myvalue",
"myscope.mykey2": "myvalue2",
// The following structure would result in the same variables as above:
"myscope": {
"mykey": "myvalue",
"mykey2": "myvalue2"
}
}
The default state of the engine is configured using the file Default.config
, located in the base of the /Data
directory.
Formats
File extension | Format | Library | Built-in |
---|---|---|---|
.config | JSON | yes |
Deprecated - replaced by events passed from language specific Cogs interface (Cogs.Desktop/Cogs.js/Cogs.net etc).
Input mapping files are used to map from input devices to actions and axes consumed by interaction code.
Render pipeline files are used to setup the render graph used by the renderer to produce graphical output.
See Cogs Pipeline Format for more information.
File extension | Format | Library | Built-in |
---|---|---|---|
.pipeline | JSON | yes |
Engine permutation files may be used to describe engine permutations. Engine permutations are shader code and behavior that are combined with per-material shader code and engine-global shader code to generate rendering output.
Each engine permutation may provide custom shader code for each shader stage. The permutations shader code is then responsible for setting up state, calling material shader code, and generating per-stage output.
Engine permutations are used to e.g. setup shading differently for regular rendering, shadow map generation, and order-independent transparency rendering.
File extension | Format | Library | Built-in |
---|---|---|---|
.permutation | JSON | yes |
See other .pipeline files for samples. and Cogs.npm interface ICogsPipeline.
Asset files are used to describe scenes or prefabs with entities (cameras, models, datasets etc.) and corresponding resources.
See Cogs Asset Format for more information.
File extension | Format | Library | Built-in |
---|---|---|---|
.asset | JSON | yes |
Scene files are used to describe scenes or prefabs with entities (cameras, models, datasets etc.) and corresponding resources.
See Cogs Scene Format for more information.
File extension | Format | Library | Built-in |
---|---|---|---|
.scene | JSON | yes |
Material files are used to describe how geometry vertex data is transformed and end up as
SurfaceOut
.
See Cogs Material Format for more information.
File extension | Format | Library | Built-in |
---|---|---|---|
.material | JSON | yes |
Graphics shaders are for most targets compiled from a common .hlsl shader language. OpenGLES30 (--renderer.graphicsDevice=OpenGLES30 and Cogs.js) require glsl format.
Rendering Target | Shader File extension | Format | Library | Notes |
---|---|---|---|---|
DirectX11 | .hlsl | HLSL | High-level shader language | |
DirectX12 | .hlsl | HLSL | Experimental | |
Null | n.a. | n.a | Null renderer - running scripts in Cogs.Runtime | |
OpenGL20 | .hlsl | HLSL | High-level shader language | |
OpenGLES30 | es30.glsl | GLSL | GLSL Shaders | |
Vulkan | .hlsl | HLSL | Experimental | |
WebGPU | .wgsl | WebGPU | Dawn | WebGPU Shading Language |
Model files are used to load and display 3D models.
See Model for more information on model usage.
Cogs Model Format
Cogs defines a binary model format (extension: .cogsbin), suitable for real-time visualization.
See Cogs Model Format for more information.
Both Images and Textures are displayed by loading as textures. Choose JPEG or PNG as texture formats.
Video playback into a texture is enabled for Cogs.js and Desktop.
Cogs can on Windows read .ttf TrueType font format.