Hacking WIP BFRES Model Importer (and viewer)

KillzXGaming

Well-Known Member
OP
Member
Joined
Jan 2, 2016
Messages
1,629
Trophies
0
Age
28
XP
1,618
Country
United States
Notice! We cannot load mods yet. Having these tools/scripts released now will help continue the development for these with more improvements to come later!

Model Importer

You can now preview models with this tool

This script injects model data. Originally made by smb123w64gb it can inject models under the poly/vertex count. This can be used on any bfres, characters, objects, stages ect however I need to figure out bounding box stuff for stages so currently those will cull away,

Usage: BFRES_Vertex.py (BFRES file) (CSV File)

Optional arguments (-f) Inject model data specifically to a certain model and keep the rest intact.

Switch games that should work:
  • Super Mario Odyssey
  • Kirby: Star Allies
  • Splatoon 2
  • ARMS
  • Mario Kart 8 Deluxe
  • The Legend of Zelda: Breath of the Wild

Full tutorial here.

You can also port over your mods over from MK8 and BOTW using the same csv file! MK8 will not be able to have custom stages ported over yet until rebuilding is possible.

c9ce2qN.png



Todo

  • Calculate tangents and binormals
  • Possibly have gui?
  • Material editing
  • Texture editing
  • Merge Wii U BFRES script (next version)
Download here

Credits
  • RandomTalkingBush for his BFRES script (Gave an idea of the layout to parse)
  • Ploaj (Forked model Wii U editor and did animation interpolation)
  • smb123w64gb Made original injector script i updated
  • AboodXD for swizzle code (not fully implemented into viewer yet)
 
Last edited by KillzXGaming,

Don Jon

Well-Known Member
Member
Joined
Nov 20, 2015
Messages
1,057
Trophies
0
Age
38
XP
1,496
Country
United States
so im assuming we still need to fix normals via blender, uvs via noesis, or does the switch bfres format not need that fix?

also it would be nice to see a gif of the model anims
 
Last edited by Don Jon,

KillzXGaming

Well-Known Member
OP
Member
Joined
Jan 2, 2016
Messages
1,629
Trophies
0
Age
28
XP
1,618
Country
United States
so im assuming we still need to fix normals via blender, uvs via noesis, or does the switch bfres format not need that fix?

also it would be nice to see a gif of the model anims
It works the same so yes blender is needed atm for better normals or noesis is needed for the max script part if it has issues with UVs or errors. I plan on improving it however so hopefully i can get a better method like use a dae to inject into the bfres or something.

Also whenever I get dae exporting done on the model viewer I hope that'll remove the need for 3DS max incase any user is in favor of using blender
 
Last edited by KillzXGaming,
  • Like
Reactions: CuriousTommy

Don Jon

Well-Known Member
Member
Joined
Nov 20, 2015
Messages
1,057
Trophies
0
Age
38
XP
1,496
Country
United States
It works the same so yes blender is needed atm for better normals or noesis is needed for the max script part if it has issues with UVs or errors. I plan on improving it however so hopefully i can get a better method like use a dae to inject into the bfres or something.

Also whenever I get dae exporting done on the model viewer I hope that'll remove the need for 3DS max incase any user is in favor of using blender
It really is a pain to have to use noesis and blender, that fix should be a priority. Hopefully someone can help you man. Tho using those alternatives lead to perfect results
 
Last edited by Don Jon,

Yoshimaster96

Well-Known Member
Member
Joined
Jul 16, 2014
Messages
104
Trophies
0
XP
351
Country
United States
Doesn't work in Wine (1.7.55):

Code:
fixme:mscoree:parse_supported_runtime sku=L".NETFramework,Version=v4.5.2" not implemented
fixme:mscoree:ConfigFileHandler_startElement Unknown element L"dependentAssembly" in state 0
fixme:mscoree:ConfigFileHandler_startElement Unknown element L"assemblyIdentity" in state 6
fixme:mscoree:ConfigFileHandler_startElement Unknown element L"bindingRedirect" in state 6

