Help:Replacing models: Difference between revisions

Add Blender instructions
(→‎Troubleshooting: Resident Actor question (FAQ? Meh))
(Add Blender instructions)
Line 8: Line 8:
*[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) If you are using 3ds Max, 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]
Line 26: Line 26:


===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. Blender's layout for this step is almost identical.]]
<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. Then, go to File -> Import, and import the DAE model you extracted from the SBFRES. 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 (or whatever part you are working with). Once you have finished the "Export Your Rigged Model" step, return here to repeat the process for other models.
You may get errors when you import - this is normal, you can ignore them.
You may see errors when you import with 3ds Max - this is normal, you can ignore them. Blender suppresses these errors, so you won't see them.
Combine the original model's objects, roughly along the lines of how your objects are. For example, if the original model has separate fingers, hands, and arms, and your model has separate hands and arms, combine the fingers with the hands. Or if your model is only a single object, combine all the original model's objects into a single object. In 3ds Max, you can do this with Command Panel -> Modify -> Edit Geometry -> Attach, and selecting the object to attach the selected object to. In Blender, you can do this by selecting multiple objects with Ctrl+click in Object mode, then right-clicking and selecting Join.


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.
Line 35: Line 36:
[[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.
If your model has more objects than the original, delete unnecessary objects - for example, the torso and head, if you are modeling the legs right now - and combine necessary objects until you have the same number of objects.
There are also plenty of tools in 3ds Max's Edit Poly/Mesh modes, or Blender's Sculpt mode for helping move the model around. In 3ds Max, you can right click on the Edit Mesh/Poly to convert between them. In Blender, one of Sculpt mode's tools is the Pose tool, which is quite good for moving limbs into place if you're modifying an armor.


If your model has fewer objects, do not worry, you'll be fine. Simply pick a few of the original objects to align with, and ignore the rest.
Rename your objects to something close to the original's, so that you can easily figure out which of your objects corresponds to which original object. This will help both during this step and later, during the "Replace the Original Model with Yours" step. For example, if you have an object for hair, it's encouraged to name it <code>Hair_###__Mt_Hair_###</code>, where ### is the number of the armor you might be working with, and Mt_Hair_### is the name of the material you want to use with it. Including the name of the material in the object is helpful so that when you need to reassign materials in Switch Toolbox (which you may have to do often, depending on how much trouble you have) you will be able to tell, straight away, which object needs which material.
 
Rename your objects to something close to the original, so that you can easily figure out which of your objects corresponds to which original object. This will help both during this step and later, during the "Replace the Original Model with Yours" step.


Note: If you need help with this step, there are many great tutorials on YouTube.
Note: If you need help with this step, there are many great tutorials on YouTube.




===Copy the Rig from the Original to Your Model===
===Apply 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: Apply 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>For 3ds Max: Select the original object's Skin modifier 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. 3ds Max uses one or more of a series of algorithms to map the rig of one object onto the rig of another object automatically, and it's generally pretty good about it.
After pasting the rig onto an object, set the limit for the number of bones to affect each vertex to the original skin limit. In 3ds Max, you can do this by scrolling the modifier rollout on the right side down to the bottom, expanding Advanced Parameters, and setting the number in the Bone Affect Limit box. Other programs will have different ways of setting this limit.
For Blender:
* Click and drag the object on top of the original object's Armature (the one with the orange upside-down triangle next to it), while holding shift and alt. This will assign the object to that armature, instead. Then, select the object in Object mode, go to the Modifiers tab (which looks like a diagonal wrench, in the bottom right area), click on the box next to Object, and select the armature of the original model.
* Select your object in Object mode. In the bottom right, click on the upside-down green triangle. If there is anything in the Vertex Groups tab, delete it all with the - button. Then, Ctrl+click the original object that most closely matches its location. Go into Weight Paint mode, click on the Weights button in the top left, and select Transfer Weights. In the bottom left, expand the new small tab there, if it is not already. For Vertex Mapping, select Nearest Face Interpolated. For Source Layers Selection, select All Groups.
 
After applying the rig onto an object, set the limit for the number of bones to affect each vertex to 4. In 3ds Max, you can do this by scrolling the modifier rollout on the right side down to the bottom, expanding Advanced Parameters, and setting the number in the Bone Affect Limit box. In Blender, you can do it with the Limit Total option, found right under the Transfer Weights option described earlier. Other programs will have different ways of setting this limit.
 
You also want your weights to be normalized. In 3ds Max, the weights are normalized by default. In Blender, in Weight Paint mode, you need to click on the screwdriver-and-wrench icon in the middle of the right side, expand Options, and select Auto Normalize.


If you get the model into the game and the animations deform the model in strange ways, you'll need to come back and manually adjust the rigging, which is a very time-consuming process, documented in a number of excellent tutorials on YouTube.
If you get the model into the game and the animations deform the model in strange ways, you'll need to come back and manually adjust the rigging, which is a very time-consuming process, documented in a number of excellent tutorials on YouTube.
Line 56: Line 61:
===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 and your model's skeleton (if any), leaving just your objects and the original skeleton. Rename your objects.</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.
It's also a good idea to rename the your objects to the names of the objects they're replacing. Though this isn't strictly necessary to get the replacement model to work, it can really help smooth things out later.
It's also a good idea to rename the your objects to names that describe what they are for. In Blender, renaming the upside-down orange triangle doesn't do it, you have to expand that and rename the upside-down green triangle. Though this isn't strictly necessary to get the replacement model to work, it can really help smooth things out later.




Line 66: Line 71:
===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. It has an option for FBX as well, and as it receives updates regularly, FBX or other formats 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. CSV is only recommended if your exporter cannot export DAE or FBX for whatever reason.


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]. (If the video is down, you basically just import the DAE and then export it as either DAE again or FBX.)
Switch Toolbox now handles DAE's from Blender just fine, so there is no longer any need to use Autodesk FBX Converter, as was originally described here.


====Export the Model using CsvExportRewrite====
====Export the Model using CsvExportRewrite====
Line 111: Line 116:


====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.{{Check}} 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 very strange. Link's original eyes are placed correctly, but exporting them will cause them to be placed incorrectly in any 3d modeling program, and reimporting unchanged eyes will cause them to appear in a different place. However, the game will load them as if they were in the correct place. It is generally not advised to move the eyes unless absolutely necessary, as there is no single way to make them work consistently.
[[Category:Guides]]
[[Category:Guides]]
autopatrol, editnews
201

edits