Skip to content

Releases: atteneder/glTFast

glTFast 6.4.0

22 Apr 15:06
Compare
Choose a tag to compare

Added

  • Tests for all GltfImport.Load overloads.
  • Tests for all import Burst jobs.
  • ICodeLogger.Log for dynamic LogType usage.

Changed

  • Emission sub graph uses shader define SHADEROPTIONS_PRE_EXPOSITION for HDRP usage detection (replacing a custom function node that checked for UNITY_HEADER_HD_INCLUDED).
  • BaseColor sub graph uses built-in shader define UNITY_COLORSPACE_GAMMA for project color space detection (replacing a custom function node).

Fixed

  • Shader sub graphs BaseColor and Emission are now compatible with PolySpatial visionOS.
  • On Apple visionOS, textures are always created readable, so that PolySpatial visionOS is able to convert them.
  • Draco compressed tangents import tangents correctly now.
  • Removed invalid attempt to calculate normals or tangents on point or line meshes.
  • Consistent log message when a glTF extension cannot be supported due to a missing Unity package depenency (e.g. KTX for Unity).
    • All missing extensions are logged (not just the first one).
    • There's now a single message per missing package.
    • Depending on whether that extension is required the message's type is warning or error.
    • Added explicit message when meshoptimizer decompression for Unity is missing.

glTFast 6.3.0

22 Apr 15:03
Compare
Choose a tag to compare

Added

  • Runtime import tests.
  • Runtime export tests.
  • (Export) Added development-time checks for valid JSON string literals.
  • Added Apple Privacy Manifest file to /Plugins directory.

Changed

  • Refactored test scripts folder layout.
  • (Export) Normal maps are exported in PNG format by default.
  • (Export) HDRP area lights are still exported as spot-lights, but their intensity is taken from Light.intensity (still incorrect, but more consistent).
  • Switched from asset-path-based to GUID-based shader loading (in the Editor 2021 and newer) in order to allow for a flexible folder layout without risking breaks/regressions should the layout change in the future.
  • Avoid expensive UnityEngine.Object null check when accessing cached default shaders.

Fixed

  • Exception when required glTF shader is not included.
  • Compiler errors when safe mode (GLTFAST_SAFE scripting define) is enabled.
  • Compiler error with High Definition Render Pipeline version 17 (2023.3)
  • Removed usage of obsolete APIs in High Definition Render Pipeline version 17 (2023.3)
  • (Export) Area light's range value is exported accurately (as shown in the inspector).
  • Various occasions of NullReferenceException when no logger is used/provided.
  • Proper error handling when trying to load unsupported sparse texture coordinates.
  • Ensure that special chars in string values don't lead to invalid JSON.
  • Using invariant culture ToLower/ToUpper variants on all non-language-specific data.
  • Added missing GetHashCode implementation (removes compiler warning).
  • Compiler errors and warnings on newer HDRP versions (16.x/17.x)
  • URP clearcoat shader loading at runtime.
  • HDRP stack-lit shader loading at runtime.

glTFast 6.2.0

29 Jan 15:51
Compare
Choose a tag to compare

Added

  • Deprecated soft-dependency packages are detected and a warning with upgrade instructions is shown in the console.

Changed

Fixed

  • Compiler error when Newtonsoft JSON package was not installed.
  • All Draco vertex attributes are assigned by identifier instead of type. As a result, tangents are now decoded properly instead of recalculated.
  • Compilation error when scripting define GLTFAST_BUILTIN_SHADER_GRAPH is set.
  • GltfImport.IsTextureYFlipped returns correct result for non-KTX textures.

glTFast 6.1.0

29 Jan 15:48
Compare
Choose a tag to compare

Added

  • (Documentation) Explanation and user case for the add-on API
  • GltfImport.IsTextureYFlipped to support non-default texture orientations

Changed

  • Documentation improvements
  • Auto-formatted all markdown, USS, UXML and shader code
  • CI maintenance

Fixed

  • Updated references to KTX for Unity

glTFast 6.0.1

19 Oct 11:21
Compare
Choose a tag to compare

Fixed

  • Compilation error when Animation module is disabled and Newtonsoft JSON package installed.

glTFast 6.0.0

19 Oct 11:12
Compare
Choose a tag to compare

Added

  • Custom Add-On API (GLTFast.Addons namespace)
  • Support for alternative JSON parsing via Newtonsoft JSON
  • Accessor.ElementByteSize: Byte size of one element of that accessor
  • Accessor.ByteSize: Overall byte size
  • IGltfReadable.GetAccessor: Generic byte-array view into an accessor
  • GameObjectInstantiator events that allow further instantiation customizations
    • NodeCreated
    • MeshAdded
    • EndSceneCompleted
  • Value array JSON parsing tests
  • String/enum conversions tests
  • (Import) Clearcoat material support in HDRP and URP (via KHR_materials_clearcoat extension)
  • (Export) Clearcoat material export support for HDRP Lit shader

