Help:Replacing models: Difference between revisions
m
→Export the Model from Your Modeling Program
imported>CEObrainz |
imported>Ginger |
||
Line 3: | Line 3: | ||
This tutorial assumes you either have a model already, or will be editing one of the in-game models. It also assumes you will be replacing an in-game model, not making a new one. Pictures dealing with modeling programs are taken in 3ds Max, but similar options should be available in your program of choice. | This tutorial assumes you either have a model already, or will be editing one of the in-game models. It also assumes you will be replacing an in-game model, not making a new one. Pictures dealing with modeling programs are taken in 3ds Max, but similar options should be available in your program of choice. | ||
== Required Tools == | ==Required Tools== | ||
Model replacement in Breath of the Wild requires a set of tools. These tools will vary somewhat, based upon your personal preference, but the tools below are currently the most effective for properly modding the game. | Model replacement in Breath of the Wild requires a set of tools. These tools will vary somewhat, based upon your personal preference, but the tools below are currently the most effective for properly modding the game. | ||
* [https://github.com/KillzXGaming/Switch-Toolbox/releases Switch Toolbox] (Yes, even if you are using WiiU or Cemu) | *[https://github.com/KillzXGaming/Switch-Toolbox/releases Switch Toolbox] (Yes, even if you are using WiiU or Cemu) | ||
* A 3D modeling program of your choice (common choices are 3ds Max and Blender) | *A 3D modeling program of your choice (common choices are 3ds Max and Blender) | ||
* (optional) The [https://github.com/Aaaboy97/BotW-Tools/tree/master/CSV%20Exporting CSV export] script | *(optional) The [https://github.com/Aaaboy97/BotW-Tools/tree/master/CSV%20Exporting CSV export] script | ||
* (optional) If you are using 3ds Max, the [https://www.vg-resource.com/thread-29836.html BFRES importer] MaxScript may be helpful. (expand the "Wii U & Nintendo Switch - BFRES importer (originally by ItsEasyActually)" to find it) | *(optional) If you are using 3ds Max, the [https://www.vg-resource.com/thread-29836.html BFRES importer] MaxScript may be helpful. (expand the "Wii U & Nintendo Switch - BFRES importer (originally by ItsEasyActually)" to find it) | ||
* (optional) [https://github.com/Shadsterwolf/BotWUnpacker/releases BotWUnpacker] | *(optional) [https://github.com/Shadsterwolf/BotWUnpacker/releases BotWUnpacker] | ||
== Tutorial == | ==Tutorial== | ||
=== Obtaining a Rig === | ===Obtaining a Rig=== | ||
[[File:ModelReplacement_obtainRig.png|alt=Obtaining a rig|thumb|The red box shows what to click to extract a model.]] | [[File:ModelReplacement_obtainRig.png|alt=Obtaining a rig|thumb|The red box shows what to click to extract a model.]] | ||
<blockquote>Summary: Export a model from the SBFRES you want to use, using Switch Toolbox. Take note of the skin count and the vertex buffers and formats.</blockquote>A "rig" or "skeleton" is a set of "bones" that animations use. Every model is made up of several pieces: objects (which tells the game how to make the model in 3D), materials (which tell the game what the model should look like), and the rig (which tells the game how the model moves during animations). If you were to consider a door, the objects would be the rectangle for the main door and sphere of the knob, the materials would be the wood grain and brown coloring of the door and silver reflective surface of the knob, and the rig would be what tells the game that the knob rotates and the door swings inward. | <blockquote>Summary: Export a model from the SBFRES you want to use, using Switch Toolbox. Take note of the skin count and the vertex buffers and formats.</blockquote>A "rig" or "skeleton" is a set of "bones" that animations use. Every model is made up of several pieces: objects (which tells the game how to make the model in 3D), materials (which tell the game what the model should look like), and the rig (which tells the game how the model moves during animations). If you were to consider a door, the objects would be the rectangle for the main door and sphere of the knob, the materials would be the wood grain and brown coloring of the door and silver reflective surface of the knob, and the rig would be what tells the game that the knob rotates and the door swings inward. | ||
Line 25: | Line 25: | ||
Note: if you wish to export all the models in an SBFRES quickly, right-click on the Models folder instead and select Export All. | Note: if you wish to export all the models in an SBFRES quickly, right-click on the Models folder instead and select Export All. | ||
=== Import the Original to Your Workspace === | ===Import the Original to Your Workspace=== | ||
[[File:ModelReplacement_importModel.png|alt=Import the Original Model|thumb|Click on 1 to expand the menu, then click on 2 (or highlight 2 and click on 3) to import.]] | [[File:ModelReplacement_importModel.png|alt=Import the Original Model|thumb|Click on 1 to expand the menu, then click on 2 (or highlight 2 and click on 3) to import.]] | ||
<blockquote>Summary: Import the DAE into a shared workspace with your model, so that the object list has your objects, the original objects, and the original skeleton.</blockquote>Open your 3D modeling program of choice, and bring your replacement model into the workspace. Delete your model's skeleton from the object list, if it has one. Then, go to File -> Import, and import the DAE model you extracted. If you exported multiple models, only import the model you are currently working with. For example, if you exported an entire armor, you should only import the legs (as they are generally the simplest to do). Once you have finished the "Export Your Rigged Model" step, return here to repeat the process for other models. | <blockquote>Summary: Import the DAE into a shared workspace with your model, so that the object list has your objects, the original objects, and the original skeleton.</blockquote>Open your 3D modeling program of choice, and bring your replacement model into the workspace. Delete your model's skeleton from the object list, if it has one. Then, go to File -> Import, and import the DAE model you extracted. If you exported multiple models, only import the model you are currently working with. For example, if you exported an entire armor, you should only import the legs (as they are generally the simplest to do). Once you have finished the "Export Your Rigged Model" step, return here to repeat the process for other models. | ||
Line 32: | Line 32: | ||
In your object list, you will now see the original model's objects along with your objects. You will also see the original model's skeleton, which is important to have and you should generally not touch it. | In your object list, you will now see the original model's objects along with your objects. You will also see the original model's skeleton, which is important to have and you should generally not touch it. | ||
=== Align Your Model With the Original === | ===Align Your Model With the Original=== | ||
[[File:ModelReplacement_alignModel.png|alt=Align Your Model|thumb|Select your model (1), select the mesh (2), select the type of thing to modify (3), and select how to modify it (4).]] | [[File:ModelReplacement_alignModel.png|alt=Align Your Model|thumb|Select your model (1), select the mesh (2), select the type of thing to modify (3), and select how to modify it (4).]] | ||
<blockquote>Summary: Get your objects to match up with the original ones, as close as possible. Anything delicate is important: feet, hands/fingers, waists, necklines, handles of weapons, etc.</blockquote>In all likelihood, your model will differ greatly from the original you just imported. Using the Move, Rotate, and Scale tools, make sure your model lines up with the original's - the closer the better. | <blockquote>Summary: Get your objects to match up with the original ones, as close as possible. Anything delicate is important: feet, hands/fingers, waists, necklines, handles of weapons, etc.</blockquote>In all likelihood, your model will differ greatly from the original you just imported. Using the Move, Rotate, and Scale tools, make sure your model lines up with the original's - the closer the better. | ||
Line 44: | Line 44: | ||
=== Copy the Rig from the Original to Your Model === | ===Copy the Rig from the Original to Your Model=== | ||
[[File:ModelReplacement_copyRig.png|alt=Copy the Rig|thumb|Select the original object (1), right click on the Skin modifier and copy it (2), select your replacement object (3), and right click in the modifier area and paste the Skin modifier there (4).]] | [[File:ModelReplacement_copyRig.png|alt=Copy the Rig|thumb|Select the original object (1), right click on the Skin modifier and copy it (2), select your replacement object (3), and right click in the modifier area and paste the Skin modifier there (4).]] | ||
<blockquote>Summary: Copy the rig from the original object(s) to your object(s). Set maximum limit for bones to affect vertices to the object's skin count.</blockquote>Select the original object's rig (called the Skin modifier in 3ds Max) in the modifier list, then copy it. Select your object, then paste the rig onto it. If all has gone well, you're done with this step. Most modeling programs use one or more of a series of algorithms to map the rig of one object onto the rig of another object automatically, and they're generally pretty good about it. | <blockquote>Summary: Copy the rig from the original object(s) to your object(s). Set maximum limit for bones to affect vertices to the object's skin count.</blockquote>Select the original object's rig (called the Skin modifier in 3ds Max) in the modifier list, then copy it. Select your object, then paste the rig onto it. If all has gone well, you're done with this step. Most modeling programs use one or more of a series of algorithms to map the rig of one object onto the rig of another object automatically, and they're generally pretty good about it. | ||
Line 54: | Line 54: | ||
=== Delete the Original Model's Objects === | ===Delete the Original Model's Objects=== | ||
[[File:ModelReplacement_deleteObjects.png|alt=Delete Original Objects|thumb|The workspace has been cleared of the painted object, leaving only the custom, unpainted one and the skeleton.]] | [[File:ModelReplacement_deleteObjects.png|alt=Delete Original Objects|thumb|The workspace has been cleared of the painted object, leaving only the custom, unpainted one and the skeleton.]] | ||
<blockquote>Summary: Delete the original model's objects, leaving just your objects and the original skeleton. Rename your objects to the originals' names.</blockquote>Delete all the objects from your workspace that you don't want to be imported to the game. This includes any secondary objects not part of your final model, your model's skeleton (but not the original model's skeleton), and the original model's objects. | <blockquote>Summary: Delete the original model's objects, leaving just your objects and the original skeleton. Rename your objects to the originals' names.</blockquote>Delete all the objects from your workspace that you don't want to be imported to the game. This includes any secondary objects not part of your final model, your model's skeleton (but not the original model's skeleton), and the original model's objects. | ||
Line 64: | Line 64: | ||
=== Export the Model from Your Modeling Program === | ===Export the Model from Your Modeling Program=== | ||
[[File:ModelReplacement_exportModel.png|alt=Export Model|thumb|212x212px|Select the File menu (1), then click on export (2), or hover over it and click on Export (3).]] | [[File:ModelReplacement_exportModel.png|alt=Export Model|thumb|212x212px|Select the File menu (1), then click on export (2), or hover over it and click on Export (3).]] | ||
<blockquote>Summary: Fairly simple, export your model. DAE is probably best.</blockquote>Using File -> Export, export your model as whatever type you wish. Switch Toolbox, as of writing this guide, only handles DAE properly. However, it has options for FBX and OBJ as well, and as it receives updates regularly, FBX and OBJ may become properly handled at any time. | <blockquote>Summary: Fairly simple, export your model. DAE is probably best.</blockquote>Using File -> Export, export your model as whatever type you wish. Switch Toolbox, as of writing this guide, only handles DAE properly. However, it has options for FBX and OBJ as well, and as it receives updates regularly, FBX and OBJ may become properly handled at any time. | ||
It also has an option for importing via CSV (which is not a model type) that is explained in the optional step, below. | It also has an option for importing via CSV (which is not a model type) that is explained in the optional step, below. | ||
If exporting in the DAE format to maintain and enable the usage of correct weightings it is preferred that you use [https://softfamous.com/autodesk-fbx-converter/ Autodesk FBX Converter] as shown in [https://www.youtube.com/watch?v=OsjLow2OHcU&feature=emb_logo this guide]. | If exporting in the DAE format with Blender, to maintain and enable the usage of correct weightings it is preferred that you use [https://softfamous.com/autodesk-fbx-converter/ Autodesk FBX Converter] as shown in [https://www.youtube.com/watch?v=OsjLow2OHcU&feature=emb_logo this guide]. | ||
==== Export the Model using CsvExportRewrite ==== | ====Export the Model using CsvExportRewrite==== | ||
<blockquote>Summary: In 3ds Max, use MAXScript -> Run Script... to run CsvExportRewrite.ms and save the model data as a CSV file.</blockquote>Some people - the author included - have trouble with 3ds Max crashing when it tries to export models. For us, there is a MAXScript that exports the model as text, which Switch Toolbox can also use. In the toolbar use the MAXScript menu and select Run Script. Select the CsvExportRewrite script. A small box will pop up with a list of all the objects in your workspace. It has options to "Copy UVs" and "Explicit Normals" for each object. Copy UVs is disabled by default, and Explicit Normals is enabled by default. These settings should suffice, though if you end up with strange textures in game, try re-exporting with Copy UVs checked. | <blockquote>Summary: In 3ds Max, use MAXScript -> Run Script... to run CsvExportRewrite.ms and save the model data as a CSV file.</blockquote>Some people - the author included - have trouble with 3ds Max crashing when it tries to export models. For us, there is a MAXScript that exports the model as text, which Switch Toolbox can also use. In the toolbar use the MAXScript menu and select Run Script. Select the CsvExportRewrite script. A small box will pop up with a list of all the objects in your workspace. It has options to "Copy UVs" and "Explicit Normals" for each object. Copy UVs is disabled by default, and Explicit Normals is enabled by default. These settings should suffice, though if you end up with strange textures in game, try re-exporting with Copy UVs checked. | ||
When you select export, 3ds Max will stop responding for a little bit as it exports, then it will respond again. When it responds, check the csv file it created. If it is empty, go through all of your objects, collapse or delete any modifiers that aren't the Skin modifier, Edit Normals modifier, or Editable Mesh, then select the Skin modifier for every object so that the modifiers background is dark grey (not blue), and then export again to a different file. It will fail again if you try to export to an empty file it has previously created, unless you've restarted 3ds Max since it created that file. | When you select export, 3ds Max will stop responding for a little bit as it exports, then it will respond again. When it responds, check the csv file it created. If it is empty, go through all of your objects, collapse or delete any modifiers that aren't the Skin modifier, Edit Normals modifier, or Editable Mesh, then select the Skin modifier for every object so that the modifiers background is dark grey (not blue), and then export again to a different file. It will fail again if you try to export to an empty file it has previously created, unless you've restarted 3ds Max since it created that file. | ||
=== Import the Model Using Switch Toolbox === | ===Import the Model Using Switch Toolbox=== | ||
[[File:ModelReplacement_importOptions.png|thumb|The list of import options Switch Toolbox displays.]] | [[File:ModelReplacement_importOptions.png|thumb|The list of import options Switch Toolbox displays.]] | ||
<blockquote>Summary: Replace the original model in Switch Toolbox.</blockquote>If you didn't leave Switch Toolbox open, reopen it now, and reopen the SBFRES you got the original model from. Right-click on the model that you want to replace, select Replace, and select the file you exported from your modeling program. | <blockquote>Summary: Replace the original model in Switch Toolbox.</blockquote>If you didn't leave Switch Toolbox open, reopen it now, and reopen the SBFRES you got the original model from. Right-click on the model that you want to replace, select Replace, and select the file you exported from your modeling program. | ||
Line 92: | Line 92: | ||
Once you've set all your import options, switch back to the Model Settings tab and hit Save. | Once you've set all your import options, switch back to the Model Settings tab and hit Save. | ||
=== Verify the Model Looks Good and Save === | ===Verify the Model Looks Good and Save=== | ||
[[File:ModelReplacement_verifyStage.png|alt=Verify|thumb|Verify that the model looks good in the viewer (2) and that the right material (3) is assigned to each object (1)]] | [[File:ModelReplacement_verifyStage.png|alt=Verify|thumb|Verify that the model looks good in the viewer (2) and that the right material (3) is assigned to each object (1)]] | ||
<blockquote>Summary: Check the model in the viewer for dropped weights, and check the material assignments. If it all looks good, save it.</blockquote>Double check the model in the viewer to ensure that it has imported correctly. If it is face-down on its front or face-up on its back, reimport it. If pieces of the model are stretching to the "origin" (the center of the viewer space), then some vertices weren't properly weighted and you need to find them and re-rig them. If the model is wavy, where it should be straight, then you probably imported with 16 bit or 32 bit weights, and need to reimport with Blend Weights format Format_8_8_8_8_UNorm. | <blockquote>Summary: Check the model in the viewer for dropped weights, and check the material assignments. If it all looks good, save it.</blockquote>Double check the model in the viewer to ensure that it has imported correctly. If it is face-down on its front or face-up on its back, reimport it. If pieces of the model are stretching to the "origin" (the center of the viewer space), then some vertices weren't properly weighted and you need to find them and re-rig them. If the model is wavy, where it should be straight, then you probably imported with 16 bit or 32 bit weights, and need to reimport with Blend Weights format Format_8_8_8_8_UNorm. | ||
Line 101: | Line 101: | ||
Once all that is done, you're all set. Hit save. Your SBFRES now has your custom model and is ready to be loaded into the game! | Once all that is done, you're all set. Hit save. Your SBFRES now has your custom model and is ready to be loaded into the game! | ||
== Troubleshooting == | ==Troubleshooting== | ||
{{empty section}} | {{empty section}} | ||
=== Object Placement Issues === | ===Object Placement Issues=== | ||
==== My eyes are in the model's head, but they aren't in game! ==== | ====My eyes are in the model's head, but they aren't in game!==== | ||
Eyes are placed inside the model's head by animations, not vertex positions. You need to place eyes in a very strange position in your modeling program in order to make them appear properly in game. Look at Link's model in Link.sbfres to see the location for Link. Other characters have similar placement for their eyes, relative to their head. | Eyes are placed inside the model's head by animations, not vertex positions. You need to place eyes in a very strange position in your modeling program in order to make them appear properly in game. Look at Link's model in Link.sbfres to see the location for Link. Other characters have similar placement for their eyes, relative to their head. | ||
[[Category:Guides]] | [[Category:Guides]] |