Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checking back in various bug fixes from internal branch and glb writi…
…ng logic (#253) * Merged PR 947085: Merging changes for loading from glTF branch into master - Reset master to be the same as the KhronosGroup github master branch - Sending out PR which are changes that are not committed yet to KhronosGroup master branch. Main new changes is ILoader implementation - Some of this code has been previously reviewed, such as the changes to GLTFSerialization * Merged PR 950991: Added StorageFolder support for file loading * Added coroutine helper in order to run Unity main thread tasks as async * Refactored ILoader to only load streams * Made ILoader async for UWP Related work items: #14071709 * Merged PR 999460: Fixed issue where extras and extensions would break parsing Fixed issue where extras and extensions would break parsing also comitting Json 9.0 changes * Merged PR 1014087: Adding GLTF merge feature and copy constructor for GLTFRoot [+] Added test that merges lantern and boombox together [+] Added test that verifies lengths and copying behaviour in serialization unit test [~] Added copy constructors to each GLTFProperty class [~] Added GLTFHelpers merge code which adds together two GLTF objects * Merged PR 1023531: fixes for copy and merge bugs fixes for copy and merge bugs * Min and max are optional parameters * Extensions used and extensions required were not initialized * Merged PR 1086143: Merging changes from Pisa back into internal glTF repo Merging changes from Pisa back into internal glTF repo * Merged PR 1096169: Adding unsigned int as a supported type Adding unsigned int as a supported type to GetUnsignedDiscreteElement * Merged PR 1097336: Fixed matrix on node to serialize as column major Fixed matrix on node to serialize as column major * Merged PR 1105269: refactor to remove unity-specific coordinate space conversion refactor to remove unity-specific coordinate space conversion * Merged PR 1112053: Refactored UnityGLTF to be able to have a Unity component and a file load component with the Unity component being based around coroutines Refactored UnityGLTF to be able to have a Unity component and a file load component with the Unity component being based around coroutines * Got project working in UWP * Separated out functions into multiple components for loading buffers vs loading images * Added coroutines to Unity loading to split loading up across frames Related work items: #14485947 * Merged PR 1134418: Updated standalone texture creation Updated standalone texture creation. * Merged PR 1162126: More fixes to transforms More fixes to transforms * Merged PR 1112053: Refactored UnityGLTF to be able to have a Unity component and a file load component with the Unity component being based around coroutines Refactored UnityGLTF to be able to have a Unity component and a file load component with the Unity component being based around coroutines * Got project working in UWP * Separated out functions into multiple components for loading buffers vs loading images * Added coroutines to Unity loading to split loading up across frames Related work items: #14485947 * Merged PR 1134418: Updated standalone texture creation Updated standalone texture creation. * Merged PR 1162126: More fixes to transforms More fixes to transforms * Updated GLTF * Reverted WebRequestLoader to use UnityWebRequest and ILoader interface for non UWP now uses ILoader * Merged PR 1241880: Made all API's use coroutines instead of async in UWP - Switched async functions to coroutine based - Added TaskExtensions to run async as coroutines * Merged PR 1242827: Merging glTF master into Pisa - Merged together glTF master and Pisa - Fixed bugs that popped up - Main merge problem was merging together the changes that happened to spec gloss * Merged PR 1243600: GLTFRoot now goes through extension clone There was a bug where any clone that depended on GLTFRoot could not be completed successfully. All clones now have GLTFRoot passed in. * Adding GLTF merge feature and copy constructor for GLTFRoot [+] Added test that merges lantern and boombox together [+] Added test that verifies lengths and copying behaviour in serialization unit test [~] Added copy constructors to each GLTFProperty class [~] Added GLTFHelpers merge code which adds together two GLTF objects * Min and max are now optional parameters * Extensions used and extensions required were not initialized * Deleting files that we do not want to keep Deleting Examples, UnityTestFramework, and Test files so that they are not included in Pisa * Merged PR 1326279: Modifying UnityGLTF Components to function with current version of Unity Modified some files to function properly with our current Pisa codebase In addition removed AsyncCoroutineHelpers from here and ported to Pisa * Merged PR 1328468: Fixing the TaskExtension check for proper unity support The .Net check only works for il2cpp. Swapping to use check for Unity Version so this works everywhere. * Merged PR 1344253: GLB Updates GLB Updates to GLTFSceneImporter [+] Allow delay-loading the GLB stream [~] Properly initialize the buffer if asking for a thumbnail before loading all textures [~] Sending all image loads through LoadUnityTexture so our Pisa version can check for dds regardless of source type * Merged PR 1353216: GLB serialization fix Fix serialization of images with buffer view references. * Merged PR 1373687: Merging github/master into pisa_dev * Merged PR 1385832: Merging initial glb builder work into pisa_dev. Can create a GLBObject from a GLB and resave it out with varying size JSON See https://microsoft.sharepoint.com/teams/wdg_wex/hxt/Shared%20Documents/Pisa/Dev/Dev%20Specs/Edit%20and%20Save%20as%20GLB%20One%20Pager.docx?web=1 for implementation details. See https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#glb-file-format-specification for GLB specification - Upgraded .NET version to 4.6 - Implemented ConstructFromStream and UpdateStream API's - Adds ability to create a GLB from a stream, and update the JSON of the GLB. Supports having two streams to same resource. -- Reallocation for JSON chunks is currently only a "growing" allocation and will always double. Max size is uint.maxvalue -- Known issue: having a file to copy that is larger than RAM will cause an OutOfMemoryException. This will be fixed in a future version of the API * Merged PR 1390761: Added functions to Add or Remove generic stream blobs to the GLB - Implemented AddBlob which appends a stream onto the end of GLB and updates the GLTFRoot with the updated BufferView and returns the new BufferView - Implemented BufferView RemoveBlob which removes a BufferView from GLTF and will shrink the buffer it is at the end * Merged PR 1395885: Buffers are now treated as uint32 Buffers are now treated as uint32 * Merged PR 1407945: Fixed issue where binary segment was not aligned properly Fixed issue where binary segment was not aligned properly * Merged PR 1412368: UInt script updates Updating a couple scripts for the Int > UInt changes. Also adding a null check to the GLBBuilder for the case where a GLB references a non-buffer-view image. * Merged PR 1413081: Merge pisa_dev to master - Made all methods synchronous. Callers can call them async - Reverted project to be .NET 3,5 - Added MergeGLB method to merge two GLB's together * Merged PR 1428200: Fix for issue where writing to incorrect buffer location Fix for issue where writing to incorrect buffer location * Merged PR 1441409: added ability to load color and emissive as sRGB added ability to load color and emissive as sRGB * Merged PR 1470088: Changed GLBBuilder namespace from UnityGLTF to GLTF Changed GLBBuilder namespace from UnityGLTF to GLTF * Merged PR 1471747: Created generic interface for glTF objects Created generic interface for glTF objects IGLTFObject represents an abstract GLTFObject that only has a root GLTFObject is to be used by glTF (up to calling library to wrap) GLBObject is produced by the GLBBuilder API's. * Merged PR 1472641: adding constructor for GLTFObject adding constructor for GLTFObject * Merged PR 1475126: reset position to properly parse JSON to GLB reset position to properly parse JSON to GLB * Merged PR 1531076: Fixed for GLBBuilder and to GLTFHelper that were found when building out GLB save functionality - Added more tests - Fixed bug where Root Merge would merge buffers - Fixed bug where extensions were not copied properly - Created the ability to construct from an empty stream - Added ability to add to a buffer without creating a buffer view * Merged PR 1527102: Modifications to GLTFSerialization projects to get them to compile in external solutions Modifications to GLTFSerialization projects to get them to compile in external solutions * Merged PR 1569575: parsing now only looks for two chunks parsing now only looks for two chunks * Merged PR 1569970: fix to ensure that we do not try to parse past stream end fix to ensure that we do not try to parse past stream end * Merged PR 1589667: Thumbnail index fix Correcting the CreateTexture function to pass the requested texture index/id to LoadImageBuffer instead of the image index/id. This happened to work before because we normally have a 1-to-1 relationship between textures and images, but when we don't this breaks the cache loading math. Bug 16500028 - [PC App] Most assets imported from Reinwood don't have thumbnails inside Woodinville's asset library * Merged PR 1609994: fixed issue with invariant culture in float parsing and tangents are now calculated fixed issue with invariant culture in float parsing and made it so that tangents and normals are calculated if not specified * Merged PR 1616105: making it so that tangents are always recalculated making it so that tangents are always recalculated. This is the only way that anything shows correct in Unity regardless of whether or not the initial asset has tangents. * Merged PR 1629903: gltf root can be explicity swapped gltf root can be explicity swapped * Merged PR 1659403: Changes to GLBBuilder to ensure that files without binary contents export properly and get updated correctly -If chunk info sections are not initialized, we now initialize them - Added test to verify files are written out properly Related work items: #16672277 * Merged PR 1692792: added copy constructor to GLBObject added copy constructor to GLBObject * Merged PR 1707450: Fixed null check that should be in ref counted cache data that was causing exception on asset clean up Fixed null check that should be in ref counted cache data that was causing exception on asset clean up * Merged PR 1746215: Recalculate tangents We need to recalculate tangents we're getting back from Simplygon * Merged PR 1775517: Changed Node Creation to not yield between Nodes and made it iterative - Added profiling - Made node creation iterative and stopped yielding * Merged PR 1780585: Fix for bug where if node parent was 0 it would not be set properly Fix for bug where if node parent was 0 it would not be set properly which caused scaling issue in the PC app Related work items: #17378069 * Merged PR 2026929: Invalid GLTF handling Adding a helper function for dropping invalid data from a gltf node (references to indexes that don't exist) and turning it on by default in the GLBBuilder. Related work items: #17520364 * Merged PR 2095998: Removed invariant culture as ToString() adds the culture info Removed invariant culture as ToString() adds the culture info This is giving the issue in locales like fr-FR when we try to render the asset in Perspective view in the Pisa PC App and this is happening due to the parsing in the InvariantCulture and ToString() localizes the value. Related work items: #18189854 * Merged PR 2104257: Fixed exceptions when serializing assets with the khr spec-gloss extension Fixed exceptions when serializing assets with the khr spec-gloss extension * Merged PR 2115866: Fixing some deserialization exceptions Fixed a few deserialization exceptions while testing with the sample assets from the GLTF sample assets repo * Merged PR 2302513: parent nodes no longer are set active automatically to prevent preappearing parent nodes no longer are set active automatically to prevent preappearing before compleition * fixed gltf root merge issue
- Loading branch information