All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- XML documentation comments on many types
- Point meshes are rendered consistently on more platforms (iOS, Vulkan) due to explicitely setting
PSIZE
(thanks Kim Wonkee for #309) - Removed Editor markup resources from builds
- Misformated XML documentation comments
- Generic shader graphs (to reduce the amount of shader graphs to maintain and reduce shader variants)
glTF-pbrMetallicRoughness
glTF-pbrSpecularGlossiness
glTF-unlit
- The new, generic shader graphs are used for
- Universal render pipe 12 or newer
- High-Definition render pipe 10 or newer
- Optional/Experimental for the Built-In render pipe (see Shader Graphs and the Built-In Render Pipeline in the documentatoin for details)
- Correct emission in HDRP 12 and later
- (Shader Graph) Vertex color alpha channel is used properly
- (Shader Graph) Correct vertex colors when project uses linear color space
- (Shader Graph) Emission is now in correct color space
SkinnedMeshRenderer
created by theGameObjectInstantiator
will haveupdateWhenOffscreen
set to true to avoid culling issues (at a performance cost; #301)- (Editor Import): Imported Mecanim AnimationClips now have Loop Time set to true (fixes #291)
- Improved skin deformation on unorderd-joints-glTFs in projects with
Skin Weights
(quality setting) below 4 (#294) - Textures are not duplicated anymore if they reference different samplers with equal settings (yields huge memory savings, depending on some glTFs; thanks Vadim Andriyanov for #304)
- Improved frame rate when loading glTFs with many morph targets (thanks Eric Beets for #287)
GameObjectInstantiator.SetNodeName
can be overridden now (thanks STUDIO NYX for #297)
- Matrix decompose error (thanks weichx)
- Flickering animation on invalid glTFs from Sketchfab (#298)
- (URP/HDRP) Materials with
alphaMode
MASK
are alpha tested (and not blended as well) as specified in the specification (thanks rt-nikowiss for #296)
- Morph target animation curves have correct first keyframe value now (thanks Eric Beets for #277)
- (URH/HDRP) UV transform and UV channel on blended materials
- Error when using transmission approximation without a logger provided
ConsoleLogger
non-LogCode
messages have the correct log level now- Correct blending on URP 12 / HDRP 10 alpha blended materials
- (HDRP): Configuring materials via settings and shader keywords instead of using duplicated shader graphs. This reduces the total shader variant count.
- Correct blend mode for transmission in URP
- Correct transparency on HDRP >= 10.x (Unity 2020.3 and newer)
- (URP/HDRP) Using the second UV set on double-sided materials
- (URP/HDRP) Corrected baseColorTexture UV transform on double-sided materials
- Added warning when more than two UV sets are supposed to be imported (not supported yet)
- Major performance improvement when loading glTFs with many KTX textures
- Correct import of interleaved float RGBA vertex colors (thanks @mikejurka for #266)
- Corrected potential pitfall by incorrect UV import job handling (thanks @mikejurka for reporting)
- (Export) Exception due to incorrect property ID usage
- JSON parse tests
- Added missing Job variant for users of the Jobs package
GltfBoundsAsset
now has correctsceneInstance
andcurrentSceneId
properties- Documentation: Fixed and improved export via script section (#270)
- Removed precausious error message after testing real world example (#268)
- Error when animation package is not enabled (#267)
- Build compiler error about missing variable (#265)
- Release build only compiler errors
- Offset of accessor into buffer was incorrect for some scalar accessors (#262)
- .NET 4.6 compiler issue (#261)
- Experimental glTF Editor Export (under main menu
File > Export
and via APIGLTFast.Export.GameObjectExport
; #249) - Support for meshopt compressed glTFs (EXT_meshopt_compression; #106)
- Generate Lightmap UVs option in the glTF import inspector lets you create a secondary texture coordinate set (similar to the Model Import Settings from other formats; #238)
- Generic
ICodeLogger
methods that don't require aLogCode
- Raised required Unity version to 2019.4.7f1 (fixes Burst 1.4 compiler issue #252). If you're on 2019.x, make sure to update to the latest LTS release!
- Less GC due to
CollectingLogger
creating the item list on demand
- Option to turn off Editor import by adding
GLTFAST_EDITOR_IMPORT_OFF
to the project's Scripting Define Symbols in the Player Settings (#256)
- Import of glTFs with no meshes (#257)
- Corrected mesh bounds (calculated from accessor's min/max)
- No errors when importing empty scenes
- Removed redundant code
- Completed quantization by supporting UInt8/UInt16 skin bone weights
- If
skin.skeleton
is properly set,SkinnedMeshRendererRoot
's root bone property will be assigned accordingly - Major animation loading performance improvements by inlining and optimizing hot for-loops
- Animation sampler properly defaults to
LINEAR
interpolation in case it is not specified - Correct
LINEAR
animation interpolation due to fixing tangent calculation - Correct
LINEAR
animation interpolation on (quaternion) rotations by ensuring shortest path (#250, #251) - Unlit built-in render pipeline materials have correct texture transform again
- Correct quantized morph target shading by fixing (not normalizing) delta normals and delta tangents
- Point clouds (POINTS primitive mode) are approved now - removed error log
- Avoid Burst compiler issue on Windows by using
UnsafeUtility.MemCpy
overSystem.Buffer.MemoryCopy
(#245)
- Multiple texture related import settings (thanks @aurorahcx for #215)
generateMipMaps
(default is false)defaultMinFilterMode
(minification; default is linear)defaultMagFilterMode
(magnification; default is linear)anisotropicFilterLevel
(default is 1)
- Unit tests for all vertex/index buffer conversion jobs
- Performance improvement due to enabling Burst compiler on all vertex/index buffer conversion jobs
defaultMinFilterMode
was changed toLinear
(fromNearestMipmapLinear
). This way textures will fall back to bilinear filtering (FilterMode.Bilinear
) when it was not specified explicitly.GameObject
specifics were moved fromGltfAssetBase
intoGltfAsset
in preparation for ECS- Exposing glTFast assembly internals to glTF-test-framework
- Memory corruption when using unsigned byte positions or signed short UVs
- Set
_METALLICGLOSSMAP
and_OCCLUSION
keywords in material editor on texture import (thanks @hybridherbst for #237) - Missing name on some textures
- Incorrect rotations from signed byte quaternions
- Incorrect UVs when using unsigned byte or signed/unsigned short texture coordinates
- Incorrect values converting signed byte encoded tangents
- Correct specular-glossiness materials in spite of (correct or incorrect) presence of metallic-roughness properties (fixes #241)
- Added Burst as dependency
- Improved handling corrupted glTF files (thanks @zharry for #230)
- Loading Ready Player Me avatars with unsupported node extension (
MOZ_hubs_components
) - Loading glTF-binary files that have no buffers or an empty binary chunk (#227)
- Crash and incorrect mesh clustering caused in
MeshPrimitive.Equals
(#224) - Compiler error when Burst is not installed (#222)
- Support for morph targets / blend shapes (#8)
- Support for animated morph targets / blend shapes
- Support for sparse accessors (morph targets and vertex positions only for now)
- Safe build option for more robust loading (
GLTFAST_SAFE
scripting define) - Burst as dependency
- Minor primitive GameObject name change.
GltfImport
is now fully responsible forGameObject
names in order to ensure consistency between animation paths and model hierarchy. - glTF importer inspector
- Removed "Node Name Method" option from glTF importer inspector. It still an option at run-time, but is always
OriginalUnique
at design-time imports. Animation
setting is disabled if built-in package animation is disabled
- Removed "Node Name Method" option from glTF importer inspector. It still an option at run-time, but is always
- For better clarity, changed type of
Sampler
propertiesminFilter
,magFilter
,wrapS
andwrapT
from into to enum types and added tests - Optional dependencies
- KtxUnity: raised required version to 1.1.0
- DracoUnity: raised required version to 3.1.0
- Works again with built-in package animation disabled (thanks @Bersaelor for #204)
- Resolve dot segments ("." and "..") in URIs according to RFC 3986, section 5.2.4 (fixes #213)
- Corrected vertex attribute order when loading meshes with both texture coordinates and vertex colors
- Added some sanity checks
- Import setting to create non-legacy animation clips (thanks @hybridherbst for #196)
- Support for two texture coordinate sets in materials (URP, HDRP and Built-in; fixes #34)
- Support for individual texture transform per texture type (URP, HDRP and Built-in)
- Support for occlusion maps on specular-glossiness materials (extension KHR_materials_pbrSpecularGlossiness)
- Editor import: Separate textures are only referenced in AssetDatabase (not re-added)
- Warnings due to conflicting script file names
Animation.cs
andCamera.cs
(#198)
- Renamed
GLTFast.ILogger
toGLTFast.ICodeLogger
to avoid confusion withUnityEngine.ILogger
- Null pointer dereference exception on
accessorData
(thanks @hybridherbst) - Corrected flipped texture transform for KTX texture (#176)
- Import glTF files at design-time in the Editor
- Custom inspector for imported glTF files, featuring import log messages
ImportSettings
can be provided toGltfImporter.Load
(optionally) to customize the loading behaviour (quite limited at the moment, but gives room to grow)ImportSettings.nodeNameMethod
to allow customizing Node/GameObject naming convention
IGltfReadable
interface forGltfImporter
- Import and instantiation logging customization (see
ILogger
). Allows users to analyze log messages and/or opt out of logging all messages to the console (which is still done by default if you're usingGltfAsset
). - Scene support. glTF can contain multiple scenes and now it is possible to instantiate them selectively
GltfImport.InstantiateMainScene
to create an instance of the main scene (or nothing if thescene
is not set; following the glTF 2.0 specification)GltfImport.InstantiateScene
to create an instance of a specific scene
- GPU instancing via
EXT_mesh_gpu_instancing
glTF extension (#107). - Camera support (via
IInstantiator.AddCamera
; #12)
- Coordinate space conversion from glTF's right-handed to Unity's left-handed system changed. Please see the upgrade guide for details and the motivation behind it.
- Nodes' names are made unique (within their hierarchical position) by supplementing a continuous number. This is required for correct animation target lookup and import continuity.
IInstantiator.AddPrimitive
extended parameterfirst
(bool
; true for the first primitive) to primitiveNumeration (int
; counting upwards from zero). This allows for creating unique GameObject names.- Renamed the main class
GltFast
toGltfImporter
to properly reflect its purpose. There is a fallbackGltFast
class for backwards compatibility - Renamed
GltfImporter.Destroy
toGltfImporter.Dispose
to have more consistent naming similar to native containers IMaterialGenerator
overhaul that allows more flexible generation of materials (ahead of time)GenerateMaterial
instead of passing on all require data (like full texture arrays), data has to be fetched from theGltfImporter
/IGltfReadable
.
IInstantiator.AddPrimitive
: Instead ofMaterial
the IDs/indices of materials are provided and the materials themselves have to be fetched from theIGltfReadable
/GltfImporter
(allowing more flexible usage)GltfImport.InstantiateGltf
(instantiates all scenes at once) is marked obsolete in favour ofInstantiateMainScene
andInstantiateScene
- Performance improvement:
NativeArray
buffers are not created copying memory. Instead they are created from pinned managed byte arrays. This should have some positive effect on binary glTFs with Draco meshes and KTX textures. - Update to DracoUnity 3.0.0
- Runtime tests. They were moved into a dedicated test package.
GltfBoundsAsset
create just one instances (was two before; fixes #182)
- Support for alpha modes
BLEND
andMASK
on unlit materials (thanks Sehyun av Kim for #181; fixes #180)
- Ignore / don't show errors when newer DracoUnity versions with incompatible API are installed
- Properly freeing up memory of animation clips
GameObjectBoundsInstantiator
correctly calculates bounds for scenes that contain multi-primitive meshes (fixes #173)- Corrected linear/gamma sampling whenever texture index does not equal image index (fixes #172)
- Support for animations via Unity's legacy animation system (
Animation
component; #124)
- Image format is properly detected from URIs with HTTP queries (thanks JonathanB-Vobling for #160; fixes #158)
- Unlit shaders are now correctly assigned for double-sided variants (thanks @hybridherbst for #163)
- Sample code for custom defer agent is now thread safe (fixes #161)
- Meshes with two UV sets and vertex colors now work (fixes #162)
- Unlit alpha blended ShaderGraph variants (thanks @hybridherbst for #144)
- Support for unsigned byte joint indices
- Accelerated loading meshes by obtaining and setting bounds from accessors min/max values instead of recalculating them
- Improved log message when DracoUnity/KtxUnity packages are missing
- Restored/simplified
GLTFast.LoadGltfBinary
, allowing users to load glTF binary files from byte arrays directly (also added documentation; fixes #148)
- Texture offset/tiling values don't get lost when switching shaders (thanks @hybridherbst for #140)
- Correct vertex colors for RGB/unsigned short, RGBA/unsigned short and RGBA/unsigned byte. (thanks @camogram for #139)
- Error when trying to set texture offset/scale but material doesn't have _MainTex property (thanks @hybridherbst for #142)
- Crash when trying to combine meshes created by glTFast by setting proper submesh vertex count (fixes #100)
- Had to bring back
GltfAsset.isDone
for render tests
- WebGL loading by not using unsupported
System.Threading.Task.Run
(fixes #131) - Escaped, relative buffer/texture URIs now work on local file system consistently
- Rendertests work again
- Error message when a UV set other than the first one is used (is unsupported; see issue #34)
- Unit test for loading all models once (good for quick checks in comparison to performance tests, which take very long)
- No more exception on models with
KHR_materials_variants
glTF extension (not supported yet) - Compiler errors in Tests assembly due to inconsistent/incomplete class names/namespaces changes
- Moved
SampleSet
related code into dedicated Assembly, so it can be used in unit tests as well client applications (but doesn't have to).
- Build size optimization: Physics package is not required anymore (
GltfBoundsAsset
won't work as expected in that case) - Build size optimization: Removed usage of
System.Linq
- Removed compiler warnings (in case KtxUnity is missing)
- KtxUnity required version >=1.0.0
- DracoUnity required version >=1.4.0
- Converted API and internals to async/await. This is more convenient in some cases and eases future optimizations.
- Performance improvements
- Non-trivial JSONs are parsed in a thread now
- More consistent frame rates due to task duration estimation in various places along the loading code
- Embed base 64 buffers are decoded in a thread now
- Less memory usage (and likely faster) du to Jpeg and PNG textures being loaded non-readable (if possible)
- Support for performance benchmark package
- Unit tests are working in builds again (not just in the Editor)
- Renamed glTF shader graph properties to match Unity Lit/BuiltIn Standard shader properties. Switching shaders preserves more attributes this way.
- Consistent casing in shader graph names
- Apply material's occlusion strength properly
- Removed artifacts on double sided opaque materials
- Properly clean up volatile download dictionaries
- Build compilation when targeting URP/HDRP
- Ported partial support for transmission materials to URP/HDRP 7.x
- Improved/alternative transmission mode for Universal Render Pipeline that kicks in if
Opaque Texture
is enabled in URP settings
- Partial support for transmission materials in built-in render pipeline (extension KHR_materials_transmission; see #111 for details)
- Performance improvement: Avoid redundant Shader.Find invocations by making cached shader references static
- Built-In shaders can customized now by overriding
BuiltInMaterialGenerator.FindShader*
methods
- Unlit double sided shader graph materials
- Support for Shader Graph based Render Pipelines including Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP) (#41,#42)
- Material inspector: texture rotation value (in degrees) for both built-in and Shader Graph materials
GltfAsset
now provides astreamingAssets
option (default is off), for loading relative paths from the StreamingAssets folderGameObjectBoundsInstantiator
, a derived version ofGameObjectInstantiator
that calculates the glTF's axis-aligned bounding boxGltfBoundsAsset
, a derived version ofGltfAsset
that adds a BoxCollider to instantiations- Render Tests: Minimize chance of visual regression by checking import results against reference images
- Texture transform UV rotation: Using standard
_ST
property (Scale-Translation) by default. When rotation is enabled, scale values act as m00/m11 values of 2-by-2 rotation/scale matrix and are supplemented by two rotation values (for m01/m10). - Textures that fail to load don't cause the whole loading process to fail (thanks @Bersaelor for #117)
- Unit Tests: Sample model list is now part of GltfSampleSet objects and not loaded from text file anymore
- Removed shader compiler warnings for built-in shaders
- Removed compiler warnings in Unity 2020.1/2020.2
- Changes to materials (in custom shader GUI) are saved now
- Invalid matrix error. ValidTRS reports error in matrix data that does look correct (fixes #116)
- Removed potential memory leak warnings by allocating all buffers permanently (#115)
- Blend mode can be set in inspector for glTF materials via custom ShaderGUI (thanks @camnewnham for #89)
- Option to make all mesh data readable via
GLTFAST_KEEP_MESH_DATA
scripting define (alternative to #86) - Better support for URLs without file extension. glTF type (JSON or binary) is derived from HTTP Content-Type header, if present. (thanks @camnewnham for #87)
- Method
GltFast.LoadGltfBinary
to load .glb files from byte arrays is public now (#81)
- Switched internal URL type from
string
toUri
- Dependency on com.unity.mathematics was added (for matrix decomposition; see fix below)
- Unit tests updated to latest glTF-Sample-Models
- Absolute URI in external resources
- Special characters in URL (#79)
- Corner-case matrix decomposition errors (#99)
- Missing
Shader
results in error message instead of exception (#88)
- Updated KTX/Basis Texture Unity Package to 0.8.x
- The KTX specification changed (from ~draft20 to pr-draft2), thus older KTX files cannot be loaded anymore.
- Support for KTX specification 2.0 pr-draft2 (fixes #16)
- Support for Basis Universal UASTC supercompression mode (higher quality)
- Support for skinning
- Instantiation can now be customized via injection
- Complete refactor to allow more optimization by using Unity's new Mesh API (introduced in 2019.1)
- Required Unity version was raised to 2019.1 or newer
- Material generator (IMaterialGenerator) is now properly exposed and can be injected ( thanks @p-skakun for #80 )
- Reduced memory usage by uploading mesh data instantly and make it no longer readable
- Unlit shader now works with vertex colors
GltFast.LoadingDone
state property indicates if loading routine has finishedGltfAssetBase
, a minimum asset component for manual loading via scriptGetMaterial
interface, to retrieved imported materials by index.
- Added loading state sanity checks to instantiation
- Loading glTFs with materials only (no scene/geometry)
- Normal texture scale is applied correctly now
- Abstract interface
IDownloadProvider
let's users implement custom download behavior (useful for authentification or caching) - Added
CustomHeaderDownloadProvider
, a reference implementation that downloads glTF's files with custom HTTP headers
- Removed support for obsolete draft extensions
KHR_texture_cttf
andKHR_image_ktx2
- Correct (brighter) colors due to color-space conversion (conversion from linear to gamma before applying to material)
- Correct shading in linear color space projects due to correct (linear) sampling of normal, occlusion and metallic-roughness maps
- Memory leak: free up volatile array
imageFormats
- Support for Draco mesh compression is now optional (install DracoUnity package to enable it)
- Support for KTX2/Basis Universal textures is now optional (install KtxUnity package to enable it)
- Faster mesh creation due to using the advanced Mesh API on Unity 2019.3 and newer.
- Support for texture samplers' wrapping mode
- Support for texture samplers' filter modes (partial; see issue)
- Increased performance due to more balanced threading by making all C# Jobs parallel
- Refactored loading behavior
- Main loading class does not interfere with it's IDeferAgent anymore. It just follows its order.
GltfAsset
now has aloadOnStartup
flat to disable automatic loadingGltfAsset.onLoadComplete
now also returns itsGltfAsset
instance for convenience
- Redundant Load calls when using
UninterruptedDeferAgent
- Normals and tangents (if not present) are only calculated if the assigned material actually requires them.
- Experimental KTX / Basis Universal support was merged (off by default)
- Proper error handling invalid URL/path
- Improved glTF-binary URL extension detection
- Correct index order for line strip primitives (#59)
- Support for Universal Windows Platform (not verified/tested myself)
- Refactored GltFast class to control loading coroutine in an effort to make usage and future port to async easier.
- Optimization: Data loading is now based on accessors (rather than primitives). This reduces redundant loading jobs wherever accessors are used across primitives.
- Optimization: Primitives of a mesh, that share vertex attributes now become sub-meshes of one Unity Mesh. This reduces memory usage and creates less Renderers/GameObjects.
- glTF type (JSON or binary) is now auto-detected based on file name extension. Removed obsolete
GlbAsset
. This was done soGltfAsset
can be derived off more flexible.
- Support for quantized mesh data via
KHR_mesh_quantization
extension
- UV space conversion now happens per UV coordinate (not negatively scaled via texture tiling anymore). This helped to fix tangent calculation.
- glTF standard shaders now have a cull mode, allowing them to be double-sided. The now obsolete
Double
variants were removed (thanks to Ben Golus for support)
- Certified correct normal mapping by making normals, UVs and tangents consistent
- Double sided material fixes
- Shader compilation error on Vulkan/GLES3
- Support for texture transform (extension KHR_texture_transform)
- Support for double sided materials
- Support for data URI / embedded buffers and images
- Support for vertex colors in materials
- Support for implicit/undefined primitive indices
- Experimental support for primitive modes points, lines, line strip and line loop
- Using custom glTF shaders instead of Unity Standard shaders. This speeds up occlusion and roughness/metallic texture loading since they don't have to be converted at runtime anymore.
- Factor and texture (for metallic-roughness and specular-glossiness) are now multiplied as defined in spec.
- Unlit materials now support baseColorTexture and texture transforms
- glTF binary with Draco compression (decoding error due to invalid buffer view access)
- Legacy .NET speed regression
- Unity backwards compatibility (tested with 2018.2 with .NET 3.5)
- Removed job-less support
- The node or primitive GameObjects now have their mesh's name, if there is no node name provided
- Correct transforms and coordinate space. The glTF scene's root node is not scaled negative in any axis anymore
- Texture default wrap mode is repeat (not set to clamp anymore)
- Support for unlit materials (KHR_materials_unlit extension)
- Support for specular-glossiness type materials (KHR_materials_pbrSpecularGlossiness extension)
- Fixed broken assembly references by switching to non-GUID refs (thanks Stephen Gower for pointing it out)
- Metallic-Roughness texture not working. Now they are created only after their source was properly loaded.
- Draco mesh compression support
- Report unsupported glTF extensions and gracefully fail if a required extension is not supported.
- Tranformed Project into a Unity Package, which can easily be installed via Package Manager
0.3.0 - 2019-06-30
- Threaded glTF loading via Unity Job System
- Update to Unity 2019.1.7f1
- Formatted ChangeLog markdown file
0.2.0 - 2019-02-22
- Support for regular JSON glTFs (non-binary)
- First pre-release
- Support for meshes with more than 65k vertices.
- free up memory when destroying content
- Added support for interleaved vertex data
- added support for 3 component vertex colors (rgb without alpha)
- added support for uint16 vertex colors
- fixed metallic roughness texture usage (workaround)
- fixed occlusion texture usage (workaround)
- initial version