Unhandled Exception:
System.NotImplementedException: The requested feature is not implemented.
  at System.Runtime.InteropServices.Marshal.ReadInt16 (System.Object ptr, Int32 ofs) [0x00000] in <filename unknown>:0
  at System.Drawing.Font.FromLogFont (System.Object lf, IntPtr hdc) [0x00000] in <filename unknown>:0
  at System.Drawing.Font.FromHfont (IntPtr hfont) [0x00000] in <filename unknown>:0
  at System.Drawing.SystemFonts.get_DefaultFont () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.get_DefaultFont () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.GetDefaultFontHandleWrapper () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.get_FontHandle () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.GetFontAutoScaleDimensions () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.get_CurrentAutoScaleDimensions () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.get_AutoScaleFactor () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.PerformAutoScale (Boolean includedBounds, Boolean excludedBounds) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.OnLayoutResuming (Boolean performLayout) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.ResumeLayout (Boolean performLayout) [0x00000] in <filename unknown>:0
  at OpenTK.GLControl.InitializeComponent () [0x00000] in <filename unknown>:0
  at OpenTK.GLControl..ctor (OpenTK.Graphics.GraphicsMode mode, Int32 major, Int32 minor, GraphicsContextFlags flags) [0x00000] in <filename unknown>:0
  at OpenTK.GLControl..ctor (OpenTK.Graphics.GraphicsMode mode) [0x00000] in <filename unknown>:0
  at OpenTK.GLControl..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) OpenTK.GLControl:.ctor ()
  at BFRES.Form1.InitializeComponent () [0x00000] in <filename unknown>:0
  at BFRES.Form1..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) BFRES.Form1:.ctor ()
  at BFRES.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NotImplementedException: The requested feature is not implemented.
  at System.Runtime.InteropServices.Marshal.ReadInt16 (System.Object ptr, Int32 ofs) [0x00000] in <filename unknown>:0
  at System.Drawing.Font.FromLogFont (System.Object lf, IntPtr hdc) [0x00000] in <filename unknown>:0
  at System.Drawing.Font.FromHfont (IntPtr hfont) [0x00000] in <filename unknown>:0
  at System.Drawing.SystemFonts.get_DefaultFont () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.get_DefaultFont () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.GetDefaultFontHandleWrapper () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.get_FontHandle () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.GetFontAutoScaleDimensions () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.get_CurrentAutoScaleDimensions () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.get_AutoScaleFactor () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.PerformAutoScale (Boolean includedBounds, Boolean excludedBounds) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl.OnLayoutResuming (Boolean performLayout) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.ResumeLayout (Boolean performLayout) [0x00000] in <filename unknown>:0
  at OpenTK.GLControl.InitializeComponent () [0x00000] in <filename unknown>:0
  at OpenTK.GLControl..ctor (OpenTK.Graphics.GraphicsMode mode, Int32 major, Int32 minor, GraphicsContextFlags flags) [0x00000] in <filename unknown>:0
  at OpenTK.GLControl..ctor (OpenTK.Graphics.GraphicsMode mode) [0x00000] in <filename unknown>:0
  at OpenTK.GLControl..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) OpenTK.GLControl:.ctor ()
  at BFRES.Form1.InitializeComponent () [0x00000] in <filename unknown>:0
  at BFRES.Form1..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) BFRES.Form1:.ctor ()
  at BFRES.Program.Main () [0x00000] in <filename unknown>:0
 

Don Jon

Well-Known Member
Member
Joined
Nov 20, 2015
Messages
1,057
Trophies
0
Age
38
XP
1,496
Country
United States
Don't use apples, wine is to be drinken :)

Does this work for Zelda Wiiu version to replace textures for Cemu in PC?

texture editing doesnt require this tool if i recall
use @AboodXD texture editor
though botw is a special case
you need to do some other stuff to get it working besides just swapping textures
 

Yoshimaster96

Well-Known Member
Member
Joined
Jul 16, 2014
Messages
104
Trophies
0
XP
351
Country
United States
Currently compiling Wine from source (it takes forever), but in the meantime, is there a simple converter I can use instead? I really don't need the viewing feature, and am only interested in the model (preferably DAE, since OBJ doesn't allow rigs/animated models, but if there's only an OBJ converter I'll make do until I compile Wine, as long as it dumps all the textures too)
 

Yoshimaster96

Well-Known Member
Member
Joined
Jul 16, 2014
Messages
104
Trophies
0
XP
351
Country
United States
Also on Windows 10 (x86 version, installed on VirtualBox), the program closes immediately after opening, without giving an error.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Meta what's @Psionic Roshambo onlyfans password