Commit Graph

82 Commits (a43ac5b3fddf576de6d1425f0c2f339b98bf0bcd)

Author SHA1 Message Date
Mike Samsonov 5ce1cfedfe warning fix for gcc 2019-02-04 16:15:52 +00:00
Mike Samsonov 971ba308b3 Merged PR 2811682: buffer grow changes and large files support
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.
2019-02-04 15:16:28 +00:00
kimkulling a06133ab52 Update copyrights. 2019-01-30 09:41:39 +01:00
rickomax 35a044bda3 Various additions/fixes (FBX blend-shapes support added)
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.
2019-01-06 16:37:30 -02:00
Kim Kulling c1dc3901e7 fix more findings. 2018-12-28 11:17:27 +01:00
Andrés Iraolagoitía 3c1d6a3f87 Fix animations import in gltf2 2018-12-19 20:28:43 -03:00
Kim Kulling ae7a045396
Merge branch 'master' into timmmeh-gltf2-validation-patch 2018-12-11 07:59:11 +01:00
ardenpm fd75e4923c
Merge pull request #7 from migenius/migenius-rsws52
Add check for NULL texcoord values.
2018-12-07 09:38:41 +11:00
Paul Arden f63caf894e Add check for NULL texcoord values. 2018-12-06 12:56:02 +11:00
tirichards bb9e3c3593 Fix failed assimp validation for glTF2 sample animations 2018-12-05 14:46:56 -08:00
Kim Kulling ce91f5c888 Off-Importer: introduce unittest. 2018-12-03 21:24:06 +01:00
Luke Lau ccea70c61f Calculate the mMaxDuration property based off of keyframes 2018-11-27 11:49:00 +00:00
ruyo c30c4ae6e2 glTF2 importer multiple primitives and 16-bit index buffer skinmesh support. 2018-11-11 14:27:11 +09:00
haroonq d1af9526b1
Update glTF2Importer.cpp 2018-11-01 10:52:39 -07:00
haroonq e205399052
Update glTF2Importer.cpp 2018-11-01 09:01:19 -07:00
haroonq e5eb00d8d3
Update glTF2Importer.cpp 2018-10-29 14:53:33 -07:00
Haroon Qureshi bfe1dc2914 Merge branch 'glt2anim' of https://github.com/haroonq/assimp into glt2anim 2018-10-29 14:46:52 -07:00
Haroon Qureshi acad9a06e9 Add support for importing GLTF2 animations.
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.
2018-10-29 14:44:29 -07:00
Haroon Qureshi 57d3d71b6e Add support for importing GLTF2 animations.
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.
2018-10-26 15:39:28 -07:00
Minmin Gong 248f6c3aa1 Make gltf2's roughnessAsShininess matches between importer and exporter.
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.
2018-10-16 21:17:35 -07:00
Matthias Moulin c90eda983d
Fix: C4267 2018-10-06 16:31:58 +02:00
Alexandre Avenel 504e5fd5c5 Use unique_ptr for gltf2 textures 2018-09-24 21:28:53 +02:00
gstanlo 74e8200a49
Merge branch 'master' into master 2018-08-17 14:12:15 -07:00
gstanlo 82f3d40d60 Fixes crash when importing invalid glTF/2.0 files
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.
2018-08-17 13:49:01 -07:00
Alexandre Avenel 3c37fbdc6b Remove try catch(...) on gltf2 importer
Better to throw exception than hide it ?
2018-08-04 12:47:37 +02:00
Alexandre Avenel ae0f82d5b7 Fix #2077 : GLTF segfault using triangle strip 2018-08-04 12:47:37 +02:00
Kim Kulling a4533770f4
Merge branch 'master' into issue_2046 2018-07-14 19:25:07 +02:00
Sebastian Matusik 992194b1b9 Removed signed int vs unsigned int comparison in for loops 2018-07-05 15:15:50 +01:00
Sebastian Matusik 0cc9240886 Build fix 2018-07-05 14:46:15 +01:00
Sebastian Matusik 3e3a785750 glTF v2 importer morph targets support 2018-07-05 14:28:29 +01:00
Paul Arden e43e30b726 Slight rework for fix to issue #2046 to remove some duplicated code. 2018-07-05 09:49:08 +10:00
Paul Arden e7699ca585 Added support for non-indexed meshes in glTF importer. Addresses issue #2046. 2018-07-05 09:37:57 +10:00
gstanlo 97cecc858a Properly reads in glTF/2.0 sampler address modes.
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.
2018-05-24 17:25:26 -07:00
Stanlo Slasinski a1a17c1dda Read and write the KHR_materials_unlit glTF/2.0 extension. 2018-05-18 14:52:02 -07:00
kimkulling f2833539d7 closes https://github.com/assimp/assimp/issues/1784: change so.name to keep track of the minor version of the lib. 2018-04-19 08:52:21 +02:00
kimkulling da073f1270 closes https://github.com/assimp/assimp/issues/1893: fix mem leak in glft2Importer. 2018-04-11 17:22:31 +02:00
Kim Kulling b049933d2f update license dates. 2018-01-28 19:42:05 +01:00
Christian Meurin 925be5e983
Merge branch 'master' into master 2018-01-11 13:13:46 -08:00
Kim Kulling 88df886bcc
Merge branch 'master' into issue_1605 2018-01-11 11:39:14 +01:00
Christian Meurin 538bc95499
Merge branch 'master' into master 2018-01-10 20:10:54 -08:00
Axel Wefers 3e127bebff glTF 2.0: Import scale for normal textures and strength for occlusion textures
resolves #1693
2018-01-10 16:45:17 -08:00
Kim Kulling 936eb26dde
Merge branch 'master' into issue_1605 2018-01-11 00:54:35 +01:00
awefers bb71f2ba64
Merge branch 'master' into issue_1605 2018-01-10 12:04:41 -08:00
Kim Kulling 45d5f2eec8
Merge branch 'master' into issue_1691 2018-01-10 20:50:37 +01:00
Axel Wefers 901b981260 glTF: Always check signature
Always check signature for glTF 1.0 and glTF 2.0 files to select the correct importer. Fixes #1605
2018-01-09 09:37:57 -08:00
Axel Wefers dc79b572cf glTF 2.0: Assign default material to meshes with no material reference.
fixes  #1691
2018-01-08 14:57:55 -08:00
Axel Wefers 4235765856 glTF 2.0: Set camera "look at" to (0.0, 0.0, -1.0). 2018-01-08 14:19:30 -08:00
BuildTools 66171de915 Successful lib build, unit testing still WIP 2018-01-05 16:18:33 -08:00
Daniel Hritzkiv 98e98dc40c
Fix node names sharing same name
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
2017-11-29 12:20:44 -05:00
Kim Kulling 7a395e274f
Merge branch 'master' into fix/gltf2-transforms 2017-11-28 08:48:19 +01:00