Buffer grow changes:
The exporting of relatevely large data could take a few days, because reallocation of a buffer every time for a few new bytes is overkill. I've introduced standard capacity member for the buffer and growth it by 1.5 times every time. That helps a lot, descrease exporting to a minute (from a few days).
Large file support:
glTF is a json file, all lengths and offsets don't have a type, just numbers, but code was always reading it as uint32, this doesn't work for files bigger than int32 (almost all files we have as an example). So, I've changed it to be reading as size_t. Specification doesn't specify the type for it, so it's not against spec.
Added animMesh name assignment at ColladaLoader
Fixed animMesh post-processing on ConvertToLhProcess (blend-shapes weren't being affected by post-processing)
Added WindowsStore define. This is used to change some incompatible WinRT methods
Added FBX blend-shapes and blend-shapes animations support
Added Maya FBX specific texture slots parsing
Added extra FBX metadata parsing
Added GLTF2 vertex color parsing
Fixed IFC-Loader zip-buffer reading rountine
Fixed OBJ file parsing line-breaker bug
Fixed IOStreamBuffer cache over-read bug
Added mName field to aiAnimMesh
Reverted EmissiveFactor, TransparencyFactor and SpecularFactor assignment on FBXConverter. Really, the commit #817 breaks a lot of old code.
Refactors the glTF2 internal classes to more closely reflect the structure
of the actual GLTF2 file format. Adds implementations for reading skins
and animations from GLTF2 files into those structures.
Also provides implementations for converting skins and animations from GLTF
into assimp data structures. Special handling is required for bone weights
since assimp stores vertex-weights-per-bone whereas GLTF2 stores
bone-weights-per-vertex. Only supports keyframed LINEAR animation data;
STEP and CUBICSPLINE is not currently supported.
Refactors the glTF2 internal classes to more closely reflect the structure
of the actual GLTF2 file format. Adds implementations for reading skins
and animations from GLTF2 files into those structures.
Also provides implementations for converting skins and animations from GLTF
into assimp data structures. Special handling is required for bone weights
since assimp stores vertex-weights-per-bone whereas GLTF2 stores
bone-weights-per-vertex. Only supports keyframed LINEAR animation data;
STEP and CUBICSPLINE is not currently supported.
In glTF2Exporter, roughnessFactor = 1 - normalizedShininess = 1 - someFunc(sqrt(shininess / 1000)). But in gltf2Importer, roughnessAsShininess = (1 - roughnessFactor) * 1000. No sqr there. So if save a shininess to a gltf2 and load it back, the value changed. This fix add a square to importer to make sure the consistency.
Skips some glTF/2.0 uv processing if the count of uvs in the attribute stream doesn't match the vertex count.
This happens with some malformed glTF/2.0 files, and the change will allow them to be processed properly.
Without the change, an access violation will occur several lines below if uv count is less than the position count.
Assimp was returning glTF/2.0 values as address modes instead of aiTextureMapModes.
Also modified text glTF/2.0 model's sampler uv address modes to mirror/clamp respectively, and tests for them in the unit test.
Uses node name if it is set, and globally unique id otherwise.
This may still break in some models (glTF2 spec doesn’t guaruntee name values to be unique). However, I couldn’t cause it to break any further using gltf2 models on hand.
Closes#1600