Commit Graph

240 Commits (819d9f72574fa5f0b90aae442d8270dec64bc4b6)

Author SHA1 Message Date
Kim Kulling b38b65ff49
Add const 2021-06-24 17:03:00 +02:00
Kim Kulling 012ce30577
Merge branch 'master' into zero 2021-06-24 17:00:43 +02:00
Kim Kulling d18d838812
Fix formatting 2021-06-24 16:18:11 +02:00
Aaron Gokaslan 8e3a159141
Merge branch 'master' into clang-tidy-perf-fixes 2021-06-23 10:10:28 -04:00
Evangel63 e736538df3
Merge branch 'master' into master 2021-06-23 13:45:23 +10:00
Kim Kulling 760953c834
Merge branch 'master' into clean_gltf_pbr_brdf 2021-06-22 20:10:03 +02:00
Aaron Gokaslan 94c3abd841 Apply various performance fixes from clang-tidy 2021-06-22 12:27:15 -04:00
Hill Ma 148b8c66a8 glTF2: zero out extra space created by padding.
This makes resulting GLB deterministic.
2021-06-15 15:18:20 -07:00
RichardTea f412595887 Fix typo
Thank you clang!
2021-06-14 15:11:41 +01:00
RichardTea 985f3ee665 Fix glTFv2 texcoord/uv mapping
Use the standard property to indicate the UV map index
2021-06-14 15:11:41 +01:00
RichardTea fb039bb9eb Add glTFv2 Clearcoat import/export tests
Uses Clearcoat model from Khronos
2021-06-14 15:11:41 +01:00
RichardTea 4a66ec25d0 Standardise Clearcoat, Sheen and Transmission
Also cleanup glTFv2 defaults, don't import/export if disabled
2021-06-14 15:11:41 +01:00
RichardTea 4476352882 First pass at simplifying glTFv2 PBR
Removed 'core' set of GLTF-specific properties
2021-06-14 15:11:41 +01:00
Evangel 3de20af3cc Renamed glTF2::Object::extensions to customExtensions to avoid shadowing in other subclasses. 2021-06-12 13:16:53 +10:00
Evangel a7a30baf27 Renamed local variable to avoid shadowing member variable. 2021-06-12 13:08:14 +10:00
Evangel 7f0efa0866 Added ReadExtensions to glTF2::Object, so all objects now have their extensions read.
Importer is the only place that needs to be modified to make them available on the Assimp side now.
2021-06-12 12:50:44 +10:00
Evangel 5be2330fbb Added CustomExtension to glTF2::Object so that all subclasses have it instead of doing it piecemeal. 2021-06-12 12:20:40 +10:00
Evangel 6d413444b5 Merge branch 'master' of https://github.com/Evangel63/assimp 2021-06-12 11:46:20 +10:00
Evangel 36c8cdf3de Add scene metadata for glTF2 files as allowed by the glTF2 specification. 2021-06-12 11:44:28 +10:00
Hill Ma ef739c1703 glTF2: Make handling of embedded textures safer.
Previous code does not check whether the embedded texture exists.
2021-06-08 12:53:18 -07:00
Kim Kulling d33cf1dc0c
Merge branch 'master' into x3d_pugi_migration 2021-06-06 16:06:08 +02:00
Kim Kulling 70cc1630fa
Merge branch 'master' into fix-gcc4.9-compilation 2021-05-27 15:25:01 +02:00
Kim Kulling 6b8a00dfa1
Merge branch 'master' into wangyi_basisu 2021-05-25 17:17:07 +02:00
Kim Kulling b5e54e4d3b
Merge branch 'master' into wangyi_basisu 2021-05-25 16:17:29 +02:00
Kim Kulling faeae27923
Merge branch 'master' into importer_fixes_followup 2021-05-25 16:15:09 +02:00
Jean-François Verdon b7b3c6db7e Fixing GCC 4.9 compilation issues 2021-05-22 16:57:07 +02:00
Malcolm Tyrrell 4ec01cfdcd Improve use of logging 2021-05-13 12:05:31 +01:00
Malcolm Tyrrell 5cd3bdd5c2 No need to distinguish formatting log functions. 2021-05-13 10:25:27 +01:00
ywang a19b708144 support both ktx and ktx2 2021-05-07 16:27:23 -07:00
ywang 2b9d88c943 support basis universal 2021-05-06 15:10:06 -07:00
Kim Kulling 350f2ea1d3 Fix build and merged master. 2021-05-06 21:36:25 +02:00
Kim Kulling 52228a93f8 Fix X3DGeohelper. 2021-05-06 21:07:38 +02:00
Max Vollmer (Microsoft Havok) 153b890b02 Prevent accessing nullpointers 2021-05-05 14:09:43 +01:00
Kim Kulling 0b92abe9b4
Merge branch 'master' into empty-string-style 2021-04-30 00:54:57 +02:00
Max Vollmer (Microsoft Havok) e1d6e1f377
Merge branch 'master' into ms-maxvollmer/importer_fixes 2021-04-26 14:53:32 +01:00
Max Vollmer (Microsoft Havok) 746d5cf964 * Throw instead of assert on invalid file input
* Check JSON object type before accessing members
* Ensure samplers input and output references are set before accessing them
2021-04-21 16:17:03 +01:00
Krishty f761dc72f4 style fix - initializing and assigning empty std::string properly
std::string s(""); s = ""; calls the copy constructor, which in turn calls strlen(), … assigning a default-constructed string generates fewer instructions and is therefore preferred.

