Model Importing Tutorial
This page will teach you how to import models properly into SMG1/2. No editing .btk and .btp, however these will have their own tutorial at some point!
Contents
Programs you'll be needing
Program Name | Program Function |
---|---|
SuperBMD | Import/Export Models |
J3DView | Viewing Models |
KCLCreate | Creating Collision |
WiiExplorer | Packs files into an Arc |
Whitehole | Level Editing/bcsv Editing |
Notepad++ | Editing Material Data |
Blender | 3D modelling |
Note: Some tools aren't SMG1/2 hacking specific and thus are not found on the wiki!
Files you'll encounter
File type | Wiki or not |
---|---|
.bdl | Found on Wiki |
.kcl | Found on Wiki |
.pa | Found on Wiki |
.arc | Found on Wiki |
.bti | Found on Wiki |
.bcsv | Found on Wiki |
.json | Not found on Wiki |
.obj | Not found on Wiki |
.mtl | Not found on Wiki |
.fbx | Not found on Wiki |
.dae | Not found on Wiki |
Note: Please refer to the wiki for information on these filetypes!
Note: Files not found on the wiki aren't part of SMG1/2 filesystem!
Preparing your material data
Firstly:
-Drag a Nintendo .bdl onto SuperBMD. It should dump textures, a .dae and two .json files.
-What you want to focus on is the two .json Files.(Please refer to image 1).
-You want to open the one that says: <yourmodel>_materials.json in Notepad++.
-Next you want to find the materials you need and copy them down somewhere (do bear in mind a single material is quite long).
-Finally create and new text file in Notepad++ and open it with a squared bracket [ and paste your materials inside. Then close it off with a squared bracket ].
-Make sure you save your file as a .json!
-For reference set your .json up like this:
[ { mat1 }, { mat2 } ]
Note: mat2 has no comma on the end, as the last material in your .json doesn't need one!(Please refer to Image 2).
Secondly:
-Open <yourmodel>tex_header.json in Notepad++ and copy down the textures which are required for your selected materials.
-Next open a new text document in Notepad++ and open it with a squared bracket [ and then paste your textures in and close it off again with a squared bracket ].
-Make sure you save your file as a .json!
-For reference set your .json up like this:
[ { All the contents of the texture 1 }, { All the contents of the texture 2 } ]
Note: texture 2 has no comma on the end, as the last material in your .json doesn't need one!(Please refer to Image 3).
Configuring your model in blender
Firstly:
-You'll want to make sure that your model is scaled correctly (Note: to do this I tend to use a model for reference, like Mario. Also, in blender the default is 1:1 while SMG2 uses 1:1000). Make sure to scale your model in edit mode and not object mode. You'll know if you scaled an object in edit mode because the scale values would have changed.(Please refer to Image 4).
Note: Scale values must all be 1!
Secondly:
-You want to make sure that you have applied your materials to your model. In order to view what materials have been applied where, you need to switch to your material viewport.(Please refer to Image 5).
Lastly:
-You need to export 2 versions of your model:
-One as an .fbx (which will be converted to your .bdl later)
-The other as an .obj (which will be your .kcl and .pa collision files). However, before you export your models make sure you triangulate them. This can be done using a triangulate modifier.(Please refer to Image 6 and 7).
Importing the Model
Firstly: -You want to create your .bdl with SuperBMD. For this you will need your .fbx, mat.json and your texheader.json!
-You first need to open CMD do this:
<SuperBMD.exe> <inputmodel> --mat <mat.json> --texheader <texheader.json> --rotate
-After this hit enter and it should start to build your model! Any errors should display in the window, so go back and make sure you followed the steps correctly if any errors were made!(Please refer to image 8).
Secondly:
Once you have a .bdl you need to open it in J3DView. It is here you might notice some of your mipmaps aren't working. If this is the case you need replace said .bti with the .bti from the original
model (Do this for all .bti that need it).(Please refer to Image 9).(Do note this step exists more as a fail safe in case you forgot to import a model with a material that uses mipmaps and you have the bti on hand).
Note: You’ll know if it’s broken because some material settings will not have copied over (image levels as an example).
Creating Collision
-Grab your .obj (with its packaged .mtl) you exported earlier. You want to open your .obj (which must have the .mtl in the same directory) inside KCLCreate, and there it should display all your materials. -Here you can set the sound type for the ground (and walls) and possible effects (for example fire damage) for each material. Once you're done, hit file -> export and it should create a .kcl and .pa file!(Please refer to Image 10).
Packing it into an ARC and loading it in-game
Firstly: Name the .bdl, .kcl and .pa the same and put them in a folder of the same name. Then use Arc Packer of choice to pack it into a Nintendo Archive and put it in your ObjectData Folder!(Please refer to Image 11).
Finally: Open your PlanetMapDataTable.bcsv (located inside your PlanetMapDataTable.arc) in your preferred bcsv editor (I use the one built into Whitehole) and add an entry with the name of said model (without typing its file extension aka .arc).(Please refer to Image 12).
Reference Images
Outro
Presto you have successfully imported a model properly. I hope this was clear and you enjoy importing all kinds of wacky models into the game!
Thanks to TheSunCat and Islender for helping with the English translation!
Further questions:
-LW (Lumasworkshop) Discord server: https://discord.gg/k7ZKzSDsVq
-My Discord Tag: Luma48#5200
Alpha Blending: This section is a WIP
Correct alpha blending depends on: - Mesh order - Material names (The game seems to render materials in alphabetical order)