Commit Graph

236 Commits

Author SHA1 Message Date
Kim Kulling
45898eee55 Refactorings: glTF cleanups (#6028) 2025-03-05 21:37:47 +01:00
Julian Knodt
e722420907 [FBX] Allow export multi materials per node (#5888)
* [FBX] Allow export multi materials per node

Previously it was assumed that each node would export a single material. This removes that
assumption, and also allows for exporting multiple meshes with a single node. Previously they
would each be seprated into their own node.

* Support for animations with multiple meshes too

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-01-14 11:37:16 +01:00
Kim Kulling
5fa7b8ceb9 Bugfix/cosmetic code cleanup (#5947)
* Refactorings: Code cleanups

* More cosmetic changes

---------

Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-01-07 23:32:50 +01:00
Julian Knodt
ff61095928 Blendshape export float & same # verts (#5775)
Previously it was possible that the number of vertices between the mesh and morph mesh varied.
This may have caused problems in tools like Blender, and this ensures there's a 1-1
correspondence between vertices.

In addition, exporting doubles broke meshlab on import, so now it exports floats.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-02 23:04:44 +01:00
Steve M
ce0a50ec21 Fix FBX animation bug introduced with 24 Mar 2020 commit 14b8d12 (revert conditional to prior state) (#5815)
Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
2024-10-14 11:24:27 +02:00
Steve M
cb4e663138 Restore 4x4 matrix functionn param and assignment prior to change in commit 168ae22 of 27 Oct 2019 (#5813)
Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
2024-10-12 12:49:10 +02:00
Julian Knodt
17399d198f FBX Blendshapes: Do not require normals (#5776)
Some blendshapes don't have normal transformations, but Assimp currently requires that normals
be present. This removes that, and won't populate the normal field.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-09-24 08:07:18 +02:00
Lux
f81ea6986c Restored absolute transform calculation due to https://github.com/assimp/assimp/pull/5349 which requires this now. (#5751) 2024-09-11 10:11:15 +02:00
RichardTea
ed3fccd5db Add option to ignore FBX custom axes (#5754)
AI_CONFIG_IMPORT_FBX_IGNORE_UP_DIRECTION
Default false

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-09-05 21:03:26 +02:00
RichardTea
c1ffbfec06 Zero-length mChildren arrays should be nullptr (#5749)
- Children: Don't allocate a zero-length array
- aiNode::mChildren should be left nullptr instead.
2024-09-03 10:26:27 +02:00
Haixi
389bdedda7 FBX: add metadata as properties (#5675)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-08-29 21:38:34 +02:00
Sanchikuuus
12ed0286e4 Added more Maya materials (#5101)
* Added more Maya materials

Added Maya materials to list and add setting texture properties for getting lost textures to mesh

* Update utMaterialSystem.cpp

Now new enumerators are handled by a case label in utMaterialSystem.cpp

* Update material.h

- Fix tests: use the correct max material parameter

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-08-24 11:29:47 +02:00
Kimbatt
48c3a0ec46 FBX exporter - handle multiple vertex color channels (#5695)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-08-07 22:43:02 +02:00
Julian Knodt
d0703a5a3a Fix exporting incorrect bone order (#5435)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-06-28 12:58:09 +02:00
Kim Kulling
cdf8394ccc Fix nullptr dereferencing (#5638)
- closes https://github.com/assimp/assimp/issues/5617
2024-06-25 00:05:31 +02:00
ycn2022
0afd366dcb Update FBXMeshGeometry.cpp (#5624)
Some FBXs do not have "Materials" information, which can cause parsing errors

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-06-20 21:26:04 +02:00
Kim Kulling
a51500ba2b Draft: Update init of aiString (#5623)
* Draft: Update init of aiString

- closes https://github.com/assimp/assimp/issues/5622

* Update types.h

* Fix typo

* Fix another typo

* Adapt usage of AI_MAXLEN

* Fix compare operator

* Add missing renames
2024-06-17 13:12:54 +02:00
Kim Kulling
942518a4ff Remove deprecated c++11 warnings (#5576) 2024-05-15 10:22:03 +02:00
Kristjan Skutta
feb861f17b Fix duplicate degrees to radians conversion in fbx importer. (#5427)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-03-22 00:01:57 +01:00
Kim Kulling
fcb1444b84 Add correction of fbx model rotation (#5494) 2024-03-17 17:46:28 +01:00
sSsA01
f95050e7aa Append a setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY". (#5450)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-02-27 20:26:13 +01:00
Kim Kulling
01231d0e60 Add 2024 to copyright infos (#5475) 2024-02-23 22:30:05 +01:00
Kim Kulling
4d6dd80257 Add correct double zero check (#5471)
* Add correct double zero check

* Use std::fpclassify
2024-02-22 13:58:25 +01:00
Julian Knodt
c877a15140 Blendshape->Geometry in FBX Export (#5419)
When loading a mesh exported from assimp into Blender, it warns that it has an incorrect class.
While debugging, I traced it back to this being `Blendshape` where `Geometry` was expected. This
is likely because this node describes a `Geometry`, which is used as a blendshape. I'm not sure
if any other DCC tools or places to import it expect `Blendshape` instead (i.e. was this code
ever tested?), but it fixes its use in Blender.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-02-05 16:55:00 +01:00
julianknodt
bdc08dd4a9 Encode full weight as double 2024-01-27 10:10:28 +01:00
Stephen Gold
213d73ebc6 correct grammar/typographic errors in comments (8 files) 2023-12-04 23:58:54 +01:00
Stephen Gold
769e82ce5e FBXMeshGeometry: solve issue #5116 using patch provided by darktjm 2023-12-04 20:57:10 +01:00
Maksim Kostin
d311fa95c6 Fix double free in Video::~Video() 2023-12-01 11:14:22 +01:00
Maksim Kostin
f701d702e4 Fix buffer overflow in FBX::Util::DecodeBase64() 2023-11-29 11:12:39 +01:00
IOhannes m zmölnig
6f715edfa0 Drop disabled zlib.h inclusion stubs 2023-11-29 09:53:03 +01:00
Kim Kulling
85f64c9131 Use correct time scaling 2023-11-28 21:10:18 +01:00
Kim Kulling
01f2549abe Fix the build 2023-11-28 20:49:10 +01:00
Kim Kulling
384db8686e Update FBXConverter.cpp
- Temporary fix bind pose storage in offset matrix
- Will close https://github.com/assimp/assimp/issues/5132
2023-11-28 20:49:10 +01:00
Florian Born
6004290dde Use the correct allocator for deleting objects in case of duplicate animation Ids 2023-11-16 10:02:16 +01:00
Kim Kulling
8cf2d6e588 Refactoring: Some cleanups 2023-11-12 21:09:33 +01:00
Kim Kulling
0b0ec713f6 Fix empty mesh handling 2023-11-10 15:36:40 +01:00
julianknodt
28ab0a094a Fix incorrect deg->radian conversion
It seems that rotation matrices later expect radians.
This conversion breaks it, and was validated on the conversion of
`cesium_man.glb` --> `cesium_man.fbx`
2023-11-07 20:06:16 +01:00
Kim Kulling
108e3192a2 Update FBXBinaryTokenizer.cpp
- closes https://github.com/assimp/assimp/issues/5072
2023-11-05 17:57:29 +01:00
Kawashima Satoshi
666ecd3f1f Bug Fix:
Failed to get floating values (e.g. opacity) from scene material when ASSIMP_DOUBLE_PRECISION is defined, so they are not reflected to output fbx file.
2023-10-08 15:21:26 +00:00
Alex
5c45cdc0ad Fix Invalid-free in Assimp::FBX::Scope::Scope 2023-08-16 07:45:23 +00:00
Gargaj
49ed0711d1 Fix another warning 2023-08-05 15:43:31 +02:00
Gargaj
8312b31d27 fix warning-as-error 2023-08-05 15:39:47 +02:00
sfjohnston
dd40b0ccee Changed #define FBX_FOV_UNKNOWN to const float kFovUnknown 2023-07-23 12:05:01 -07:00
Scott Johnston
aab3c8010c Correct from full FOV to assimp half-fov in camera. Compute from filmWidth and focalLength if FOV not specified. 2023-06-15 12:16:06 -07:00
Kim Kulling
aed43878ef Merge branch 'master' into FlorianBorn71-SmallAllocationFixInFBXLoader 2023-05-15 14:28:46 +02:00
Kim Kulling
121f09b62a Fix: Fix the build. 2023-05-15 11:02:58 +02:00
Kim Kulling
e627f691a8 Merge branch 'SmallAllocationFixInFBXLoader' of https://github.com/FlorianBorn71/assimp into FlorianBorn71-SmallAllocationFixInFBXLoader 2023-05-15 09:30:57 +02:00
Jackie9527
a8e7c23605 Fix warning related to unreachable-code.
Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com>
2023-04-29 00:29:33 +08:00
Kim Kulling
230bee2e34 Merge branch 'master' into msvc-clang-missing-variable-declarations 2023-04-26 11:15:32 +02:00
Kim Kulling
1ecb8e9196 Merge branch 'master' into msvc-clang-missing-noreturn 2023-04-25 23:56:39 +02:00