With C++11 uniform initialization, you’d simply write s = { } instead.
2021-04-16 23:43:56 +02:00
Krishty 6cbeca5518 fixed glTF export stuff being pulled into the EXE even if building with ASSIMP_BUILD_NO_EXPORT
“LazyDictBase::WriteObjects()” in the two glTF implementations is only used for export. Since it’s a virtual method, and many compilers have trouble removing unreferenced virtual methods, glTF export stuff is pulled into the binary even if compiling without exports.

This commit removes said virtual function if only compiling for import.

This removes 75 KiB of useless code when compiled with Visual Studio for x64.
2021-04-16 20:44:40 +02:00
Hill Ma 4aa52b3af8 Flip the check on _MSC_VER for using TR1 containers. 2021-04-13 11:15:52 -07:00
Clement JACOB e66232d8c3
Merge branch 'master' into feature/gltf_fb_ngon_encoding 2021-04-07 13:54:31 +02:00
Clement Jacob 596001c89c Refactoring the extension 2021-03-30 09:10:50 +02:00
Clement Jacob 8e589221d7 [gltf2-exporter] Adding FB_ngon_encoding support 2021-03-30 09:10:50 +02:00
Malcolm Tyrrell d94ddd32b1 Extra check. Better logging. 2021-03-24 11:04:39 +00:00
Malcolm Tyrrell add165c4a1 Check target sizes to avoid reading beyond allocation 2021-03-24 10:55:40 +00:00
Kim Kulling 5f652feb75
Merge branch 'master' into MalcolmTyrrell/gltfCrashes 2021-03-19 13:35:13 +01:00
Hill Ma 3e99385f44 Fix a memory leak in glTF2.
The destructor of LazyDict uses `delete` but `delete` was not used for objects removed by LazyDict::Remove.
2021-03-17 15:12:54 -07:00
Malcolm Tyrrell 3503252e12 Strict check for accessor "count" 2021-03-16 11:47:19 +00:00
Malcolm Tyrrell e4983aa16e Fix code issue 2021-03-15 16:46:41 +00:00
Malcolm Tyrrell 57652a9084 Version is strictly a string 2021-03-15 16:27:50 +00:00
Malcolm Tyrrell 053c0f5e0a Catch type errors in gltf and try to print out useful context. 2021-03-15 13:06:11 +00:00
Kim Kulling 806b12dc8b
Merge branch 'master' into issue_3678 2021-03-10 19:51:04 +01:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
Kim Kulling 75210576cf
Merge branch 'master' into sparse_minmax 2021-03-01 21:34:24 +01:00
Kim Kulling c669c8f1eb
Merge branch 'master' into update_copyrights 2021-02-28 12:18:41 +01:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Max Vollmer (Microsoft Havok) eef03c1f17 Improved warnings 2021-02-24 14:28:18 +00:00
Max Vollmer (Microsoft Havok) facb7da701 Check that normal count and tangent count matches vertex count. Ignore data and warn if counts don't match. 2021-02-24 14:19:29 +00:00
thomasbiang 5429475339
Merge branch 'master' into sparse_minmax 2021-02-23 12:30:53 -08:00
Kim Kulling 247fd0ce17
Merge branch 'master' into FixAnimName 2021-02-22 20:38:16 +01:00
Kim Kulling 6094da3493
Update glTF2Asset.inl 2021-02-18 09:32:37 +01:00
Minmin Gong d57b78bc98 Export the animation name to gltf2 2021-02-16 20:22:08 -08:00
Kim Kulling 888415246e
Merge branch 'master' into issue_2195_draco 2021-02-08 11:52:54 +01:00
ywang 9bab475302 export min max for sparse accessor 2021-02-03 15:05:58 -08:00
ywang 793bd44cee fix issue: 3482: invalid gltf2 properties 2021-02-02 13:19:57 -08:00
Kim Kulling 5fbbba2fac
Merge branch 'master' into issue_2195_draco 2021-01-31 16:02:57 +01:00
RichardTea 48bcbbefdd use nullptr and float constants 2021-01-27 10:56:57 +00:00
RichardTea 150514fc8b Move draco warning suppression
Should be around the include for portability, not template instantiation
Fix clang pragma typos
2021-01-27 10:42:28 +00:00
RichardTea 6ec32b6b78 Apply clangformat 2021-01-27 09:55:03 +00:00
RichardTea c6fd1ce996 glTF2 Minor cleanup 2021-01-27 09:42:49 +00:00
RichardTea 5b9d06c2fc Disable draco clang/gcc warnings via pragma
draco templated functions also throw warnings
2021-01-27 09:19:35 +00:00
RichardTea d79e0c0ba9 Avoid std::make_unique
Assimp is still C++11
2021-01-26 17:33:10 +00:00
RichardTea c917e6513f
Merge branch 'master' into issue_2195_draco 2021-01-26 16:43:46 +00:00
RichardTea f39ba8ddb2 Add compile error for bad error draco config
KHR_draco_mesh_compression requires
DRACO_MESH_COMPRESSION_SUPPORTED
2021-01-26 16:24:18 +00:00
RichardTea dde7605158 Implement draco decoding 2021-01-26 16:08:12 +00:00
thomasbiang 91dc904ed1
Merge branch 'master' into master 2021-01-22 13:25:31 -08:00
Kim Kulling 2bcf08370d
Merge branch 'master' into fix-gltf-vertex-colors 2021-01-21 11:54:02 +01:00
thomasbiang d7cf7847ba
Merge branch 'master' into master 2021-01-20 18:47:39 -08:00
ywang 01e61c8b9f customized node transformation format 2021-01-20 18:42:56 -08:00
Maki 6d13fd6aa2 Fix glTF vertex colors with types other than float 2021-01-15 02:56:45 +00:00
Max Vollmer d49aed4585 * Check that buffer view has buffer
* Handle integer overflow when calculating byte length
* Minor code cleanup for exception messages
2021-01-11 08:45:47 +00:00
Danny-Kint 07aace0fdd
Merge branch 'master' into dev/gltf-KHR_materials 2020-12-31 07:08:31 +01:00
Danny-Kint 07b59f539d
Merge branch 'master' into dev/gltf-KHR_materials 2020-12-28 08:48:54 +01:00
Maki ca653e0c6a Fix glTF from memory loading .bin with a custom IOHandler 2020-12-28 07:18:50 +00:00
Kim Kulling 3f5238d7c1
Merge branch 'master' into gltf2_fixes 2020-12-24 16:48:36 +01:00
Danny-Kint dbffe25c9d
Merge branch 'master' into dev/gltf-KHR_materials 2020-12-23 11:33:04 +01:00
Danny Kabrane 383c97e380 Add KHR_materials_transmission during export 2020-12-23 10:43:21 +01:00
Danny Kabrane 2b097c1e73 Add KHR_materials_transmission during import 2020-12-23 10:43:01 +01:00
Danny Kabrane 197bf1e617 Add KHR_materials_clearcoat during export 2020-12-23 09:56:15 +01:00
Danny Kabrane f8c63d874b support KHR_materials_clearcoat during import 2020-12-23 08:12:09 +01:00
Danny Kabrane aa9d6ce7b7 add support for khr_materials_sheen during export 2020-12-21 14:34:16 +01:00
Danny Kabrane 0fdda99ea1 add underscore (MATERIAL_SHEEN instead of MATERIALSHEEN) 2020-12-21 14:33:35 +01:00
Danny Kabrane 63b0a97369 import KHR_materials_sheen 2020-12-20 07:59:12 +01:00
Max Vollmer a15adc9fbc Fixed copypaste error 2020-12-14 17:01:42 +00:00
Max Vollmer 1db51503d8 Throw instead of assert on invalid file input 2020-12-14 16:44:56 +00:00
Max Vollmer 5436e16802 * Fix memory leak in GLTF2 Importer that occurs when an exception gets thrown while constructing a scene
* Fix crash in GLTF2 Importer when a scene with dangling/uninitialized pointers gets deleted after an exception was thrown
* Fix crash in GLTF2 Importer when channel sampler is not set (negative index)
2020-12-14 16:37:02 +00:00
Jean-Louis Boudrand d18fce3f06 Fix https://github.com/assimp/assimp/issues/3054
Corrected the animation of each bone of an animation were exported in different animations (+tabs fixes)
2020-12-13 17:02:50 +01:00
Jean-Louis Boudrand 8701a86c9d Fixed a crash of the Gltf 2 exporter in the case of an animation without a translation, rotation or scale animation key. 2020-12-10 23:47:54 +01:00
Kim Kulling 816bbc852c
Merge branch 'master' into master 2020-12-08 19:54:04 +01:00
FRICOTEAUX b47c5c8c27 glTF2Exporter: fix crash when exporting a scene with several meshes per node (regression coming from commit e8d2b84 on 08/03/2020 "clean all warnings for vs-2019") 2020-11-30 20:11:41 +01:00
Max Vollmer 7d72c78c8e Some improvements 2020-11-30 15:20:51 +00:00