From cb76a49b824c868931e5f4b505bf175d1c207c12 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Sun, 8 Apr 2018 15:47:27 -0700 Subject: [PATCH 1/3] List all sources in CMakeLists.txt. If nothing else, it helps IDEs do the right thing. --- CMakeLists.txt | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9362264..1d3bb90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,28 +130,48 @@ if (APPLE) endif() set(SOURCE_FILES - src/utils/File_Utils.cpp - src/utils/Image_Utils.cpp - src/utils/String_Utils.cpp - src/main.cpp + src/FBX2glTF.h src/Fbx2Raw.cpp + src/Fbx2Raw.h src/Raw2Gltf.cpp + src/Raw2Gltf.h src/RawModel.cpp - src/glTF/BufferData.cpp - src/glTF/MaterialData.cpp - src/glTF/MeshData.cpp - src/glTF/NodeData.cpp - src/glTF/PrimitiveData.cpp - src/glTF/BufferViewData.cpp - src/glTF/BufferViewData.h + src/RawModel.h src/glTF/AccessorData.cpp src/glTF/AccessorData.h - src/glTF/ImageData.cpp - src/glTF/TextureData.cpp - src/glTF/SkinData.cpp src/glTF/AnimationData.cpp + src/glTF/AnimationData.h + src/glTF/BufferData.cpp + src/glTF/BufferData.h + src/glTF/BufferViewData.cpp + src/glTF/BufferViewData.h src/glTF/CameraData.cpp + src/glTF/CameraData.h + src/glTF/ImageData.cpp + src/glTF/ImageData.h + src/glTF/MaterialData.cpp + src/glTF/MaterialData.h + src/glTF/MeshData.cpp + src/glTF/MeshData.h + src/glTF/NodeData.cpp + src/glTF/NodeData.h + src/glTF/PrimitiveData.cpp + src/glTF/PrimitiveData.h + src/glTF/SamplerData.h src/glTF/SceneData.cpp + src/glTF/SceneData.h + src/glTF/SkinData.cpp + src/glTF/SkinData.h + src/glTF/TextureData.cpp + src/glTF/TextureData.h + src/main.cpp + src/mathfu.h + src/utils/File_Utils.cpp + src/utils/File_Utils.h + src/utils/Image_Utils.cpp + src/utils/Image_Utils.h + src/utils/String_Utils.cpp + src/utils/String_Utils.h ) add_executable(FBX2glTF ${SOURCE_FILES}) From 68983ad0d02d5ce4ea7b63f7964cb63743234ad7 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Sun, 8 Apr 2018 17:54:42 -0700 Subject: [PATCH 2/3] Fix skinning edge case. A mesh with a single (skinning) deformer which had zero clusters would erroneously register as skinned, leading GetRoodNode() to an assertion failure. Fixed. --- src/Fbx2Raw.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Fbx2Raw.cpp b/src/Fbx2Raw.cpp index 671db6c..2b072d0 100644 --- a/src/Fbx2Raw.cpp +++ b/src/Fbx2Raw.cpp @@ -401,12 +401,14 @@ public: for (int deformerIndex = 0; deformerIndex < pMesh->GetDeformerCount(); deformerIndex++) { FbxSkin *skin = reinterpret_cast< FbxSkin * >( pMesh->GetDeformer(deformerIndex, FbxDeformer::eSkin)); if (skin != nullptr) { + const int clusterCount = skin->GetClusterCount(); + if (clusterCount == 0) { + continue; + } int controlPointCount = pMesh->GetControlPointsCount(); - vertexJointIndices.resize(controlPointCount, Vec4i(0, 0, 0, 0)); vertexJointWeights.resize(controlPointCount, Vec4f(0.0f, 0.0f, 0.0f, 0.0f)); - const int clusterCount = skin->GetClusterCount(); for (int clusterIndex = 0; clusterIndex < clusterCount; clusterIndex++) { FbxCluster *cluster = skin->GetCluster(clusterIndex); const int indexCount = cluster->GetControlPointIndicesCount(); From 447333a16a8a5518d2c760576191d660b7857ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= Date: Thu, 26 Apr 2018 07:29:01 -0300 Subject: [PATCH 3/3] Typo on string #239, #241, #244 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d317cb6..affb2d0 100644 --- a/README.md +++ b/README.md @@ -236,12 +236,12 @@ ratification process** Given the command line flag --pbr-metallic-roughness, we throw ourselves into the warm embrace of glTF 2.0's PBR preference. -As mentioned above, there is lilttle consensus in the world on how PBR should be +As mentioned above, there is little consensus in the world on how PBR should be represented in FBX. At present, we support only one format: Stingray PBS. This -is a featue that comes bundled with Maya, and any PBR model exported through +is a feature that comes bundled with Maya, and any PBR model exported through that route should be digested propertly by FBX2glTF. -(A happy note: Allegorithmic's Susbstance Painter also exports Stingray PBS, +(A happy note: Allegorithmic's Substance Painter also exports Stingray PBS, when hooked up to Maya.) ## Draco Compression