Skip to content

Latest commit

 

History

History
227 lines (181 loc) · 9.08 KB

features.md

File metadata and controls

227 lines (181 loc) · 9.08 KB

Features

Overview

  • Run-time import
    • GameObjects
    • ⚠️ Entities (see DOTS)
  • Fast and small footprint JSON parsing
  • Multi-threading via C# job system
  • Design-time (Editor) import
  • Export

Platforms

All of Unity's platforms are supported. glTFast is tested or was reported to run on:

  • WebGL
  • iOS
  • Android
  • Windows
  • macOS
  • Linux
  • Universal Windows Platform
  • Lumin (Magic Leap)

Core glTF features

The glTF 2.0 specification is fully supported, with only a few minor remarks.

Detailed list of glTF 2.0 core feature support
  • glTF (gltf + buffers + textures)

  • glTF binary (glb)

  • Scene

    • Node hierarchy
    • Camera
  • Buffers

    • External URIs
    • glTF binary main buffer
    • Embed buffers or textures (base-64 encoded within JSON)
  • Images

  • Materials (see section Materials for details)

  • Primitive Types

    • TRIANGLES
    • 1POINTS
    • 1LINES
    • LINE_STRIP
    • 1LINE_LOOP
    • TRIANGLE_STRIP
    • TRIANGLE_FAN
  • Meshes

    • Positions
    • Normals
    • Tangents
    • Texture coordinates
    • Vertex colors
    • Draco mesh compression (via Draco 3D Data Compression Unity Package)
    • Implicit (no) indices
    • Per primitive material
    • Two texture coordinates / UV sets
      • Three or more texture coordinates / UV sets (issue)
    • Joints (up to 4 per vertex)
    • Weights (up to 4 per vertex)
  • Texture sampler

  • Morph targets

  • 3Sparse accessors

  • Skins (sponsored by Embibe)

  • Animation

    • via legacy Animation System
    • via Playable API (issue)
    • via Mecanim (issue)

1: Untested due to lack of demo files.

2: Beta

3: Not on all accessor types; morph targets and vertex positions only

Extensions

Official Khronos extensions

  • KHR_draco_mesh_compression
  • KHR_materials_pbrSpecularGlossiness
  • KHR_materials_unlit
  • KHR_texture_transform
  • KHR_mesh_quantization
  • KHR_texture_basisu
  • KHR_lights_punctual (issue)
  • KHR_materials_clearcoat (issue)
  • KHR_materials_sheen (issue)
  • KHR_materials_transmission (issue)
  • KHR_materials_variants (issue)
  • KHR_materials_ior (issue)
  • KHR_materials_specular (issue)
  • KHR_materials_volume (issue)
  • KHR_xmp

Will not be supported:

  • KHR_techniques_webgl

Vendor extensions

  • 1EXT_mesh_gpu_instancing
  • EXT_meshopt_compression (issue)
  • EXT_lights_image_based (issue)

1: Without support for custom vertex attributes (e.g. _ID)

Not investigated yet:

  • AGI_articulations
  • AGI_stk_metadata
  • CESIUM_primitive_outline
  • MSFT_lod
  • MSFT_packing_normalRoughnessMetallic
  • MSFT_packing_occlusionRoughnessMetallic

Will not be supported:

  • ADOBE_materials_clearcoat_specular (prefer KHR_materials_clearcoat)
  • ADOBE_materials_thin_transparency (prefer KHR_materials_transmission)
  • EXT_texture_webp (prefer KTX/basisu)
  • FB_geometry_metadata (prefer KTX_xmp)
  • MSFT_texture_dds (prefer KTX/basisu)

Materials

Material Feature URP HDRP Built-In
PBR1 Metallic-Roughness
PBR1 Specular-Glossiness
Unlit
Normal texture
Occlusion texture
Emission texture
Alpha modes OPAQUE/MASK/BLEND
Double sided / Two sided
Vertex colors
Multiple UV sets 2 2 2
Texture Transform
Clear coat
Sheen
Transmission 3 4 4
Variants
IOR
Specular
Volume

1: Physically-Based Rendering (PBR) material model

2: Two sets of texture coordinates (as required by the glTF 2.0 specification) are supported, but not three or more (issue)

3: There are two approximation implementations for transmission in Universal render pipeline. If the Opaque Texture is enabled (in the Universal RP Asset settings), it is sampled to provide proper transmissive filtering. The downside of this approach is transparent objects are not rendered on top of each other. If the opaque texture is not available, the common approximation (see 4 below) is used.

4: Transmission in Built-In and HD render pipeline does not support transmission textures and is only 100% correct in certain cases like clear glass (100% transmission, white base color). Otherwise it's an approximation.

Legend:

  • ✅ Fully supported
  • ✓ Supported partially
  • ℹ Planned (click for issue)
  • ❌ No plan to support (click to create issue)

Data-Oriented Technology Stack

⚠️ Note: DOTS is highly experimental and many features don't work yet. Do not use it for production ready projects!

Unity's Data-Oriented Technology Stack (DOTS) allows users to create high performance gameplay. glTFast has initial, experimental support for it.

Instead of traditional GameObjects, glTFast will instantiate Entities with Hybrid Renderer (version 2) components.

Possibly incomplete list of things that are known to not work with Entities yet:

  • Animation
  • Skinning
  • Morph targets
  • Cameras

DOTS Setup

  • First, go through the official DOTS project setup
  • Make sure to enable Hybrid Renderer V2
  • Use GltfEntityAsset instead of GltfAsset
  • For customized behavior, use the EntityInstantiator instead of the GameObjectInstantiator

Known issues

  • 1Vertex accessors (positions, normals, etc.) that are used across meshes are duplicated and result in higher memory usage and slower loading (see this comment)
  • 1When using more than one samplers on an image, that image is duplicated and results in higher memory usage
  • Texture sampler minification/magnification filter limitations (see issue):
    • 1There's no differentiation between minFilter and magFilter. minFilter settings are prioritized.
    • 1minFilter mode NEAREST_MIPMAP_LINEAR is not supported and will result in NEAREST.

1: A Unity API limitation.