Changed

  • Bumped minimum Unity version to 2020.3.48f1
  • Renamed GltfAnimation to Animation for consistent naming.
  • Bumped Burst dependency version to 1.8.4
  • Bumped Mathematics dependency version to 1.3.1

Fixed

  • Added Obsolete attribute to public schema class fields that are for serialization only and should not get modified directly.
  • More robust parsing of (invalid) enum values

glTFast 5.2.0

18 Oct 13:39
Compare
Choose a tag to compare

Added

  • Runtime tests
  • (Export) Setting for deterministic export (limits concurrency to ensure consistent output)
  • (DOTS) Support for Entities 1.0

Changed

  • Optimized Accessor.GetAccessorAttributeType
  • Optimized GltfEntityAsset.ClearScenes via Burst
  • Bump minimum unity version from 2019.4.7f1 to 2019.4.40f1

Fixed

  • Compiler errors and warnings on Unity 2023.2 (and newer) due to using obsolete types.

glTFast 5.1.0

18 Oct 09:50
Compare
Choose a tag to compare

Added

  • (Export) Support for Draco mesh compressed exports

Changed

  • Added proper root namespace to all assembly definitions
  • License and copyright notices

glTFast 5.0.4

13 Apr 16:08
Compare
Choose a tag to compare

Changed

  • (Export) Texture coordinates are now flipped vertically, similar to how it's performed at import. This ensures round-trip consistency (#342).

