Commit Graph

286 Commits

Author SHA1 Message Date
Alexandre Avenel
6401aa9744 Add unit test for subdivision modifier on Blender importer (#5345)
* Add unit test for subdivision modifier on Blender importer

Blend file is composed of default cube with subdivision modifier applied
and same cube with subdivision modifier.

* Update utBlenderImportExport.cpp

Fix compiler warning.

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-09-29 21:22:56 +02:00
DIGITAL IMAGE DESIGN
6fa9d09a97 AC: Support Double-Sided Faces (#6252)
* AC: Support Double-Sided Faces

The AC format marks double-sided SURF elements with the 0x20 flag, which Assimp ignored. This commit adds support for double-sided faces.

On encountering a double-sided face via the flag mentioned above, the front face is generated as usual but is then duplicated. The winding order of the duplicate is flipped to form a back face. Vertices are duplicated too so that back faces work correctly with normal vector generation and face smoothing.

* Add test file

* Simplify test case

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-07-29 13:09:30 +02:00
yurik
b97308683b Fix a bug in importing binary PLY file (#1) (#6060)
* Correct IOStreamBuffer<T>::getNextLine() to prevent skipping too many '\n', which could be part of the BINARY part
* Add a regression test
2025-05-31 09:05:44 +02:00
Kim Kulling
9d9a80739d Fix: Fix leak when sortbyp failes with exception (#6166)
Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-05-14 11:43:12 +02:00
Steve M
5a1cc9ec60 Update tinyusdz git hash (fix USD animation) (#6034)
* Update tinyusdz

* Improve reference screenshots

* Add .csm reference screenshot

* Bump version

---------

Co-authored-by: tellypresence <praktique-tellypresence@yahoo.com>
2025-03-17 20:47:28 +01:00
David Campos Rodríguez
1e44036c36 Prefix MTL textures with the MTL directory path (#5928)
* Prefix MTL textures with the MTL directory path.

Path to textures defined in MTL files are relative to the MTL
file rather than to the OBJ, so we need to prefix them with the
MTL file directory path.

* Adding test issue 2355

* Trying to fix for Windows when file has Linux path

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-01-15 10:03:32 +01:00
Steve M
69558d8889 Introduce VRML format (.wrl and .x3dv) 3D model support (#5857)
- Introduce VRML format (.wrl and .x3dv) 3D model support
- Add samples
---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-30 11:56:18 +01:00
HandsomeXi
164a5ae8cf bugfix: Fixed the issue that draco compressed gltf files cannot be loaded normally (#5882) (#5883)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-04 22:03:57 +01:00
Steve M
f7bb1bc170 Add reference screenshots for complex bundled test 3D model files (#5822)
Feature: Add reference screenshots for complex bundled test 3D model files

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-08 16:09:00 +01:00
Steve M
8d5cc3c5d5 Fix issue 5816 (cone.nff load failure): repair faulty line in 3D model file (#5817)
* Add missing numeric value

* Remove superfluous intermediate folder

* Add reference image

* Update path to match superfluous "NFF" removal

* Move reference screenshot to subfolder

---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-10-30 00:13:17 +01:00
Steve M
fffce70fce Fix issue 2889 (molecule_ascii.cob load failure): change integers to floating point values in color triplets (#5819)
* Convert integer values to floating point

* Add reference screenshot

* Restore assert to expect pass instead of fail

---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
2024-10-19 19:20:49 +02:00
Kim Kulling
1e09642382 Ply-Importer: Fix vulnerability (#5739) 2024-08-30 19:43:39 +02:00
Adam Mizerski
4b9f46dbda ColladaParser: check values length (#5462)
* ColladaParser: check values length

fixes: #4286

* Refactor calculation of size for data

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-02-15 13:07:00 +01:00
Robert Reif
81c20a5c61 Improve acc file loading
Add warning and support for tolerating a common problem where objects have wrong kid count.
Add support for empty texture layers.
2024-01-09 21:13:13 +01:00
Andre Schulz
74af43f655 Add unit test for X3D IndexedLineSet
Unit test for issue #3101

Thanks to @mvidiassov for the X3D test file!
2024-01-09 20:55:51 +01:00
Steve M
ea9aa863ff Increase texture variety 2024-01-07 20:16:19 +01:00
Steve M
cb8150b3e8 Add missing textures and reduce texture sprawl 2024-01-07 20:16:19 +01:00
Alexandre Avenel
bfe8745b90 Add as unit-test an invalid PLY model triggering heap-buffer-overflow
==23896==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x12f9daec1827 at pc 0x7ffcad83699c bp 0x00c61574c910 sp 0x00c61574c910
READ of size 1 at 0x12f9daec1827 thread T0
==23896==WARNING: Failed to use and restart external symbolizer!
    #0 0x7ffcad83699b in Assimp::IOStreamBuffer<char>::getNextLine C:\Users\aavenel\Dev\assimp\include\assimp\IOStreamBuffer.h:299
    #1 0x7ffcad83ce69 in Assimp::PLY::DOM::ParseHeader C:\Users\aavenel\Dev\assimp\code\AssetLib\Ply\PlyParser.cpp:428
    #2 0x7ffcad83d58e in Assimp::PLY::DOM::ParseInstanceBinary C:\Users\aavenel\Dev\assimp\code\AssetLib\Ply\PlyParser.cpp:498
    #3 0x7ffcad83302a in Assimp::PLYImporter::InternReadFile C:\Users\aavenel\Dev\assimp\code\AssetLib\Ply\PlyLoader.cpp:189
    #4 0x7ffcad4f2f48 in Assimp::BaseImporter::ReadFile C:\Users\aavenel\Dev\assimp\code\Common\BaseImporter.cpp:135
    #5 0x7ffcad51ee46 in Assimp::Importer::ReadFile C:\Users\aavenel\Dev\assimp\code\Common\Importer.cpp:709
    #6 0x7ff7dd8f9f1a in ImportModel C:\Users\aavenel\Dev\assimp\tools\assimp_cmd\Main.cpp:307
    #7 0x7ff7dd8fdf9e in Assimp_Info C:\Users\aavenel\Dev\assimp\tools\assimp_cmd\Info.cpp:344
    #8 0x7ff7dd8fc04f in main C:\Users\aavenel\Dev\assimp\tools\assimp_cmd\Main.cpp:222
    #9 0x7ff7dd9030eb in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    #10 0x7ffd39e57343 in BaseThreadInitThunk+0x13 (C:\WINDOWS\System32\KERNEL32.DLL+0x180017343)
    #11 0x7ffd3a2626b0 in RtlUserThreadStart+0x20 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x1800526b0)
2023-11-20 08:43:17 +01:00
fvbj
8fcc65a8af Extension of data export to GLB/GLTF format
Allows to export unlimited (more than 4) bones per vertex
Use JOINTS_1,2,.. and WEIGHTS_1,2,...
Added AI_CONFIG_EXPORT_GLTF_UNLIMITED_SKINNING_BONES_PER_VERTEX flag
2023-10-08 14:43:53 +00:00
Steve M
3161f0e754 Introduce alternate versions with animations disabled to allow sucessful load 2023-07-14 20:19:28 -07:00
Steve M
1e6c7063b6 Fix typos 2023-07-13 20:28:48 -07:00
Kim Kulling
d1ad4e54d7 Create licence.md
- closes https://github.com/assimp/assimp/issues/5144
2023-07-03 08:26:50 +02:00
emaame
22c8d97b54 Support OBJ specified only a part of vertex colors
The omitted vertex colors are treated as (0, 0, 0, 1).

e.g

v  0.0  0.0  0.0
v  0.0  0.0  1.0  0.0  0.0  0.0
v  0.0  1.0  0.0
v  1.0  0.0  0.0  1.0  0.6  0.3
v  1.0  1.0  0.0
2023-06-17 16:31:04 +09:00
Kim Kulling
133f730c11 Merge branch 'master' into create-local-textures 2023-04-17 20:47:54 +02:00
Kim Kulling
8bc64ec147 Delete License.txt
- closes https://github.com/assimp/assimp/issues/4957
2023-04-15 11:53:19 +02:00
Steve M
9c5ab67b64 Replace provisional image with original historical image 2023-04-01 09:20:36 -07:00
Steve M
e1678f11e6 Replace relative paths with local assets/textures
Relative paths can easily contain typos, lower/upper case errors, and in general are brittle
2023-03-31 22:17:50 -07:00
Steve M
9552769f82 Merge branch 'master' into provide-utf8-IRR-files 2023-03-21 13:35:01 -07:00
Steve M
92409a821d Provide dwarf textures for COB model
Duped from B3D and X dwarf folders
2023-03-18 22:44:20 -07:00
Steve M
e2063b3ba6 Revert to commit 13 May 2014 (08bacc7)
Changes were introduced to the binary portion of this file at some point
2023-03-17 22:42:17 -07:00
Steve M
95616cf5b5 Add UTF-8 versions of UTF-16LE files
Also duplicate missing textures for local model access
2023-03-17 22:13:40 -07:00
Marc-Antoine Lortie
3c2a425869 Added a test to validate HL1 MDL bone hierarchy. 2023-03-13 19:06:18 -04:00
Matthias Möller
db72c6ee38 When "getNextBlock" was called after "getNextLine", the pointer could still on the newline.
The pointer to a newline could not advance enough, when the line ended with \r\n. The resulting buffer was correct, as the buffer range went from <start> until \r, but that the pointer increased by just 1 could lead to the problem that the next pointer points at \n, which is still part of the newline and therefore, "getNextBlock" got 1 byte too much.

Refs Issue #4871
2023-02-04 15:16:22 +01:00
PencilAmazing
cb8320945d Fix issue #4866 by continuing to resetting read loop after hitting a comment 2023-01-23 14:18:50 -05:00
Luca Della Vedova
0924c4710b Fix nested animation name being lost in Collada
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
2022-06-29 11:09:54 +08:00
Kim Kulling
1b3e9e4e01 Add testmodel 2022-05-13 19:44:14 +02:00
Kim Kulling
6e50b04ae0 Merge branch 'master' into IQM 2022-01-17 18:33:37 +01:00
Garux
46f618a6ef add Inter-Quake Model (IQM) Importer 2021-12-18 15:34:58 +03:00
Garux
7fc4603579 fix test/models/3DS/IMAGE1.bmp: is jpg 2021-12-18 14:32:46 +03:00
Pencil Amazing
e831ecf3c2 Add a separate test case for Blender 276 and update Box.blend to be 293 2021-11-26 22:09:06 -04:00
Pencil Amazing
44fa1ec6a7 Make Blender importer aware of collections, and use them when available. Also add the default startup file for Blender 2.93 2021-11-26 22:09:06 -04:00
Kim Kulling
34daf87428 Delete test/models/3DS/UVTransformTest directory
- Remove deprecated data
2021-11-26 19:17:42 +01:00
Kim Kulling
37c81e7a28 Merge branch 'master' into MalcolmTyrrell/jsonSchemaSupport 2021-11-12 10:37:19 +01:00
Kim Kulling
8ed18621db Fixes 2021-11-10 20:37:27 +01:00
Malcolm Tyrrell
7788c1a04e Add a unit test for json schemas. 2021-10-07 10:01:32 +01:00
René Martin
3001d88172 Merge branch 'master' into x3d_pugi_migration 2021-09-07 15:04:08 +02:00
Krishty
758116b083 removed trailing spaces and tabs from source and text
This commit ignores the “contrib” folder in order to prevent merge conflicts in dependencies, should these be updated via git.
2021-07-29 13:28:51 +02:00
RichardTea
bff1d012bd Read matrix and input (shared) correctly
<matrix> may have leading and trailing whitespace
<input/> set attribute is unsigned. It is also optional, default 0
2021-07-13 16:50:09 +01:00
RichardTea
fb039bb9eb Add glTFv2 Clearcoat import/export tests
Uses Clearcoat model from Khronos
2021-06-14 15:11:41 +01:00
Malcolm Tyrrell
57652a9084 Version is strictly a string 2021-03-15 16:27:50 +00:00