[Pokemon] [Blender] Extracted Some Models/Textures from US/UM, how to make them look correct in blen

paradoxImmobilizer

Member
OP
Newcomer
Joined
Jan 31, 2020
Messages
6
Trophies
0
Age
23
XP
62
Country
United States
Edit: Apparently GBAtemp has a max length for post titles. Oops.

I wasn't really sure if I should put this here or in one of the 3DS groups, so tell me if this is in the wrong place! I am also new to GBAtemp in general, so advice is appreciated!

A short while ago I managed to export a couple models and textures from a copy of Pokemon Ultra Moon with the intention of using them in Blender for animating. For the sake of this post I will be using Sylveon as an example. It renders correctly in Ohana3DS:
f_post_1.PNG
After extracting the model and the textures, I am left with these files:
f_post_2.PNG
However, while the model (model.dae) works correctly in Blender, I cannot figure out how to correctly apply the textures. This is the best I have been able to get, by applying the texture pm0767_00_Body_A1.tga.png to the Base Color field of BodyA01.mat:
f_post_3.PNG
Does anyone know how to get the textures to correctly apply to the model in Blender? Any help will be appreciated.
 
Last edited by paradoxImmobilizer,

1B51004

Well-Known Member
Member
Joined
Nov 23, 2020
Messages
413
Trophies
1
XP
2,200
Country
United States
Last edited by 1B51004,
  • Like
Reactions: paradoxImmobilizer

paradoxImmobilizer

Member
OP
Newcomer
Joined
Jan 31, 2020
Messages
6
Trophies
0
Age
23
XP
62
Country
United States
Thanks! I don't have access to my PC right now, but I will tomorrow and will try this then, and report back if I have any problems.

In the meantime, what is your problem?
 

1B51004

Well-Known Member
Member
Joined
Nov 23, 2020
Messages
413
Trophies
1
XP
2,200
Country
United States
Thank you!
I had recently ripped the RomFS from Ultra Moon using Citra. I have used other methods of ripping as well, but they all seemed to have the same problem. I'm using one of the pre-built version of Ohana3DS. My problem is that whenever I try to insert a model (or anything else), I either get a Invalid File Error or a long JIT debugging script. Would you happen to know how to fix this?
Thanks, 1B5
(Edit: While looking around, I found this video that might help.)
 
Last edited by 1B51004,

paradoxImmobilizer

Member
OP
Newcomer
Joined
Jan 31, 2020
Messages
6
Trophies
0
Age
23
XP
62
Country
United States
What files are you trying to load with Ohana (as in, what filenames)? can you take a screenshot of the errors and post them here?

You said you decrypted the RomFS, but did you unpack the bin file with the pokemon data (file a/0/9/4.bin)?
You should have a bunch of extracted bin files, with names like dec_00001.bin, dec_00002.bin, etc.
 
Last edited by paradoxImmobilizer,

1B51004

Well-Known Member
Member
Joined
Nov 23, 2020
Messages
413
Trophies
1
XP
2,200
Country
United States
Sorry for the long wait, didn't see your message on saturday.
Files decrypted by PK3DS, ripped using Citra
4_g.jpg
Ohana 3DS. If I am correct, this should be the model for Bulbasaur
ohana 3ds example.PNG
Error
error.PNG
Same file, same error in SPICA
error2.PNG
It could be I'm doing things in the wrong order, or I could just be dumb and not using the right file.
 
Last edited by 1B51004,

paradoxImmobilizer

Member
OP
Newcomer
Joined
Jan 31, 2020
Messages
6
Trophies
0
Age
23
XP
62
Country
United States
for me, the files in 4_g have the format file_[number].pc. What specific tool in pk3ds are you using to extract?

I will attach one of the bins from my copy of the extracted files (the model for Bulbasaur) - see if you can open it.
Also try opening a file other than 00000 on your copy.
 

Attachments

  • file_00001.zip
    150.4 KB · Views: 210

1B51004

Well-Known Member
Member
Joined
Nov 23, 2020
Messages
413
Trophies
1
XP
2,200
Country
United States
I was using this tool in PK3DS
tool.PNG
So when I tried your file, what I found out was interesting!
When i tried it in Ohana3DS it give me a debugging error. Specifically this
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.__Error.EndOfFile()
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadUInt32()
at Ohana3DS_Rebirth.Ohana.Models.BCH.peek(BinaryReader input)
at Ohana3DS_Rebirth.Ohana.Models.BCH.load(MemoryStream data)
at Ohana3DS_Rebirth.Ohana.Models.PocketMonsters.PC.load(Stream data)
at Ohana3DS_Rebirth.Ohana.FileIO.load(Stream data)
at Ohana3DS_Rebirth.Ohana.FileIO.load(String fileName)
at Ohana3DS_Rebirth.FrmMain.open(String fileName)
at Ohana3DS_Rebirth.FrmMain.MenuOpen_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: 2.0.0.0
Win32 Version: 2.0.50727.9151 (WinRelRS6.050727-9100)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Ohana3DS Rebirth
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/xxxxx/xxxxx/xxxxx/xxxxx/xxxxx/xxxxx/Ohana3DS%20Rebirth.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.9136 (WinRelRS6.050727-9100)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.9147 (WinRelRS6.050727-9100)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.9136 (WinRelRS6.050727-9100)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.9153 (WinRelRS6.050727-9100)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.9136 (WinRelRS6.050727-9100)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.9136 (WinRelRS6.050727-9100)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.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.
didnt work.PNG
However when I put it into SPICA, I got this!
upload_2020-12-2_15-34-31.png
While it is spooky and reminds me of something that came out of a creepypasta, it certainly is a step towards progress!
Does this mean I need to convert the .bin files to .PC files?
(PS: How is your problem going? Did it get fixed yet?)
 
