From 2b416da9df253add18498549869e82630aa600a2 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sat, 11 Apr 2020 11:19:02 -0400 Subject: [PATCH] BCH/BCRES : Skip transforming normals to prevent singular matrix bug --- File_Format_Library/FileFormats/BCH/BCH.cs | 1 - .../FileFormats/BCH/Wrappers/Model/H3DMeshWrapper.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/File_Format_Library/FileFormats/BCH/BCH.cs b/File_Format_Library/FileFormats/BCH/BCH.cs index 7b24baae..574c0075 100644 --- a/File_Format_Library/FileFormats/BCH/BCH.cs +++ b/File_Format_Library/FileFormats/BCH/BCH.cs @@ -50,7 +50,6 @@ namespace FirstPlugin.CtrLibrary } } - bool DrawablesLoaded = false; public override void OnClick(TreeView treeView) { diff --git a/File_Format_Library/FileFormats/BCH/Wrappers/Model/H3DMeshWrapper.cs b/File_Format_Library/FileFormats/BCH/Wrappers/Model/H3DMeshWrapper.cs index d81ebdd8..4c0f9616 100644 --- a/File_Format_Library/FileFormats/BCH/Wrappers/Model/H3DMeshWrapper.cs +++ b/File_Format_Library/FileFormats/BCH/Wrappers/Model/H3DMeshWrapper.cs @@ -98,7 +98,7 @@ namespace FirstPlugin.CtrLibrary { int index = boneIndices[vertices[v].Indices.b0]; vertex.pos = Vector3.TransformPosition(vertex.pos, parentModel.Skeleton.Renderable.bones[index].Transform); - vertex.nrm = Vector3.TransformNormal(vertex.nrm, parentModel.Skeleton.Renderable.bones[index].Transform); + // vertex.nrm = Vector3.TransformNormal(vertex.nrm, parentModel.Skeleton.Renderable.bones[index].Transform); } /* vertex.boneWeights.Add(vertices[v].Weights.w0);