jam1garner / Smash-Forge

Open Source Editor of Smash 4 Filetypes
MIT License
147 stars 58 forks source link

Broken Extracted Textures & Unable to open edited .nut & edited .nut broken mip-maps. #33

Closed InTheBeef closed 6 years ago

InTheBeef commented 7 years ago

After extracting a texture with the forge nut editor the width/height was completely broken as well as 3/4 being pure transparency.

When I attempted to open a .nut I had just replaced the default ABGR textures with new ABGR textures (with different mip-maps saved in paint.net) I recieved the following error:

"Unknown nut format 16."

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NotImplementedException: Unknown nut format 16
   at Smash_Forge.NUT.NUD_Texture.setPixelFormatFromNutFormat(Int32 typet)
   at Smash_Forge.NUT.ReadNTP3(FileData d)
   at Smash_Forge.NUT.Read(String filename)
   at Smash_Forge.NUT..ctor(String filename)
   at Smash_Forge.NUTEditor.openNUTToolStripMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.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)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Smash Forge
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///X:/New%20folder/Downloads/Smash-Forge-Latest_Commit/Smash%20Forge.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 2.9.0.0
    Win32 Version: 2.9.0.0
    CodeBase: file:///X:/New%20folder/Downloads/Smash-Forge-Latest_Commit/lib/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
OpenTK
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.1664.6217
    CodeBase: file:///X:/New%20folder/Downloads/Smash-Forge-Latest_Commit/lib/OpenTK.DLL
----------------------------------------
SALT
    Assembly Version: 1.2.2.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///X:/New%20folder/Downloads/Smash-Forge-Latest_Commit/lib/SALT.DLL
----------------------------------------
OpenTK.GLControl
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.1664.6217
    CodeBase: file:///X:/New%20folder/Downloads/Smash-Forge-Latest_Commit/lib/OpenTK.GLControl.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

With this new .nut I saved from Forge, when extracting with the inject pack all the mip maps & format seemed completely broken, and instead of the usual amount of textures in Marth's .nut, only 6 textures made it out (All of which are completely broken / only one of them would open andit was full was transparency 1x14)

Kouki-Yuu commented 7 years ago

i had the same problem too, I hope they can solve it :/

jam1garner commented 7 years ago

It's an unimplemented NUT type, it will be added when possible. Could you tell me exactly which NUT you found this in

InTheBeef commented 7 years ago

This is using Marth's default nut, but most characters all have a few ABGR(8888) gradients for skin coloration, as well as some others afaik. Used as a "Rim" texture I believe? Pretty sure they have some kind of important mip-map you can't get from auto generating mips, skin is slightly off color at a distance even with the same amount of mip-maps, so extracting these as they are seems to be the only way.