Skip to content

Latest commit

 

History

History
281 lines (234 loc) · 10.8 KB

features.md

File metadata and controls

281 lines (234 loc) · 10.8 KB

Features

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)

Workflows

Runtime Editor (design-time)
GameObject
Import ✅️
Export ℹ️ 1 ☑️
Entities (see DOTS)
Import ☑️ n/a
Export n/a

1: glTF export currently only works on Unity 2020.2 or newer.

Core glTF features

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

Import Export
Format
glTF (.gltf)
glTF-Binary (.glb)
Buffer
External URIs
GLB main buffer
Embed buffers or textures (base-64 encoded within JSON)
meshoptimizer compression (via package)
Basics
Scenes
Node hierarchies
Cameras
Images
PNG
Jpeg
KTX with Basis Universal compression (via KtxUnity)
Texture sampler
Filtering ✅ with limitations ✅ with limitations
Wrap modes
Materials Overview (see details)
Universal Render Pipeline (URP) ☑️
High Definition Render Pipeline (HDRP) ☑️
Built-in Render Pipeline ☑️
Topologies / Primitive Types
TRIANGLES
POINTS
1LINES
LINE_STRIP
1LINE_LOOP
TRIANGLE_STRIP
TRIANGLE_FAN
Quads n/a ✅ via triangulation
Meshes
Positions
Normals
Tangents
Texture coordinates / UV sets ?
Three or more texture coordinates / UV sets issue ?
Vertex colors ?
Draco mesh compression (via DracoUnity)
Implicit (no) indices
Per primitive material
Joints (up to 4 per vertex)
Weights (up to 4 per vertex)
Morph Targets / Blend Shapes
Sparse accessors 2
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: Not on all accessor types; morph targets and vertex positions only

Extensions

Official Khronos extensions

Import Export
Khronos
KHR_draco_mesh_compression
KHR_materials_pbrSpecularGlossiness
KHR_materials_unlit
KHR_texture_transform
KHR_mesh_quantization
KHR_texture_basisu
KHR_lights_punctual
KHR_materials_clearcoat ℹ️
KHR_materials_sheen ℹ️
KHR_materials_transmission ℹ️
KHR_materials_variants ℹ️
KHR_materials_ior ℹ️
KHR_materials_specular ℹ️
KHR_materials_volume ℹ️
KHR_xmp_json_ld
Vendor
1EXT_mesh_gpu_instancing
EXT_meshopt_compression
EXT_lights_image_based ℹ️

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 become supported (reason in brackets):

  • KHR_xmp (archived; prefer KHR_xmp_json_ld)
  • KHR_techniques_webgl (archived)
  • 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 Details

Material Import

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 ℹ️ ℹ️ ⛔️
Point clouds Unlit only

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.

Material Export

Material export is currently only tested on the following shaders:

  • Universal and High Definition render pipeline
    • Lit
    • Unlit
  • Built-In render pipeline
    • Standard
    • Unlit

Other shaders might (partially) work if they have similar properties (with identical names).

Material Feature URP1 HDRP2 Built-In3
PBR Metallic-Roughness
PBR Specular-Glossiness
Unlit
Normal texture
Occlusion texture
Emission texture
Alpha modes OPAQUE/MASK/BLEND
Double sided / Two sided
Vertex colors ? ? ?
Multiple UV sets ? ? ?
Texture Transform
Clear coat n/a
Sheen ? ? n/a
Transmission n/a
Variants
IOR n/a
Specular
Volume n/a

1: Universal Render Pipeline Lit Shader

2: High Definition Render Pipeline Lit Shader

3: Built-In Render Pipeline Standard and Unlit Shader

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 experimental import 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
  • Lights

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

Unity Version Support

glTFast requires Unity 2019.4 or newer.

Legend

  • ✅ Fully supported
  • ☑️ Partially supported
  • ℹ️ Planned (click for issue)
  • ⛔️ No plan to support (click for issue)
  • ?: Unknown / Untested
  • n/a: Not available