From 20062865286d221b79e42b4eb3182d5ee7f91bd7 Mon Sep 17 00:00:00 2001 From: Filip Lundgren <45687559+ifiddynine@users.noreply.github.com> Date: Mon, 22 Jun 2020 23:14:16 +0200 Subject: [PATCH 1/5] Fix Maya PBR & stingray texture detection --- code/AssetLib/FBX/FBXConverter.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/AssetLib/FBX/FBXConverter.cpp b/code/AssetLib/FBX/FBXConverter.cpp index 261567e48..0a13ff766 100644 --- a/code/AssetLib/FBX/FBXConverter.cpp +++ b/code/AssetLib/FBX/FBXConverter.cpp @@ -2000,19 +2000,19 @@ void FBXConverter::SetTextureProperties(aiMaterial *out_mat, const TextureMap &_ TrySetTextureProperties(out_mat, _textures, "Maya|ReflectionMapTexture", aiTextureType_REFLECTION, mesh); // Maya PBR - TrySetTextureProperties(out_mat, _textures, "Maya|baseColor|file", aiTextureType_BASE_COLOR, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|normalCamera|file", aiTextureType_NORMAL_CAMERA, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|emissionColor|file", aiTextureType_EMISSION_COLOR, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|metalness|file", aiTextureType_METALNESS, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|diffuseRoughness|file", aiTextureType_DIFFUSE_ROUGHNESS, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|baseColor", aiTextureType_BASE_COLOR, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|normalCamera", aiTextureType_NORMAL_CAMERA, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|emissionColor", aiTextureType_EMISSION_COLOR, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|metalness", aiTextureType_METALNESS, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|diffuseRoughness", aiTextureType_DIFFUSE_ROUGHNESS, mesh); // Maya stingray - TrySetTextureProperties(out_mat, _textures, "Maya|TEX_color_map|file", aiTextureType_BASE_COLOR, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|TEX_normal_map|file", aiTextureType_NORMAL_CAMERA, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|TEX_emissive_map|file", aiTextureType_EMISSION_COLOR, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|TEX_metallic_map|file", aiTextureType_METALNESS, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|TEX_roughness_map|file", aiTextureType_DIFFUSE_ROUGHNESS, mesh); - TrySetTextureProperties(out_mat, _textures, "Maya|TEX_ao_map|file", aiTextureType_AMBIENT_OCCLUSION, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|TEX_color_map", aiTextureType_BASE_COLOR, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|TEX_normal_map", aiTextureType_NORMAL_CAMERA, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|TEX_emissive_map", aiTextureType_EMISSION_COLOR, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|TEX_metallic_map", aiTextureType_METALNESS, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|TEX_roughness_map", aiTextureType_DIFFUSE_ROUGHNESS, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|TEX_ao_map", aiTextureType_AMBIENT_OCCLUSION, mesh); // 3DSMax PBR TrySetTextureProperties(out_mat, _textures, "3dsMax|Parameters|base_color_map", aiTextureType_BASE_COLOR, mesh); From ba94bfd1975c3b2bedf04d8c078a4a8160c90208 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 29 Jun 2020 09:51:00 +0200 Subject: [PATCH 2/5] Move patreon to contribution --- Readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Readme.md b/Readme.md index 15e76b9d2..66b0a31df 100644 --- a/Readme.md +++ b/Readme.md @@ -25,16 +25,6 @@ Additionally, assimp features various __mesh post processing tools__: normals an This is the development repo containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [Github Assimp Releases](https://github.com/assimp/assimp/releases). -Monthly donations via Patreon: -
[![Patreon](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png)](http://www.patreon.com/assimp) - -
- -One-off donations via PayPal: -
[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JRJVPXC4QJM4) - -
- Please check our Wiki as well: https://github.com/assimp/assimp/wiki If you want to check our Model-Database, use the following repo: https://github.com/assimp/assimp-mdb @@ -196,6 +186,16 @@ Become a financial contributor and help us sustain our community. [[Contribute]( +Monthly donations via Patreon: +
[![Patreon](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png)](http://www.patreon.com/assimp) + +
+ +One-off donations via PayPal: +
[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JRJVPXC4QJM4) + +
+ #### Organizations Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/assimp/contribute)] From 28b65c84b0ca2dcd2e6c38d3fac209c3890f9207 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 29 Jun 2020 09:52:36 +0200 Subject: [PATCH 3/5] Create fileformats.md Optimize the readabilaty of the frontpage. --- doc/Fileformats.md | 87 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 doc/Fileformats.md diff --git a/doc/Fileformats.md b/doc/Fileformats.md new file mode 100644 index 000000000..c9116e2e7 --- /dev/null +++ b/doc/Fileformats.md @@ -0,0 +1,87 @@ +#### Supported file formats #### + +__Importers__: + +- 3D +- [3DS](https://en.wikipedia.org/wiki/.3ds) +- [3MF](https://en.wikipedia.org/wiki/3D_Manufacturing_Format) +- AC +- [AC3D](https://en.wikipedia.org/wiki/AC3D) +- ACC +- AMJ +- ASE +- ASK +- B3D +- [BLEND](https://en.wikipedia.org/wiki/.blend_(file_format)) +- [BVH](https://en.wikipedia.org/wiki/Biovision_Hierarchy) +- CMS +- COB +- [DAE/Collada](https://en.wikipedia.org/wiki/COLLADA) +- [DXF](https://en.wikipedia.org/wiki/AutoCAD_DXF) +- ENFF +- [FBX](https://en.wikipedia.org/wiki/FBX) +- [glTF 1.0](https://en.wikipedia.org/wiki/GlTF#glTF_1.0) + GLB +- [glTF 2.0](https://en.wikipedia.org/wiki/GlTF#glTF_2.0): + At the moment for glTF2.0 the following extensions are supported: + + KHR_lights_punctual ( 5.0 ) + + KHR_materials_pbrSpecularGlossiness ( 5.0 ) + + KHR_materials_unlit ( 5.0 ) + + KHR_texture_transform ( 5.1 under test ) +- HMB +- IFC-STEP +- IRR / IRRMESH +- [LWO](https://en.wikipedia.org/wiki/LightWave_3D) +- LWS +- LXO +- [M3D](https://bztsrc.gitlab.io/model3d) +- MD2 +- MD3 +- MD5 +- MDC +- MDL +- MESH / MESH.XML +- MOT +- MS3D +- NDO +- NFF +- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file) +- [OFF](https://en.wikipedia.org/wiki/OFF_(file_format)) +- [OGEX](https://en.wikipedia.org/wiki/Open_Game_Engine_Exchange) +- [PLY](https://en.wikipedia.org/wiki/PLY_(file_format)) +- PMX +- PRJ +- Q3O +- Q3S +- RAW +- SCN +- SIB +- SMD +- [STP](https://en.wikipedia.org/wiki/ISO_10303-21) +- [STL](https://en.wikipedia.org/wiki/STL_(file_format)) +- TER +- UC +- VTA +- X +- [X3D](https://en.wikipedia.org/wiki/X3D) +- XGL +- ZGL + +Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default): + +- [C4D](https://en.wikipedia.org/wiki/Cinema_4D) (https://github.com/assimp/assimp/wiki/Cinema4D-&-Melange) IMporting geometry + node hierarchy are currently supported + +__Exporters__: + +- DAE (Collada) +- STL +- OBJ +- PLY +- X +- 3DS +- JSON (for WebGl, via https://github.com/acgessler/assimp2json) +- ASSBIN +- STEP +- glTF 1.0 (partial) +- glTF 2.0 (partial) +- 3MF ( experimental ) +- FBX ( experimental ) From 9a873388545788e4fbd891cff424fd63675b5aa9 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 29 Jun 2020 09:55:29 +0200 Subject: [PATCH 4/5] Update Readme.md --- Readme.md | 87 +------------------------------------------------------ 1 file changed, 1 insertion(+), 86 deletions(-) diff --git a/Readme.md b/Readme.md index 66b0a31df..dc54870a0 100644 --- a/Readme.md +++ b/Readme.md @@ -30,92 +30,7 @@ Please check our Wiki as well: https://github.com/assimp/assimp/wiki If you want to check our Model-Database, use the following repo: https://github.com/assimp/assimp-mdb #### Supported file formats #### - -__Importers__: - -- 3D -- [3DS](https://en.wikipedia.org/wiki/.3ds) -- [3MF](https://en.wikipedia.org/wiki/3D_Manufacturing_Format) -- AC -- [AC3D](https://en.wikipedia.org/wiki/AC3D) -- ACC -- AMJ -- ASE -- ASK -- B3D -- [BLEND](https://en.wikipedia.org/wiki/.blend_(file_format)) -- [BVH](https://en.wikipedia.org/wiki/Biovision_Hierarchy) -- CMS -- COB -- [DAE/Collada](https://en.wikipedia.org/wiki/COLLADA) -- [DXF](https://en.wikipedia.org/wiki/AutoCAD_DXF) -- ENFF -- [FBX](https://en.wikipedia.org/wiki/FBX) -- [glTF 1.0](https://en.wikipedia.org/wiki/GlTF#glTF_1.0) + GLB -- [glTF 2.0](https://en.wikipedia.org/wiki/GlTF#glTF_2.0): - At the moment for glTF2.0 the following extensions are supported: - + KHR_lights_punctual ( 5.0 ) - + KHR_materials_pbrSpecularGlossiness ( 5.0 ) - + KHR_materials_unlit ( 5.0 ) - + KHR_texture_transform ( 5.1 under test ) -- HMB -- IFC-STEP -- IRR / IRRMESH -- [LWO](https://en.wikipedia.org/wiki/LightWave_3D) -- LWS -- LXO -- [M3D](https://bztsrc.gitlab.io/model3d) -- MD2 -- MD3 -- MD5 -- MDC -- MDL -- MESH / MESH.XML -- MOT -- MS3D -- NDO -- NFF -- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file) -- [OFF](https://en.wikipedia.org/wiki/OFF_(file_format)) -- [OGEX](https://en.wikipedia.org/wiki/Open_Game_Engine_Exchange) -- [PLY](https://en.wikipedia.org/wiki/PLY_(file_format)) -- PMX -- PRJ -- Q3O -- Q3S -- RAW -- SCN -- SIB -- SMD -- [STP](https://en.wikipedia.org/wiki/ISO_10303-21) -- [STL](https://en.wikipedia.org/wiki/STL_(file_format)) -- TER -- UC -- VTA -- X -- [X3D](https://en.wikipedia.org/wiki/X3D) -- XGL -- ZGL - -Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default): - -- [C4D](https://en.wikipedia.org/wiki/Cinema_4D) (https://github.com/assimp/assimp/wiki/Cinema4D-&-Melange) IMporting geometry + node hierarchy are currently supported - -__Exporters__: - -- DAE (Collada) -- STL -- OBJ -- PLY -- X -- 3DS -- JSON (for WebGl, via https://github.com/acgessler/assimp2json) -- ASSBIN -- STEP -- glTF 1.0 (partial) -- glTF 2.0 (partial) -- 3MF ( experimental ) -- FBX ( experimental ) +You can find the complete list of supported file-formats [here](https://github.com/assimp/assimp/blob/master/doc/Fileformats.md) ### Building ### Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file. We are available in vcpkg, and our build system is CMake; if you used CMake before there is a good chance you know what to do. From 03340787ecf769837fabc2b7ba9adfa6a46f4f66 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lortie Date: Mon, 29 Jun 2020 07:50:51 -0400 Subject: [PATCH 5/5] Fixed variable in loop - HL1MDLLoader.cpp Commit 7e5a0acc48efc54d7aa7900c36cd63db1fbeec9b made changes to HL1MDLLoader.cpp. Several variables have been renamed. A loop variable 'i' was renamed to faceIdx, but one reference was left unchanged. --- code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp b/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp index 261214dac..2bb7b42ee 100644 --- a/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp +++ b/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp @@ -829,7 +829,7 @@ void HL1MDLLoader::read_meshes() { } } else { for (int faceIdx = 0; faceIdx < num_faces; ++faceIdx) { - if (i & 1) { + if (faceIdx & 1) { // Preserve winding order. mesh_faces.push_back(HL1MeshFace{ tricmds[faceIdx + 1],