kythyria / payday2-model-tool

Diesel Model importer/exporter, with bones/rigging coming soon!
https://ci.appveyor.com/project/kythyria/payday2-model-tool/build/artifacts
GNU General Public License v3.0
19 stars 7 forks source link

Error trying to export to GLTF some masks #10

Closed ImUrX closed 4 years ago

ImUrX commented 4 years ago

I get this error when trying to export the rabbit mask (you can find at the bottom of this issue)

SharpGLTF.Validation.DataException: Accessor[1] Accessor[1][6] is not of unit length: 0.
   at SharpGLTF.Schema2.ModelRoot.ReadFromDictionary(Dictionary`2 files, String fileName)
   at SharpGLTF.Schema2.ModelRoot.DeepClone()
   at SharpGLTF.Schema2.WriteSettings.FilterModel(ModelRoot model)
   at SharpGLTF.Schema2.ModelRoot._Write(WriteSettings settings, String baseName, ModelRoot model)
   at SharpGLTF.Schema2.ModelRoot.SaveGLTF(String filePath, Formatting fmt)
   at PD2ModelParser.Exporters.GltfExporter.ExportFile(FullModelData data, String path) in C:\projects\payday2-model-tool\PD2ModelParser\Exporters\GltfExporter.cs:line 17
   at PD2ModelParser.UI.ExportPanel.exportBttn_Click(Object sender, EventArgs e) in C:\projects\payday2-model-tool\PD2ModelParser\UI\ExportPanel.cs:line 62
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

msk_rabbit.zip

ImUrX commented 4 years ago

Another one with agatha vanguard veteran

************** Exception Text **************
SharpGLTF.Validation.DataException: Accessor[1] Accessor[1][0] is not of unit length: 3,421446E-25.
   at SharpGLTF.Schema2.ModelRoot.ReadFromDictionary(Dictionary`2 files, String fileName)
   at SharpGLTF.Schema2.ModelRoot.DeepClone()
   at SharpGLTF.Schema2.WriteSettings.FilterModel(ModelRoot model)
   at SharpGLTF.Schema2.ModelRoot._Write(WriteSettings settings, String baseName, ModelRoot model)
   at SharpGLTF.Schema2.ModelRoot.SaveGLTF(String filePath, Formatting fmt)
   at PD2ModelParser.Exporters.GltfExporter.ExportFile(FullModelData data, String path) in C:\projects\payday2-model-tool\PD2ModelParser\Exporters\GltfExporter.cs:line 17
   at PD2ModelParser.UI.ExportPanel.exportBttn_Click(Object sender, EventArgs e) in C:\projects\payday2-model-tool\PD2ModelParser\UI\ExportPanel.cs:line 62
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

agatha_vanguard_veteran.zip

ImUrX commented 4 years ago

Another one with medusa

SharpGLTF.Validation.DataException: Accessor[1] Accessor[1][104] is not of unit length: 0.
   at SharpGLTF.Schema2.ModelRoot.ReadFromDictionary(Dictionary`2 files, String fileName)
   at SharpGLTF.Schema2.ModelRoot.DeepClone()
   at SharpGLTF.Schema2.WriteSettings.FilterModel(ModelRoot model)
   at SharpGLTF.Schema2.ModelRoot._Write(WriteSettings settings, String baseName, ModelRoot model)
   at SharpGLTF.Schema2.ModelRoot.SaveGLTF(String filePath, Formatting fmt)
   at PD2ModelParser.Exporters.GltfExporter.ExportFile(FullModelData data, String path) in C:\projects\payday2-model-tool\PD2ModelParser\Exporters\GltfExporter.cs:line 17
   at PD2ModelParser.UI.ExportPanel.exportBttn_Click(Object sender, EventArgs e) in C:\projects\payday2-model-tool\PD2ModelParser\UI\ExportPanel.cs:line 62
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

medusa.zip

ImUrX commented 4 years ago

All these errors only happen in GLTF export

kythyria commented 4 years ago

Not sure what's up with agatha_vanguard_veteran, but in the other two it's bogus vertex normals. As in, they were (0,0,0), which isn't at all reasonable.