Skip to content

Commit

Permalink
com.unity.cloud.gltfast@6.8.0
Browse files Browse the repository at this point in the history
## [6.8.0] - 2024-09-05

### Added
- (Import) Setting to create textures readable. This allows users to access resulting textures from their scripts.
- (Export) Non-readable meshes can be exported as well now.
- (Export) Added support for exporting meshes with vertex compression enabled (effectively converting 16-bit float positions/normals/tangents/texture coordinates to 32-bit floats).
- (Export) [Buffer view targets](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_bufferview_target) are set properly now.
- (Import) Support for mesh primitive modes `TRIANGLE_STRIP` and `TRIANGLE_FAN` (thanks [Hexer611][Hexer611] for [#22](Unity-Technologies/com.unity.cloud.gltfast#22))

### Fixed
- (Export) Writing to files on the web via IndexedDB now works (fixes [#625](atteneder/glTFast#625))
- (Export) test results are validated again.
- (Export) Removed expendable JSON content when exporting unlit materials without color or texture applied.
- Primitve mode LINE_LOOP works as expected (thanks [Hexer611][Hexer611] for [#22](Unity-Technologies/com.unity.cloud.gltfast#22)).
- (Test) Fail export test if glTF JSON contains unexpected or misses expected properties.
- Increased resilience against invalid animation data.
- Broken link in `CONTRIBUTING.md` (thanks [Hexer611][Hexer611] for [#22](Unity-Technologies/com.unity.cloud.gltfast#23)).
- Loading glTFs with unknown texture extensions (e.g. WebP, `EXT_texture_webp`) now works (fixes [#705](atteneder/glTFast#705)).
  • Loading branch information
Unity Technologies committed Sep 5, 2024
1 parent b48232e commit fef9171
Show file tree
Hide file tree
Showing 27 changed files with 1,384 additions and 190 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.8.0] - 2024-09-05

### Added
- (Import) Setting to create textures readable. This allows users to access resulting textures from their scripts.
- (Export) Non-readable meshes can be exported as well now.
- (Export) Added support for exporting meshes with vertex compression enabled (effectively converting 16-bit float positions/normals/tangents/texture coordinates to 32-bit floats).
- (Export) [Buffer view targets](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_bufferview_target) are set properly now.
- (Import) Support for mesh primitive modes `TRIANGLE_STRIP` and `TRIANGLE_FAN` (thanks [Hexer611][Hexer611] for [#22](https://github.com/Unity-Technologies/com.unity.cloud.gltfast/pull/22))

### Fixed
- (Export) Writing to files on the web via IndexedDB now works (fixes [#625](https://github.com/atteneder/glTFast/issues/625))
- (Export) test results are validated again.
- (Export) Removed expendable JSON content when exporting unlit materials without color or texture applied.
- Primitve mode LINE_LOOP works as expected (thanks [Hexer611][Hexer611] for [#22](https://github.com/Unity-Technologies/com.unity.cloud.gltfast/pull/22)).
- (Test) Fail export test if glTF JSON contains unexpected or misses expected properties.
- Increased resilience against invalid animation data.
- Broken link in `CONTRIBUTING.md` (thanks [Hexer611][Hexer611] for [#22](https://github.com/Unity-Technologies/com.unity.cloud.gltfast/pull/23)).
- Loading glTFs with unknown texture extensions (e.g. WebP, `EXT_texture_webp`) now works (fixes [#705](https://github.com/atteneder/glTFast/issues/705)).

## [6.7.1] - 2024-08-07

### Added
- Test for correct handling of Android JAR URIs.

### Fixed
- (Export) Cases of corrupt glTFs when not all vertex attributes of a mesh were exported.
- Alpha blending via baseColorTexture's alpha value is now in correct color space, less opaque and as a result consistent with other glTF viewers (affected URP and built-in render pipeline projects in linear color space; fixes [#700](https://github.com/atteneder/glTFast/issues/700)).
Expand Down Expand Up @@ -1204,6 +1226,7 @@ This release contains multiple breaking changes. Please read the [upgrade guide]
[Battlehub0x]: https://github.com/Battlehub0x
[Bersaelor]: https://github.com/Bersaelor
[EricBeetsOfficial-Opuscope]: https://github.com/EricBeetsOfficial-Opuscope
[Hexer611]: https://github.com/Hexer611
[Holo-Krzysztof]: https://github.com/Holo-Krzysztof
[hybridherbst]: https://github.com/hybridherbst
[krisrok]: https://github.com/krisrok
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ original creation and that you have complete right and authority to make your
contributions. We allow both individual contributions and contributions made on
behalf of companies.

[COC]: (CODE_OF_CONDUCT.md)
[COC]: CODE_OF_CONDUCT.md
[Git]: https://git-scm.com/
[repo]: https://github.com/Unity-Technologies/com.unity.cloud.gltfast
[issues]: https://github.com/Unity-Technologies/com.unity.cloud.gltfast/issues
Expand Down
12 changes: 12 additions & 0 deletions Documentation~/KnownIssues.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Known Issues

## Import

- ¹Vertex accessors (positions, normals, etc.) that are used across meshes are duplicated and result in higher memory usage and slower loading (see [this comment](https://github.com/atteneder/glTFast/issues/52#issuecomment-583837852))
- ¹When using more than one sampler on one image, that image is duplicated and results in higher memory usage
- Texture sampler minification/magnification filter limitations (see [issue][SamplerFilter]):
Expand All @@ -8,6 +10,16 @@

¹: A Unity API limitation.

## Export

### Non-readable Meshes

Exporting non-readable meshes is not supported!

Turn on *Read/Write Enabled* on all model importer settings that you intend to export to glTF later at runtime to ensure it works reliably (see [FBX importer settings](https://docs.unity3d.com/6000.0/Documentation/Manual/FBXImporter-Model.html) as example).

While exporting non-readable meshes in general is feasible (via reading back index and vertex buffers from GPU memory) it has proven to be unreliable across platforms and graphics APIs, especially builds made with Unity version 2022 and older. The fact that it seems to work stable in Editor playmode is deceptive. The problem seems to be better in Unity 6 Preview, but there's not enough data to support that so use at own risk.

## Trademarks

*Unity®* is a registered trademark of [Unity Technologies][Unity].
Expand Down
67 changes: 44 additions & 23 deletions Documentation~/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,38 +55,38 @@ The glTF 2.0 specification is fully supported, with only a few minor remarks.
| POINTS | ✅ | ✅
| LINES | ✅ | ✅
| LINE_STRIP | ✅ | ✅
| ¹LINE_LOOP | ✅ | ✅
| TRIANGLE_STRIP | |
| TRIANGLE_FAN | |
| LINE_LOOP | ✅ | ✅
| TRIANGLE_STRIP | ✅ | `n/a`
| TRIANGLE_FAN | ✅ | `n/a`
| Quads | `n/a` | ✅ via triangulation
| | |
| **Meshes**
| Positions | ✅ | ✅
| Normals | ✅ | ✅
| Tangents | ✅ | ✅
| Texture coordinates / UV sets | ✅ | `?`
| Three or more texture coordinates / UV sets | ²☑️ | `?`
| Vertex colors | ✅ | `?`
| Texture coordinates / UV sets | ✅ |
| Three or more texture coordinates / UV sets | ¹☑️ |
| Vertex colors | ✅ |
| Draco™ mesh compression (via [DracoForUnity]) | ✅ | ✅
| Implicit (no) indices ||
| Per primitive material | ✅ | ✅
| Joints (up to 4 per vertex) ||
| Weights (up to 4 per vertex) ||
| Joints (up to 4 per vertex) | ✅ |
| Weights (up to 4 per vertex) | ✅ |
| | |
| **Morph Targets / Blend Shapes**
| Sparse accessors | ³|
| [Skins][Skins] ||
| Sparse accessors | ²|
| [Skins][Skins] | ✅ |
| | |
| **Animation**
| via legacy Animation System ||
| via Playable API ([issue][AnimationPlayables]) | |
| via Mecanim ([issue][AnimationMecanim]) | |
| via Mecanim ([issue][AnimationMecanim]) | ³☑️ |

¹: Untested due to lack of demo files.
¹: Up to eight UV sets can imported, but *Unity glTFast* shaders only support two (see [issue][UVsets]).

²: Up to eight UV sets can imported, but *Unity glTFast* shaders only support two (see [issue][UVsets]).
²: Not on all accessor types; morph targets and vertex positions only

³: Not on all accessor types; morph targets and vertex positions only
³: Animation clips can be imported Mecanim compatible, but they won't be assigned and cannot be played back without further work.

## Extensions

Expand All @@ -96,45 +96,66 @@ The glTF 2.0 specification is fully supported, with only a few minor remarks.
|------------| ------ | ------
| | |
| **Khronos**
| KHR_animation_pointer | | |
| KHR_draco_mesh_compression | ✅ | ✅
| KHR_materials_pbrSpecularGlossiness ||
| KHR_materials_unlit | ✅ | ✅
| KHR_texture_transform | ✅ | ✅
| KHR_mesh_quantization ||
| KHR_texture_basisu ||
| KHR_lights_punctual | ✅ | ✅
| KHR_materials_anisotropy | | |
| KHR_materials_clearcoat | ✅ | ✅
| KHR_materials_dispersion | | |
| KHR_materials_emissive_strength | | |
| KHR_materials_ior | [ℹ️][IOR] |
| KHR_materials_iridescence | | |
| KHR_materials_sheen | [ℹ️][Sheen] |
| KHR_materials_specular | [ℹ️][Specular] |
| KHR_materials_transmission | [ℹ️][Transmission] |
| KHR_materials_unlit | ✅ | ✅
| KHR_materials_variants ||
| KHR_materials_ior | [ℹ️][IOR] |
| KHR_materials_specular | [ℹ️][Specular] |
| KHR_materials_volume | [ℹ️][Volume] |
| KHR_mesh_quantization ||
| KHR_texture_basisu ||
| KHR_texture_transform | ✅ | ✅
| KHR_xmp_json_ld ||
| ²KHR_materials_pbrSpecularGlossiness | ☑️ |
| | |
| **Vendor**
| ¹EXT_mesh_gpu_instancing ||
| EXT_meshopt_compression ||
| EXT_lights_image_based | [ℹ️][IBL] |
| EXT_texture_webp | | |

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

²: Archived/obsolete; Superseded by KHR_materials_specular

Not investigated yet:

- ADOBE_materials_clearcoat_tint
- AGI_articulations
- AGI_stk_metadata
- CESIUM_primitive_outline
- EXT_lights_ies
- EXT_mesh_manifold
- GRIFFEL_bim_data
- MPEG_accessor_timed
- MPEG_animation_timing
- MPEG_audio_spatial
- MPEG_buffer_circular
- MPEG_media
- MPEG_mesh_linking
- MPEG_scene_dynamic
- MPEG_texture_video
- MPEG_viewport_recommended
- MSFT_lod
- MSFT_packing_normalRoughnessMetallic
- MSFT_packing_occlusionRoughnessMetallic
- NV_materials_mdl

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)

Expand Down Expand Up @@ -224,7 +245,7 @@ Other shaders might (partially) work if they have similar properties (with ident

³: Built-In Render Pipeline Standard and Unlit Shader

⁴: Vertex colors are always exported, regardless whether the shader makes use of them.
⁴: The vertex color attribute is only exported if the material/shader makes use of it (see [Vertex Attribute Discarding](ExportRuntime.md#vertex-attribute-discarding)).

#### glTFast Shaders

Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Export/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GLTFast.Export
{
static class Constants
{
public const string version = "6.7.1";
public const string version = "6.8.0";

internal const string mimeTypePNG = "image/png";
internal const string mimeTypeJPG = "image/jpeg";
Expand Down
Loading

0 comments on commit fef9171

Please sign in to comment.