Last edited by 1B51004,

isthisrad

New Member
Newbie
Joined
Dec 13, 2020
Messages
1
Trophies
0
Age
23
XP
48
Country
United States
I made an account to answer this, in case you haven't figured it out. The Pokemon games mirror the body textures, so if you duplicate and mirror the half you already have it should map onto the Pokemon correctly. It'll look like this - originally this Rowlet texture was only the left half. Good luck!
 

Attachments

  • bodymirror.png
    bodymirror.png
    63.8 KB · Views: 269
  • Like
Reactions: 1B51004

paradoxImmobilizer

Member
OP
Newcomer
Joined
Jan 31, 2020
Messages
6
Trophies
0
Age
23
XP
62
Country
United States
Sorry for being gone for so long @1B51004 - My dad recently died of cancer and I had exams for college meaning that I haven't had much free time as of late.

One thing that you can try is downloading Microsoft DirectX (https://www.microsoft.com/en-us/download/details.aspx?id=35) and seeing if that fixes the JIT error in Ohana.

As for getting the .pc files, I am a bit confused myself. I redid the process I did before and ended up with .bin files (dec_xxxxx.bin instead of file_xxxxx.pc) and Ohana3ds worked fine with them. Out of curiosity, I ran checksums and the .bin and .pc files were the exact same!
what.png
I am very confused as to why I got different names/extensions for the exact same files.

After trying installing DirectX, the other thing I would reccommend is (re)xtracting the .bin/.pc files.

I will try and be really detailed here in case anyone else who is troubleshooting comes across this and doesn't know how to use pk3DS.

SETUP: You will need to have extracted the RomFS from your game. You will also need to download and open pk3DS (https://projectpokemon.org/home/forums/topic/34377-pk3ds-xy-oras-rom-editor-and-randomizer/).

1) After extracting the RomFS, navigate to the folder (extracted RomFS location)\a\0\9\ (You will likely not have the 4_g folder unless you already extracted the files.)
halp1.png
1.5) If you do have a 4_g folder, delete it.
halp2.png
2) Select the Tools menu in pk3DS
halp3.png
3) Select Misc Tools, and then select (un)Pack + BCLIM from the submenu.
halp5.PNG
You should now have a window that looks like this:
halp6.png
4) Drag the file labled 4 inside the a\0\9 folder and drop it in the top box of the new window in pk3ds.
halp7.PNG
A green progress bar will begin to increase right below the box where we dropped the 4 file.
halp7.5.PNG
Once it finishes, you will get a message saying that it completed successfully. You should now have a folder labeled 4_g in the same folder that the 4 file was in. You may have to refresh the file explorer view to see it (go up one folder to a\0 and then back into a\0\9)
halp7.9.PNG
5) Enter the folder. You should see a bunch of files with the name format dec_xxxxx.bin or file_xxxxx.pc
halp8.png halp8.5.PNG
Note the 00000.bin file in both folders. This folder does not contain any pokemon data and can cause errors if you try to open it in Ohana. You can safely delete or ignore it.
 
  • Like
Reactions: 1B51004

1B51004

Well-Known Member
Member
Joined
Nov 23, 2020
Messages
413
Trophies
1
XP
2,200
Country
United States
Sorry for being gone for so long @1B51004 - My dad recently died of cancer and I had exams for college meaning that I haven't had much free time as of late.

One thing that you can try is downloading Microsoft DirectX (https://www.microsoft.com/en-us/download/details.aspx?id=35) and seeing if that fixes the JIT error in Ohana.

As for getting the .pc files, I am a bit confused myself. I redid the process I did before and ended up with .bin files (dec_xxxxx.bin instead of file_xxxxx.pc) and Ohana3ds worked fine with them. Out of curiosity, I ran checksums and the .bin and .pc files were the exact same!
View attachment 238364
I am very confused as to why I got different names/extensions for the exact same files.

After trying installing DirectX, the other thing I would reccommend is (re)xtracting the .bin/.pc files.

I will try and be really detailed here in case anyone else who is troubleshooting comes across this and doesn't know how to use pk3DS.

SETUP: You will need to have extracted the RomFS from your game. You will also need to download and open pk3DS (https://projectpokemon.org/home/forums/topic/34377-pk3ds-xy-oras-rom-editor-and-randomizer/).

1) After extracting the RomFS, navigate to the folder (extracted RomFS location)\a\0\9\ (You will likely not have the 4_g folder unless you already extracted the files.)
View attachment 238373
1.5) If you do have a 4_g folder, delete it.
View attachment 238374
2) Select the Tools menu in pk3DS
View attachment 238380
3) Select Misc Tools, and then select (un)Pack + BCLIM from the submenu.
View attachment 238377
You should now have a window that looks like this:
View attachment 238378
4) Drag the file labled 4 inside the a\0\9 folder and drop it in the top box of the new window in pk3ds.
View attachment 238379
A green progress bar will begin to increase right below the box where we dropped the 4 file.
View attachment 238381
Once it finishes, you will get a message saying that it completed successfully. You should now have a folder labeled 4_g in the same folder that the 4 file was in. You may have to refresh the file explorer view to see it (go up one folder to a\0 and then back into a\0\9)
View attachment 238382
5) Enter the folder. You should see a bunch of files with the name format dec_xxxxx.bin or file_xxxxx.pc
View attachment 238384 View attachment 238383
Note the 00000.bin file in both folders. This folder does not contain any pokemon data and can cause errors if you try to open it in Ohana. You can safely delete or ignore it.
Oh, sorry to hear that. I hope you and your family will be okay and that you will pass/ did pass your exams.
I'll try your instructions also. I may need to swap over to a different computer though. Shouldn't be a problem.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/@legolambs