SPICA - General 3DS ripping tool - gdkchan - 06-26-2017
What this is:
SPICA is a general model ripping tool to rip models from 3DS games. It supports the formats created by Nintendo for the system, and that quite a lot of games uses. Those formats are commonly know as BCH and CGFX (usually have bcres, bcmdl, bc*** extension). It also supports some formats specific to Pokémon games, since the focus of the tool was always supporting those games. Pokémon Sun/Moon introduced entirely new formats designed specially for the game, those are supported by the tool aswell, along with the animations from all three games (X/Y/OR/AS/Sun/Moon). It also supports Super Smash Bros for 3DS (mbn) model format and MT Framework model and texture formats (with severe issues!). I created a thread about MT Framework support aswell here, but I think there's not much interest for these formats, so I don't plan to keep working on them.
You can post questions or requests specific to this tool here, to avoid derailing the Pokémon ripping thread by RTB with such requests.
Planned features/fixes:
I'm also interested in hearing what is currently lacking the most on the tool, so I know where I should focus. Those are some features I plan to implement in no particular order:
- FBX export support
- DAE material anim export
- DAE import support
- Visibility anims on bch and cgfx
- Skeletal anims on cgfx
- Camera/lights/fog effects on both bch and cgfx, along with animations
- Export cameras and lights on DAE when above is done
- Compressed files support
- Containers support
- Pokémon Sun/Moon model, texture and animation creation.
- Pokémon X/Y/OR/AS model, texture and animation creation, with support for some game specific format like MM for the overworld models and GR/AD for the maps (WIP)
- CGFX creation (WIP)
- Also support formats that Ohana3DS used to, to make it a complete replacement (ZMDL from fantasy life, and New Love Plus model/textures are the ones not currently supported)
- Support models that uses silhouette effects with Geometry shader (ex: Atelier Rorona)
- Fix for Pokémon X/Y animation issue with characters leg/feet (also affects OR/AS, but just on few models) (Done)
- Fix billboard models issue on Pokémon (Cosmog/Koffing/...)
- Add a Material Viewer
It's a quite huge list, and supporting all those features will be a lot of work, so I'll always looking for help. I believe that the best way to build such tools is with the help of the community, so if you're interested, you can access the code repository clicking here: https://github.com/gdkchan/SPICA.
The above repository also contains link for automatic build of the tool for windows. Those are always up to date.
How to help:
The tool was written in C#, and the shaders in GLSL. Anyone that knows how to code in C# can help. There's some work on the GUI that needs to be done, and also some work related to rendering, so no experience reverse engineering stuff is necessary to contribute. I'm also interested in moving out of Windows Forms and using a solution that works on all major OSes (Windows, Linux and Mac).
TL;DR
Download is here: https://ci.appveyor.com/api/projects/gdkchan/spica/artifacts/spica_lastest.zip
Source is here: https://github.com/gdkchan/SPICA
RE: SPICA - General 3DS ripping tool - Demonslayerx8 - 06-26-2017
maybe you can add support for a material viewer?
RE: SPICA - General 3DS ripping tool - gdkchan - 06-27-2017
(06-26-2017, 10:32 PM)Demonslayerx8 Wrote: maybe you can add support for a material viewer? I was thinking in adding a separate menu bar to allow editing material (and also other model stuff like meshes and the skeleton). But editing materials would be quite problematic with the current code since shaders are generated dynamically and most material related settings (and colors) are added as constants on the shader code. A viewer would be easier to make and maybe useful for making the model looking more like how it does on the 3DS after exporting. Added it to the list.
RE: SPICA - General 3DS ripping tool - Guy - 06-28-2017
So this sounds like an interesting project, however when I try to run the latest build I get an error:
Quote:See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
SPICA.Renderer.Shaders.ShaderCompilationException: Error compiling Shader!
0(163) : error C0000: syntax error, unexpected '=', expecting ',' or ' at token "="
at SPICA.Renderer.Shaders.Shader.CheckCompilation(Int32 Handle)
at SPICA.Renderer.RenderEngine..ctor(Int32 Width, Int32 Height)
at SPICA.WinForms.FrmMain.Viewport_Load(Object sender, EventArgs e)
at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.1648.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
SPICA.WinForms
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/USER/Desktop/spica_lastest/SPICA.WinForms.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
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.1647.0 built by: NETFXREL3STAGE
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.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
OpenTK
Assembly Version: 2.0.0.0
Win32 Version: 2.0.0
CodeBase: file:///C:/Users/USER/Desktop/spica_lastest/OpenTK.DLL
----------------------------------------
OpenTK.GLControl
Assembly Version: 2.0.0.0
Win32 Version: 2.0.0
CodeBase: file:///C:/Users/USER/Desktop/spica_lastest/OpenTK.GLControl.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1647.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.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.
RE: SPICA - General 3DS ripping tool - gdkchan - 06-28-2017
(06-28-2017, 03:09 AM)Guy Wrote: So this sounds like an interesting project, however when I try to run the latest build I get an error:
Quote:See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
SPICA.Renderer.Shaders.ShaderCompilationException: Error compiling Shader!
0(163) : error C0000: syntax error, unexpected '=', expecting ',' or ' at token "="
at SPICA.Renderer.Shaders.Shader.CheckCompilation(Int32 Handle)
at SPICA.Renderer.RenderEngine..ctor(Int32 Width, Int32 Height)
at SPICA.WinForms.FrmMain.Viewport_Load(Object sender, EventArgs e)
at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.1648.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
SPICA.WinForms
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/USER/Desktop/spica_lastest/SPICA.WinForms.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
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.1647.0 built by: NETFXREL3STAGE
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.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
OpenTK
Assembly Version: 2.0.0.0
Win32 Version: 2.0.0
CodeBase: file:///C:/Users/USER/Desktop/spica_lastest/OpenTK.DLL
----------------------------------------
OpenTK.GLControl
Assembly Version: 2.0.0.0
Win32 Version: 2.0.0
CodeBase: file:///C:/Users/USER/Desktop/spica_lastest/OpenTK.GLControl.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1647.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.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. Seems to be a bug in your driver complaining about the ternary if. Can you try the lastest version? I made changes on the shader in a attempt to fix your issue.
RE: SPICA - General 3DS ripping tool - Guy - 06-28-2017
(06-28-2017, 08:25 AM)gdkchan Wrote: Seems to be a bug in your driver complaining about the ternary if. Can you try the lastest version? I made changes on the shader in a attempt to fix your issue.
Works like a charm, thank you gdkchan.
RE: SPICA - General 3DS ripping tool - andreelikesplantsvszombies - 06-28-2017
Can you add the ability to remove textures, because I kept seeing ssb3ds models "black" and I want to get rid of it.
RE: SPICA - General 3DS ripping tool - gdkchan - 06-29-2017
(06-28-2017, 06:54 PM)andreelikesplantsvszombies Wrote: Can you add the ability to remove textures, because I kept seeing ssb3ds models "black" and I want to get rid of it. Can you elaborate more? It was supposed to be the other way around: No textures = black model, textures = textured model. Which model you loaded that produced this result? Maybe it's a bug on the renderer.
RE: SPICA - General 3DS ripping tool - Carpaccio - 07-05-2017
A little issue I ran into on a few of the others I've been getting at, is missing planes after export. For example, this one, on preview, everything is properly assigned and visible, however after export to Collada, the 'eye' area vanishes without a trace and there is only one material group just labeled '_mat' with one texture applied to all areas of the model, rather than how it appears on preview. Exporting as SMD causes both the mouth and eye planes to vanish, and exporting as binary just crashes SPICA.
https://www.dropbox.com/s/61rzoz3t905sbra/JBS22.zip?dl=0
RE: SPICA - General 3DS ripping tool - NotSoRed - 07-08-2017
(06-26-2017, 10:17 PM)gdkchan Wrote: What this is:
SPICA is a general model ripping tool to rip models from 3DS games. It supports the formats created by Nintendo for the system, and that quite a lot of games uses. Those formats are commonly know as BCH and CGFX (usually have bcres, bcmdl, bc*** extension). It also supports some formats specific to Pokémon games, since the focus of the tool was always supporting those games. Pokémon Sun/Moon introduced entirely new formats designed specially for the game, those are supported by the tool aswell, along with the animations from all three games (X/Y/OR/AS/Sun/Moon). It also supports Super Smash Bros for 3DS (mbn) model format and MT Framework model and texture formats (with severe issues!). I created a thread about MT Framework support aswell here, but I think there's not much interest for these formats, so I don't plan to keep working on them.
You can post questions or requests specific to this tool here, to avoid derailing the Pokémon ripping thread by RTB with such requests.
Planned features/fixes:
I'm also interested in hearing what is currently lacking the most on the tool, so I know where I should focus. Those are some features I plan to implement in no particular order:
- FBX export support
- DAE material anim export
- DAE import support
- Visibility anims on bch and cgfx
- Skeletal anims on cgfx
- Camera/lights/fog effects on both bch and cgfx, along with animations
- Export cameras and lights on DAE when above is done
- Compressed files support
- Containers support
- Pokémon Sun/Moon model, texture and animation creation.
- Pokémon X/Y/OR/AS model, texture and animation creation, with support for some game specific format like MM for the overworld models and GR/AD for the maps (WIP)
- CGFX creation (WIP)
- Also support formats that Ohana3DS used to, to make it a complete replacement (ZMDL from fantasy life, and New Love Plus model/textures are the ones not currently supported)
- Support models that uses silhouette effects with Geometry shader (ex: Atelier Rorona)
- Fix for Pokémon X/Y animation issue with characters leg/feet (also affects OR/AS, but just on few models) (Done)
- Fix billboard models issue on Pokémon (Cosmog/Koffing/...)
- Add a Material Viewer
It's a quite huge list, and supporting all those features will be a lot of work, so I'll always looking for help. I believe that the best way to build such tools is with the help of the community, so if you're interested, you can access the code repository clicking here: https://github.com/gdkchan/SPICA.
The above repository also contains link for automatic build of the tool for windows. Those are always up to date.
How to help:
The tool was written in C#, and the shaders in GLSL. Anyone that knows how to code in C# can help. There's some work on the GUI that needs to be done, and also some work related to rendering, so no experience reverse engineering stuff is necessary to contribute. I'm also interested in moving out of Windows Forms and using a solution that works on all major OSes (Windows, Linux and Mac).
TL;DR
Download is here: https://ci.appveyor.com/api/projects/gdkchan/spica/artifacts/spica_lastest.zip
Source is here: https://github.com/gdkchan/SPICA I cannot use the program because of this error
And, yes, I have the latest version.
RE: SPICA - General 3DS ripping tool - gdkchan - 07-08-2017
(07-08-2017, 02:00 AM)NotSoRed Wrote: I cannot use the program because of this error
And, yes, I have the latest version.
Looks like your gpu is too old to run this. It needs to support at least OpenGL 3.3. I plan to work on a command line version of the tool later so those with really old gpus, or that wants to batch export stuff have a better option.
RE: SPICA - General 3DS ripping tool - NotSoRed - 07-08-2017
(07-08-2017, 08:12 AM)gdkchan Wrote: (07-08-2017, 02:00 AM)NotSoRed Wrote: I cannot use the program because of this error
And, yes, I have the latest version.
Looks like your gpu is too old to run this. It needs to support at least OpenGL 3.3. I plan to work on a command line version of the tool later so those with really old gpus, or that wants to batch export stuff have a better option.
When will this happen?
RE: SPICA - General 3DS ripping tool - Carpaccio - 07-09-2017
Any advice on my issue? I still can't figure out the problem.
RE: SPICA - General 3DS ripping tool - Makoto - 08-20-2017
Hi. I am trying to ripping models from Project Mirai DX. I don't understand how to export models. If i do export it export only one texture, and if i do merge or batch export it asks for a input folder(the folder were the original model is located?) and the output. After selecting, it crashes.
Here is an example
https://sta.sh/010wo07g9hz4
RE: SPICA - General 3DS ripping tool - Kold-Virus - 08-20-2017
This looks fantastic.
But any reason I keep getting "Unsupported File Format" errors whenever I try to open anything? I tried SZS, BCH.
|