Fixed

  • (Export) Invalid blend indices or blend weights are not exported anymore (as skinning is not supported yet; #556)
  • Compiler error when using .NET Framework on 2021.3 and newer (#550)
  • GltfBoundsAsset's instantiation settings are applied now
  • GltfBoundsAsset's BoxCollider is positioned correctly, even if GameObject is not at scene origin (#565)

glTFast 5.0.0

09 Dec 14:32
Compare
Choose a tag to compare

This release contains multiple breaking changes. Please read the upgrade guide for details.

Added

  • settings parameter to GameObjectBoundsInstantiator's constructor
  • (Import) Support for lights via KHR_lights_punctual extension (#17)
  • (Import) Exclude/include certain features (e.g. camera, animation, lights) via InstantiationSettings.Mask (of type ComponentType)
  • DOTS instantiation settings support
  • (Import) Additional load methods in GltfImport (#409)
    • Load override to load from a byte[]
    • LoadFile to load from local files
    • LoadGltfJson to load a glTF JSON from string
  • (Import) SceneObjectCreation instantiation setting. It controls whether/when a GameObject/Entity should be created for the scene. Options: Always, Never, WhenSingleRootNode. (#320)
  • (Import) Design-time import inspector now offers many more settings (feature parity with run-time settings)
  • Extended access to IGltfReadable
    • GetSourceRoot
    • GetSourceNode
    • GetBindPoses
  • GltfAsset component got new properties for code-less setup
    • Import Settings
    • Instantiation Settings
  • Warning when trying to load the main scene if it is not defined (Editor and development builds only; #450)
  • (Export) Support for camera export
  • (Export) Support for lights export
  • glTF icon assigned to imported glTF assets, GltfAsset* components and and various setting classes
  • (Import) Support for up to 8 UV sets (note: glTF shaders still support only two sets; part of #206)
  • IMaterialGenerator was extended with support for points topology
  • (Export) GameObjectExportSettings.DisabledComponents to explicitely enable export of disabled components (e.g. MeshRenderer, Camera, or Light)
  • (Export) ExportSettings.ComponentMask to include or exclude components from export based on type
  • (Export) GameObjectExportSettings.LayerMask to include or exclude GameObjects from export based on their layer
  • (Import) Async instantiation methods. This helps to ensure a stable frame rate when loading bigger glTF scenes (#205)
  • GltfGlobals is public now
  • GameObjectInstantiator.SceneTransform is public now

Changed

  • The API was changed considerably to conform closer to Unity's coding standard and the Microsoft's Framework Design Guidelines. Some notable items:
    • PascalCase on properties
    • Removed direct access to fields
    • More consistent naming of assemblies, namespaces, classes, constants, static members, etc.
    • Removed majority of Rider code analysis warnings and suggestions
  • Converted a lot of unintentionally public classes, types and properties to internal ones
  • Replaced CollectingLogger.item with .Count and .Items iterator
  • Moved logging related code into GLTFast.Logging namespace
  • Renamed Schema.RootChild to Schema.NamedObject and made it abstract
  • Converted GameObjectInstantiator.Settings to InstantiationSettings
  • Removed RenderPipelineUtils.DetectRenderPipeline in favor of RenderPipelineUtils.RenderPipeline
  • Additional methods/properties (e.g. from class GameObjectInstantiator) are virtual, so they can be overriden
  • GltfImport implements IDisposable now (#194)
  • Support for PNG/Jpeg textures (via built-in packages Unity Web Request Texture and Image Conversion) is now optional (#321)
  • Root entity created by GltfEntityAsset will inherit its GameObject's name, position, rotation and scale (at instantiation time)
  • Removed GltfImport.GetAccessor from public API (to be replace by a better API; see #426 for details)
  • Converted emissiveFactor shader property from low to high dynamic range (HDR) and removed the now obsolete emissiveIntensity shader property (float)
  • Shader keyword _UV_ROTATION was replaced by _TEXTURE_TRANSFORM, which now controls tiling, offset and rotation all together
  • Animation is not played by default anymore (check the upgrade guide on how to restore this behavior; #339)
  • (Import) Deprecated existing, sync instantiation methods in favor of new async ones
  • KTX textures load much smoother thanks to bumping KtxUnity to 1.3.0 or 2.2.1
  • Sped up loading of external KTX textures by avoid making a redundant memory copy.
  • IDownload does not derive from IEnumertor anymore
  • (Import) Successfully tested mesh primitive draw mode lines and removed error message about it being untested
  • (Export) Disabled components (e.g. MeshRenderer, Camera, or Light) are not exported by default (see also: new GameObjectExportSettings.DisabledComponents setting to get old behavior)
  • (Export) GameObjects with tag EditorOnly (including children) don't get exported (similar to building a scene)
  • Added optional CancellationToken parameter to async import/export methods. This is preparation work for proper cancellation. Does not work as expected just yet.
  • Refactored Assembly Definitions
    • glTFastSchema was merged into glTFast and thus removed
    • glTFastEditor was renamed to glTFast.Editor
    • glTFastEditorTests was renamed to glTFast.Editor.Tests
  • GltfAsset.FullUrl is public now (convenient for some tests)
  • IInstantiator changes
    • IInstantiator.BeginScene signature dropped third parameter AnimationClip[] animationClips that was depending on built-in Animation module to be enabled.
    • IInstantiator.AddAnimation was added. Only available when built-in Animation module is enabled.
  • Converted properties that were hiding conversion logic or caching into methods
    • Accessor: typeEnum to GetAttributeType/SetAttributeType
    • BufferView: modeEnum to GetMode
    • BufferView: filterEnum to GetFilter
    • AnimationChannelTarget: pathEnum to GetPath
    • AnimationSampler: interpolationEnum to GetInterpolationType
    • Camera: typeEnum to GetCameraType/SetCameraType
    • LightPunctual: typeEnum to GetLightType/SetLightType
    • Material: alphaModeEnum to GetAlphaMode/SetAlphaMode
  • Moved some nested classes into dedicated files and up the namespace hierarchy
    • GameObjectInstantiator.SceneInstance is now GameObjectSceneInstance
    • ImportSettings.NameImportMethod is now NameImportMethod
    • InstantiationSettings.SceneObjectCreation is now SceneObjectCreation
  • HttpHeader's properties are readonly now. A constructor was added as compensation.

Removed

  • Obsolete code
    • GltfImport.Destroy (was renamed to GltfImport.Dispose)
    • GLTFast.GltFast (was renamed to GltfImport)
    • GltfImport.InstantiateGltf (was replaced by InstantiateMainScene and InstantiateScene)
    • Remains of Basis Universal extension draft state
      • Schema.Image.extensions
      • Schema.Image.ImageExtension
      • Schema.Image.ImageKtx2

Fixed

  • Shader graphs' BaseColor, BaseColorTexture and vertex color calculations are now in correct color space
  • Export MeshRenderer where number of materials does not match number of submeshes (thanks @DanDovi for #428)
  • Shaders and shader graphs now have a proper main color and main texture assigned (except legacy shader graphs where this is not supported)
  • No more redundant default (fallback) materials are being generated
  • (JSON parsing) Potential NPDR when just one of many node extensions is present (#464)
  • (Import) Draco meshes are correctly named (#527)
  • (Import) Gracefully fallback to loading textures from byte arrays if UnityWebRequestTexture module is not enabled and trigger a warning.
  • (Import) GltfBoundsAsset.Load properly passes on the logger now.
  • (Import) Exception upon loading a file that uses the KHR_animation_pointer extension.