autopatrol, editnews
232
edits
(Add Blender instructions) |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
===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.]] | ||
[[File:ModelReplacement VertexBuffers.png|thumb|Select the object (left) and read the vertex buffers (right)]] | |||
<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. | ||
In order to obtain a rig, you should find the SBFRES archive for the model you wish to use a rig from. Most models are contained in the game files in the content\Model folder. Once you've chosen your SBFRES, copy it to a safe place away from the game files, so you don't accidentally modify any of the original game's files. | In order to obtain a rig, you should find the SBFRES archive for the model you wish to use a rig from. Most models are contained in the game files in the content\Model folder. Once you've chosen your SBFRES, copy it to a safe place away from the game files, so you don't accidentally modify any of the original game's files. | ||
Line 47: | Line 48: | ||
<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. | <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. | ||
For Blender: | 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. | * 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), and in the box that says Armature at the top, click on the box next to Object, and select the armature of the original model. If there is no box that says Armature at the top, click on Add Modifier and select Armature. There is now a box that says Armature at the top. | ||
* 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 | * 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 By Name. For Destination Layers Matching, select All Layers. | ||
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. | 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. | ||
Line 55: | Line 56: | ||
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. | ||
===Delete the Original Model's Objects=== | ===Delete the Original Model's Objects=== | ||
Line 85: | Line 83: | ||
A dialog window of import options will appear. The picture to the right contains settings for most armors, but you should generally match the formats you copied down in the first step of this tutorial. | A dialog window of import options will appear. The picture to the right contains settings for most armors, but you should generally match the formats you copied down in the first step of this tutorial. | ||
Red box: Generally leave these unchecked. If your textures look all funky, try reimporting with Flip UVs. If you import and the model is not looking at you, but is instead face-down, reimport with Rotate -90 degrees checked. If you import and the model is face-up, use Rotate 90 degrees. If you modified the skeleton, use Import Bones. (It's possible that skeletons exported from Blender may not import correctly if you don't | Red box: Generally leave these unchecked. If your textures look all funky, try reimporting with Flip UVs. If you import and the model is not looking at you, but is instead face-down, reimport with Rotate -90 degrees checked. If you import and the model is face-up, use Rotate 90 degrees. If you modified the skeleton, use Import Bones. (It's possible that skeletons exported from Blender may not import correctly if you don't export as FBX.) | ||
Orange box: Keep Original Skin Count will be disabled by default in order to help avoid model stretching issues, but if your weights did not change then you can check this box to help solve some issues. Always check Map Original Materials. If you are importing from DAE or FBX, then you should check Use Original Attributes and Use Original Attribute Formats. If you checked those boxes and changed the names of the objects from the original model, pay special attention to the teal box instructions below. If you check those two boxes, then you can ignore the green and yellow box instructions below. | Orange box: Keep Original Skin Count will be disabled by default in order to help avoid model stretching issues, but if your weights did not change then you can check this box to help solve some issues. Always check Map Original Materials. If you are importing from DAE or FBX, then you should check Use Original Attributes and Use Original Attribute Formats. If you checked those boxes and changed the names of the objects from the original model, pay special attention to the teal box instructions below. If you check those two boxes, then you can ignore the green and yellow box instructions below. | ||
Line 112: | Line 110: | ||
====Does this work for TitleBG.pack models?==== | ====Does this work for TitleBG.pack models?==== | ||
Yes. There's no functional difference between resident actors (those in TitleBG.pack, denoted by their presence in Bootup.pack's ResidentActors.sbyml file) and normal actors, save that resident actors are always loaded in memory, so they can be displayed without loading delays. This also means that if you've done something wrong, you'll notice the crashing at the title menu or first loading screen, instead of during gameplay. | Yes. There's no functional difference between resident actors (those in TitleBG.pack, denoted by their presence in Bootup.pack's ResidentActors.sbyml file) and normal actors, save that resident actors are always loaded in memory, so they can be displayed without loading delays. This also means that if you've done something wrong, you'll notice the crashing at the title menu or first loading screen, instead of during gameplay. | ||
====Why does the lighting on my model look weird?==== | |||
If you obtained your model - that is, the modded one that you are adding to the game - by extracting it using Switch toolbox as a DAE, then Blender versions from before Sept 24 2022 will fail to read vertex normals on import, and instead generate new ones. This is almost always undesirable, and will result in weird, splotchy shadows on your model. To fix this, update Blender. | |||
If you really don't want to update Blender for whatever reason, use the latest AutoDesk FBX Converter (available [https://aps.autodesk.com/developer/overview/fbx-converter-archives here], yes the latest version is from 2013) to convert the DAE to FBX first. | |||
Not that it's not necessary to convert the rig model, because you delete it. You only need to convert the final model that you will be importing. | |||
Note that once the vertex normals are messed up, converting to FBX won't fix anything. You have to convert it before the first time you transfer the working model from Switch Toolbox to your modeling program. | |||
===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!==== | ||
Splitting the eyes into two different objects may help to fix this. If not... | |||
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. | 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]] |