Difference between revisions of "Custom models"

From Pikmin Technical Knowledge Base
Jump to navigation Jump to search
m (Espyo moved page Custom Models to Custom models without leaving a redirect)
Line 1: Line 1:
 
In ''Pikmin 2'', the model files are .BMD and usually come with a .BTK. These files can easily be viewed using J3DModelViewer or any other Nintendo 3D model viewer.
 
In ''Pikmin 2'', the model files are .BMD and usually come with a .BTK. These files can easily be viewed using J3DModelViewer or any other Nintendo 3D model viewer.
 +
"Mostly complete guide"
  
NOTE: EXPLANATION WILL BE ADDED SOON, CURRENTLY JUST SHOWING HOW TO DO IT
 
 
== Guide ==
 
== Guide ==
 
=== Tools ===
 
=== Tools ===
First you'll need the appropriate tools in order to create your custom area models.
+
First you'll need the appropriate tools in order to create your custom models.
* ArcExtract/Pack
+
For the mode:
* SunshineImporter (yes, this works for Pikmin 2 as well) - https://egaddsworkshop.com/forums/showthread.php?tid=6
+
* ArcExtract/Pack (and yaz0fast if you want smaller ARC files)
* Sketchup (other modeling programs don't seem to work with textures/scaling and this is free anyway)
+
* BMDCubed[https://github.com/Sage-of-Mirrors/BMDCubed]
* TriangulateFaces (Sketchup Extension) - http://egaddsworkshop.com/forums/showthread.php?tid=12
+
* 3ds Max 2015[https://www.autodesk.com/education/free-software/3ds-max] (other versions may work, however BMDCubed was created for the 2015 edition which can still be officially downloaded; register as a student for a free licence)
* J3DModelViewer (make sure you did the job right) - https://github.com/LordNed/J3D-Model-Viewer/releases
+
* J3DModelViewer[https://github.com/LordNed/J3D-Model-Viewer/releases] (other model viewers will not display anything or crash when you try to load your custom model)
And that's it!
+
 
 +
For the collision:
 +
* ArcExtract/Pack (and yaz0fast if you want smaller ARC files)
 +
* obj2grid (work-in-progress)
 +
* Python 3.3
 +
* 3D modelling program that can export .OBJ (3ds Max is fine, no need for multiple programs)
  
 
=== Process ===
 
=== Process ===
 
# Extract the area model from the arc.szs using ArcExtract (located in tutorial, forest, yakushima or last - ignore anything in zukan). Make sure that you keep the .BTK and delete the .BMD, remembering the name (model.bmd).
 
# Extract the area model from the arc.szs using ArcExtract (located in tutorial, forest, yakushima or last - ignore anything in zukan). Make sure that you keep the .BTK and delete the .BMD, remembering the name (model.bmd).
# Now, open Sketchup and CREATE YOUR MODEL! - This part is a bit... sketchy... sometimes you might have to reverse the faces, remember to check your .BDL (Step 8).
+
# Open up 3ds Max and create/import your model.
# Once you're satisfied with your model, you want to add textures. To add textures, go to the material editor (on the right by default) and click the "add material" button. Here you have a number of options but right under the "texture" tick box, press the button next to the text box and select your texture. Make sure its dimensions are to the power of 2 (64x64 works). Underneath is scaling of these textures (set to 0.1m by default), you can make this as big as you want depending on the dimensions of your texture. I found that 800 was good for my 64x64 texture. ''Keep in mind that the textures you use will affect file size, anything around 6 megabytes or more (use .BDL as reference) will crash!''
+
# Once you're satisfied with your model, you want to add textures. Make sure your texture's dimensions are to the power of 2 (64x64 works). ''Keep in mind that the textures you use will affect file size, anything around six megabytes or more will probably crash.''
# Now make sure you have installed the TriangulateFaces extension, to do this you just want to go to Extension Manager in Sketchup and click Install Extension, locate the .rbz from the .zip that you downloaded before and then right away the extension is installed. Now close Extension Manager and select ALL of your model (everything), click on the Extensions tab and click the Triangulate one, you'll immediately notice that (unless you build your model with triangles) the entire model will have LINES EVERYWHERE! Without this, the BDL converter won't be able to get your textures right and the face will be invisible.
+
# Add editable poly to your model once you have attached all parts together, select the vertex option, select ALL points (Cntrl+A) and click the connect button to triangulate the faces.
# Once you're done you can go ahead and export as a 3D model and then choose OBJ. Name it what you want (model.obj works)
+
# Now we want to make sure that our pivot is centred, and so is the model. After you've done that, you will want to export your model as .OBJ (title it something simple like modelcol.obj) and export to wherever is easiest, it'll create multiple files but all we care about is the .OBJ.
# Wherever you exported the OBJ, there should also be a .MTL and a folder with your texture images. These are necessary and must be in the same location/have the same name as the .OBJ.
+
# Now back to 3ds Max, click the rotate tool (or right-click your model and click rotate). In the top-right, set your view to right (click and drag to change your view, and click the face on the cube that says 'RIGHT') and then you want to rotate the object -90 degrees on the x-axis. Then go to the utilities tab on the right, click X-form, and then 'x-form selected'. Go ahead and export the model again as a .DAE file and simply title it model.dae.
# You can now open up SunshineImporter. The first step of this is to create a BDL, choose your OBJ and then choose your output. Click convert and you should now have a .BDL in the location of your .OBJ.
+
# To create your BMD model, open the BMDCubed folder and there will be a .exe, if you did everything right; a simple drag and drop of your .DAE file should export a .BMD (model.bmd) in the same location as the .DAE. Now to quickly check your model to make sure everything worked, open up J3DModelViewer, and drag your .BMD file right onto the preview. Hold right-click and WASD to move around, if it looks good then you can just close J3D. To import your model, go back to an area folder or wherever in your Pikmin 2 files, find the arc folder and put back the model.bmd file.
# Now before you bother making the BMD, use J3DMovelViewer to check the .BDL and see if everything turned out right. Other model viewing programs may not display anything but this isn't actually a problem, just stick to J3DModelViewer (I'm using v1.1)
+
# To create the collision of your model, you'll need to download obj2grid.py; a python script written by Yoshi2 which converts a .OBJ into grid.bin and mapcode.bin files which are necessary for custom area map collision. You'll also need to install Python 3.3 and to make things easy, just drop obj2grid.py into your Python33 folder in your C drive.
# If your BDL looks good, then your BMD will too! Do the same thing but for the BDL to BMD converter part of SunshineImporter and you should get your BMD, check it again if you want to.
+
# Drop your modelcol.obj file into the Python33 folder as well, right-click inside the folder while holding shift and click 'run command window in this folder', command prompt should open up. Now all you need to type is <code>python.exe obj2grid.py modelcol.obj</code> and then you wait for it to generate the files. During this process, avoid clicking in the black abyss of command prompt otherwise the process will just stop and you won't even realise it.
# Now you just need to ArcPack this with the original texanm.BTK and then rebuild your Pikmin 2 ISO. Make sure it has the original name (model.bmd), same goes for arc.szs (rename from arc.arc to arc.szs)!
+
# Repeat what you did for the model (replace the grid.bin and mapcode.bin files in the texts folder) IF your grid.bin file does NOT exceed about 850kb. The largest official in-game grid.bin is only 650kb, however as I've tested around 800kb still works, any higher will crash the game. Using yaz0enc/yaz0fast will make the ARC smaller but it will not stop the game from crashing if the original grid is too big.
 
+
# Use ArcPack to create your arc.arc and texts.arc files, use yaz0fast to make them smaller if you desire and then just rename the extension to .szs as opposed to .arc (or .arc.yaz0 if you compressed it). Now run GC-Rebuilder to rebuild your ISO and run it!
CURRENTLY WE DO NOT HAVE ANY .BIN (collision) EDITOR SO IT'LL LOOK COOL BUT YOU WON'T BE ABLE To WALK ON YOUR MAP :(
 

Revision as of 14:36, 24 August 2017

In Pikmin 2, the model files are .BMD and usually come with a .BTK. These files can easily be viewed using J3DModelViewer or any other Nintendo 3D model viewer. "Mostly complete guide"

Guide

Tools

First you'll need the appropriate tools in order to create your custom models. For the mode:

  • ArcExtract/Pack (and yaz0fast if you want smaller ARC files)
  • BMDCubed[1]
  • 3ds Max 2015[2] (other versions may work, however BMDCubed was created for the 2015 edition which can still be officially downloaded; register as a student for a free licence)
  • J3DModelViewer[3] (other model viewers will not display anything or crash when you try to load your custom model)

For the collision:

  • ArcExtract/Pack (and yaz0fast if you want smaller ARC files)
  • obj2grid (work-in-progress)
  • Python 3.3
  • 3D modelling program that can export .OBJ (3ds Max is fine, no need for multiple programs)

Process

  1. Extract the area model from the arc.szs using ArcExtract (located in tutorial, forest, yakushima or last - ignore anything in zukan). Make sure that you keep the .BTK and delete the .BMD, remembering the name (model.bmd).
  2. Open up 3ds Max and create/import your model.
  3. Once you're satisfied with your model, you want to add textures. Make sure your texture's dimensions are to the power of 2 (64x64 works). Keep in mind that the textures you use will affect file size, anything around six megabytes or more will probably crash.
  4. Add editable poly to your model once you have attached all parts together, select the vertex option, select ALL points (Cntrl+A) and click the connect button to triangulate the faces.
  5. Now we want to make sure that our pivot is centred, and so is the model. After you've done that, you will want to export your model as .OBJ (title it something simple like modelcol.obj) and export to wherever is easiest, it'll create multiple files but all we care about is the .OBJ.
  6. Now back to 3ds Max, click the rotate tool (or right-click your model and click rotate). In the top-right, set your view to right (click and drag to change your view, and click the face on the cube that says 'RIGHT') and then you want to rotate the object -90 degrees on the x-axis. Then go to the utilities tab on the right, click X-form, and then 'x-form selected'. Go ahead and export the model again as a .DAE file and simply title it model.dae.
  7. To create your BMD model, open the BMDCubed folder and there will be a .exe, if you did everything right; a simple drag and drop of your .DAE file should export a .BMD (model.bmd) in the same location as the .DAE. Now to quickly check your model to make sure everything worked, open up J3DModelViewer, and drag your .BMD file right onto the preview. Hold right-click and WASD to move around, if it looks good then you can just close J3D. To import your model, go back to an area folder or wherever in your Pikmin 2 files, find the arc folder and put back the model.bmd file.
  8. To create the collision of your model, you'll need to download obj2grid.py; a python script written by Yoshi2 which converts a .OBJ into grid.bin and mapcode.bin files which are necessary for custom area map collision. You'll also need to install Python 3.3 and to make things easy, just drop obj2grid.py into your Python33 folder in your C drive.
  9. Drop your modelcol.obj file into the Python33 folder as well, right-click inside the folder while holding shift and click 'run command window in this folder', command prompt should open up. Now all you need to type is python.exe obj2grid.py modelcol.obj and then you wait for it to generate the files. During this process, avoid clicking in the black abyss of command prompt otherwise the process will just stop and you won't even realise it.
  10. Repeat what you did for the model (replace the grid.bin and mapcode.bin files in the texts folder) IF your grid.bin file does NOT exceed about 850kb. The largest official in-game grid.bin is only 650kb, however as I've tested around 800kb still works, any higher will crash the game. Using yaz0enc/yaz0fast will make the ARC smaller but it will not stop the game from crashing if the original grid is too big.
  11. Use ArcPack to create your arc.arc and texts.arc files, use yaz0fast to make them smaller if you desire and then just rename the extension to .szs as opposed to .arc (or .arc.yaz0 if you compressed it). Now run GC-Rebuilder to rebuild your ISO and run it!