Commit Graph

68 Commits (36bce5fa006176b623ea2bc4756cc54b50d9fc38)

Author SHA1 Message Date
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
Kim Kulling 47e3301c47
Update glTF2Asset.inl
Remove my nonsense, sorry!
2018-11-27 23:22:09 +01:00
Kim Kulling 657014dff6
Update glTF2Asset.inl
Fix possible nullptr-dereferencing.
2018-11-27 20:18:00 +01:00
Luke Lau 0bb672c6fa Fix scenes not always being loaded 2018-11-27 11:45:53 +00: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
ardenpm 586c812eee
Merge pull request #5 from assimp/master
Merge commits from head master.
2018-09-26 15:44:41 +10:00
Alexandre Avenel 504e5fd5c5 Use unique_ptr for gltf2 textures 2018-09-24 21:28:53 +02:00
Paul Arden 7911faf130 Fixed problem getting glTF 2.0 camera type, fixes #2138. 2018-09-13 16:04:04 +10:00
Sebastian Matusik 3e3a785750 glTF v2 importer morph targets support 2018-07-05 14:28:29 +01:00
gstanlo 0c07397720 glTF/2.0: Pick scene zero as scene to recursively load if no "scene" property is specified. 2018-05-22 17:32:12 -07:00
Stanlo Slasinski a1a17c1dda Read and write the KHR_materials_unlit glTF/2.0 extension. 2018-05-18 14:52:02 -07:00
Kim Kulling dd7d0943f6
Update glTF2Asset.inl
Move creation of vars to avoid useless creation in case of an error.
2018-04-26 14:24:00 +02:00
wuxiaoqian f6af6ded1f fixed the bug of export gltf2, the JOINTS_0 componentType is Incorrect 2018-04-26 11:03:50 +08:00
wuxiaoqian 6b4caa0f12 fix export gltf2, The JOINTS_0 componentType is incorrect 2018-04-26 10:56:56 +08:00
Marco Di Benedetto 72e9f3ecb9 fixed embedded texture reading. 2018-02-24 18:47:43 +01:00
Marco Di Benedetto 4b7cd97fea added support for embedded textures defined with buffer views. 2018-02-24 17:44:40 +01:00
Kim Kulling b049933d2f update license dates. 2018-01-28 19:42:05 +01:00
Kim Kulling 8b9b770f9f
Merge branch 'master' into gltf2-fixes 2018-01-16 21:50:48 +01:00
Alexis Breust 0f4189c77e Forced 4-bits alignment for glTF buffers 2018-01-16 09:26:18 +01:00
BuildTools 66171de915 Successful lib build, unit testing still WIP 2018-01-05 16:18:33 -08:00
awefers 0031165789
Add support for tangents in glTF2.0 import
Closes #1562
2017-11-27 13:45:40 -05:00
Kim Kulling 623b5a515a
Merge branch 'master' into fix-typo-gltf 2017-11-25 20:11:49 +01:00
Alexandre Avenel eb452b28a2 Fix warning on MSVC14 2017-11-25 11:38:12 +01:00
Alexandre Avenel c63263b025 Fix typo on gltf2 camera parameters 2017-11-24 22:02:47 +01:00
Patrick Dähne a05d74a281 [glTF2] Moved byteStride from accessor to bufferView 2017-11-20 19:01:28 +01:00
Patrick Dähne 6cbfd5b977 [glTF2] Implemented reading binary glTF2 (glb) files 2017-11-20 14:59:05 +01:00
Kim Kulling 07a99e0843
Merge branch 'master' into issue_1513 2017-11-16 17:32:34 +01:00
Kim Kulling 7db10022e9 closes https://github.com/assimp/assimp/issues/1513: fix assimp for cross compile for android 2017-11-15 21:26:25 +01:00
Turo Lamminen f470b8466f GLTF2: Fix signed/unsigned warning 2017-11-15 11:45:21 +02:00
Kim Kulling de1ec4ee5d
Merge branch 'master' into gltf2-mesh-export-fix 2017-11-10 19:07:46 +01:00
Daniel Hritzkiv 9ec117d0bc
Fix export of deleted meshes; Add LazyDict::Remove method
When I was merging a node’s multiple meshes into that node’s first mesh’s primitives, I was deleting the merged meshes from the node.

However, I wasn’t deleting the merged meshes from the mAsset->meshes Dict, causing the gltf2 export to contain extra unreferenced meshes and duplicate primitives.

This new code adds a new method to LazyDict, which removes the object from it, taking care to update indexes of the subsequent objects. This change also requires that `Ref`s of `Mesh`es (stored in node->meshes) have their indexes updated.
2017-11-08 18:31:32 -05:00
Thomas Lemaire 5b76a31485 fix trivial warnings
mainly unused parameter and unused function
some parameters are indeed used in a debug built, I used the
(void)(param) trick
warnings reported by clang 4
2017-11-02 11:13:52 +01:00
Jared Mulconry 326158633b Fixed warnings on MSVC caused by implicit conversions from double to float. 2017-10-06 18:23:28 +03:00
Kim Kulling c1f93a69ae Revert "WIP: Enable Travis clang build" 2017-10-06 15:42:05 +02:00
Jared Mulconry 3803a5181c Fixed warnings on MSVC caused by implicit conversions from double to float. 2017-10-06 20:32:33 +11:00
Jared Mulconry 5804667dbb Addressed some mismatched news/deletes caused by the new glTF2 sources. 2017-10-02 11:04:15 +03:00
Turo Lamminen 1095ec454b Fix delete / delete[] mismatches in glTF2 importer 2017-10-02 10:55:26 +03:00
Josh Faust febd611d48 Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars 2017-09-27 18:41:35 -07:00
Daniel Hritzkiv 814e8b3f8e
Formatting 2017-09-18 11:16:05 -04:00
Daniel Hritzkiv 5147acfe65
Revert "store node mesh vs. meshes"
This reverts commit a0d97505e5.
2017-09-18 11:16:04 -04:00
Daniel Hritzkiv 816e6909ca
Remove KHR_binary_glTF code
Binary glTF is now part of the glTF2 spec. However, it’s implemented incorrectly, so will be temporarily removed
2017-09-11 11:02:16 -04:00
Daniel Hritzkiv 5cb13aa4b3
Load gltf .bin files from correct directory 2017-09-11 11:02:15 -04:00
Daniel Hritzkiv a438ece655
Remove premultipliedAlpha from gltf2 2017-09-11 11:02:15 -04:00
John Senneker 140b903d7a
Fix parsing of glTF version
Handle version as int in gltf
Fix format specifiers in glTF version parser
2017-09-11 11:02:15 -04:00
Daniel Hritzkiv 44757af34a
Implement pbrSpecularGlossiness property as Nullable 2017-09-11 11:02:13 -04:00
Daniel Hritzkiv 03cfa04ee4
Define default material values as static constants
for reuse
2017-09-11 11:02:13 -04:00
Daniel Hritzkiv 1a5823700f
Remove need for Has by returning an empty Ref in Get 2017-09-11 11:02:13 -04:00
Daniel Hritzkiv 21259e0835
Use different form of index accessor 2017-09-11 11:02:13 -04:00
Daniel Hritzkiv a9c4fa84b5
Sampler improvements; Add new LazyDict method
Samplers are now imported into assimp internal format from textures;
Samplers have defaults as per spec;
Sampler enums are strongly typed with UNSET values;
Samplers are exported properly;
Sampler filters are exported as well;
Samplers are re-used across textures on export
Default sampler values are not written
2017-09-11 11:02:12 -04:00