Jump to content

[Tutorial] Importing Custom Models, Model Editing


UberGrainy

Recommended Posts

WORK IN PROGRESS

There's a lot to write, so it's going to take a while.

Decided to post this in the meantime because it has solutions to weird problems people may be stuck on.

 

Changelog:

- Finished explaining how to export as shapekey.

- Updated and added some troubleshooting stuff.

- Added important note about material limit in the MOD3 file.

- Added step to make sure mesh is assigned to armature before exporting to FBX.

- Corrected UV name from main_uv_layer to main_uv_texture

- Added more troubleshooting explaining possible import/export and texture/UV problems.

- Elaborated further on the texture stretching problem.

- Added recommended tools section.

- Added suggestion to combine textures and redo UVs to match, in order to counter model material limits.

- Added some tips on vertex editing and how to use the 2d/3d cursor to control axis.

- Added warning that the DOA5 tool "Keep Normals" may actually be breaking normals for MHW models.

- Updated info about importer/exporter. CrazyT fixed the bug preventing the latest version from exporting.

- Added some info on how to fix texture problems (checkerboard pattern, etc).

 

Well, I was writing this and then some hotkey opened another browser window, I tried to close it and it closed this window too. Lost everything. So now I have to write it all over again. This time I'm going to write it in another program and paste it in here after.

Possible:
- Import new models, regardless of vert count. But there are some weird possible issues (see Troubleshooting below).
- Reweight models. There's a problem with TransferWeights (see Troubleshooting below).
- Import new textures of any size. All types of textures supported.
- Edit and add new materials to the MRL3, based on existing shaders. Fur, glow, shine, skin, color customization, etc.
- Limited physics editing. Not much is known about the physics formats.
- Limited bone editing. Possible to repurpose unused bones, and change rotation/position for some bones.
- Breakable parts, such as cutting tail.
- Editing monster behavior and movesets. Hex seems to be doing this in his Hex World mod, although I haven't tried it myself.
- Effect swapping and possibly editing (I don't know how much about it).
- Sounds and BGM. Some sound files can't be edited, and most BGM are in a single large archive. Newly added BGM may be in separate files (ie. Behemoth theme). I also heard looping doesn't work properly.

Not possible (currently, as far as I know):
- Animation editing.
- Adding more materials to the MOD3. Which means you have to make do with the number of materials in the MOD3 (you can redirect these in the MRL3).
- New bones, new skeleton, etc. Note that bones don't have names, just numbers.
- Cannot scale model/skeleton. But it is possible to change monster scale by editing the monster data elsewhere (ask Hex).
- Cannot seem to raise skeleton to mimic high heels. I tried hacking up a skeleton in a hex editor, but couldn't figure out how.
- Overriding how the game decides which parts to hide when equipping mantles, or each Palico equipment. Nobody has figured out where the game defines these.

Not sure if possible:
- Editing elements, weak points, etc. Hex would probably know.
- Not sure what the limit is on bone influences. In general you should edit weights with "Auto-Normalize" on, and maybe use the Clean and Normalize All functions to fix weights.
- Defining which color channel is customizable. I think there's a general file that does it, but that file likely gets updated on every update.

There seems to be multiple types of skeletons. In NPCBS019 (Gathering Hub Girl swimsuit) the "movement" skeleton seems to have condensed data for each bone. Whereas usually each bone's rotation/position data are usually spread out over several lines. I've yet to figure this out.

 

 

Recommended tools to use:

Blender 2.79b (make sure you're using 2.79 for minimal incompatibility issues)
https://www.blender.org/

CrazyT's import/export tool. Nexus link is here (some helpful info in the description): https://www.nexusmods.com/monsterhunterworld/mods/242

I recommend trying the latest version on Github: https://github.com/TheCrazyT/BlenderMhwModelImporter

But if you seem to have problems no matter what, try this version: https://github.com/TheCrazyT/BlenderMhwModelImporter/tree/b3691996b35537ed03587ad7d951f709038c2c59

Yavne. You need this to fix weird shading, visible seams between combined model parts, etc.
https://github.com/fedackb/yavne

Dtk mnr's Blender 2.79 tools for DOA5LR:
https://www.mediafire.com/folder/9zi2gt8dyllaj/doa5mod#mc91ipeghb8r6
Keep Vertex Normals. keeps vertex normals while editing. WARNING: may actually be breaking normals.
Transfer Vertex Data. can transfer selected weights, but doesn't work well if the mesh is too different. You can use transfer weights and then "revert" some parts from a backup mesh, using Transfer Vertex Data.
Vertex Groups Utilities. Haven't used this yet, but it's probably useful.

 

Preparing the model:

Deciding what model to use as a base:
Body meshes (ie. not arms, legs or waist) usually include all bones used throughout the body, except maybe unique head bones (I haven't confirmed).
Note that replacing head models with body models usually causes implosions. So it's safe to assume that you should use a head model as a base for headgear.
If you intend to repurpose bones, you should probably think about replacing a body model that has lots of extra bones.
The Handler models may be good for this (she has extra bones for the book, etc), but some don't have slinger bones (ie. causes crashes when entering combat areas).

Also note that you can't add materials to the model, so you should pick a model that has at least the amount of materials that you want to use in the model.
If you have to, you can combine textures into a single image, and then edit the UVs to match.


Useful tips on vertex editing:
- Before you edit anything, always double check to make sure you don't have extra verts selected that you don't want to select.
- Highly recommend editing in orthogonal view (hit 5 on numpad) and then rotate or select camera angles with the other numpad keys.
- I like to use proportional edit. In viewport, hit O to enable/disable it. When it's enabled and you try to move/rotate/scale, a white circle will be visible. Scale this with mouse scroll wheel. Default curve setting seems good.
- For easier modeling disable parts. Position cursor on vertex and use L to select that part, shift+L to deselect. Or select a vert and hit ctrl+L to select the connected part. Hide with H, unhide with alt+H.
- You can save selections as vertex groups for easy reference, but don't forget to remove them before export.

Tips on using the 3d/2d cursor:
When editing, the axis is pretty important. Bounding box = center of current selection. 3d cursor = customizable axis. In viewport, hit N to bring up a toolbar that has a section where you can customize the cursor position.

Example of how to use 3d cursor: to lengthen ponytail, position 3d cursor near the base of the ponytail, and you can simply stretch the ponytail outwards from that point.

2d cursor on UV mapping example: when combining textures, set the 2d cursor Y pos to the top of the texture (the number depends on the texture res), select all UVs, hit S to scale, then Y (limit to Y axis), 0.5. This will halve the Y scale of the UVs to the upper half. If you want to scale to the bottom half, leave the 2d cursor on Y position of 0.


Combining mesh:
How to snap verts.
How to snap objects.


Combining textures and editing UVs to match:


Preparing UV islands:
Refer to Ezekial's tutorial for the time being.

Fixing smoothness, hard edges and seams:
Yavne. https://github.com/fedackb/yavne



Inserting the model into an existing MOD3:

Note that if you do not recalculate normals when exporting MOD3, they will use the existing normals in the original file. You can use this to your advantage.
For example, if you've got the normals looking right and you want to apply a shapekey without changing the normals. you can import the completed normals as its own MOD3 (thus keeping the reference data of the completed normals) and then export the applied shapekey version without recalculating. It'll use the existing normals from the reference of the completed normals MOD3 that you made.


Weighting:
Two ways to do the weighting. Either make your own/have a weighted model prepared, or tranfer weights from a similar model and then clean them up.
If you have a prepared model, you'll have to redo/rename the weights/bone groups so that they match the model you're importing over.


Applying shape keys:
This is useful for making different proportion versions and "morphing" between them to make variations.
Vertex count must match. Also, shapekeys can change the normals so you'll need to adjust the normals after applying shape keys.

Here's how to do this:
1. Open two Blender windows. One with the original, one with the shapekey target.
2. Rename the target object names so that they won't clash. I like to use names like "a", "b", "c". Delete the armature or else that'll be copied along with it.
3. Make sure cursor is on the viewport, select the objects you want to copy and hit ctrl+C. Then go to the other Blender window, mouse on viewport again, and hit ctrl+V.
4. For each model you want to add shapes to, first select the target, then the model you want to attach the shapekey to.
5. Go to object data (triangle with vertexes icon on the right) and under Shape Keys click the down arrow and select Join as Shapes.

Note that if you export with the shape as 1 it won't actually export with that shape. There's a way around this.
1. Set the shapekeys to look the way you want. Then go to the same object data, Shape Keys, and click the down arrow and select New Shape from Mix.
2. Set this New Shape from Mix to 1.
3. Delete the other shapes from top down (ie. from basis to the new shape) then delete the new shape.
4. The default shape will now be the combined shapekey version.

If you want to make morphs that are under 0 or above 1, left click the shapekey name, and an extra section will appear underneath that lets you change the number limits for that mesh.
This is useful for if you want to reverse or multiply the effects of a shapekey.



Troubleshooting:

Textures aren't appearing, texture changes aren't exporting:
You must import the original MOD3 with textures.

How do I know which bone is which?
Scroll through the original model to see which bone groups affect what. You can also try selecting verts and hit N to display the toolbar that shows which bones affect that vert.
Note that the bones aren't set up exactly how they work or appear in-game, so even if you find bones by clicking on them visually, they not be that bone. That's why the group weight method is more reliable.

Can't export:
Make sure all objects/LOD mesh are visible. Make sure you have an object selected (nothing selected will refuse to export) and are in object mode. You may need to make sure each model has an armature modifier (not applied) that points to the MainArmature. I think objects with names that don't match any LOD mesh are ignored. Make sure you don't have any shape keys remaining on the objects, as they may cause issues.


Texture is obviously stretched across the model:
See fixing seams. Basically, MHW uses one of those engines where the seams of looping UV islands need to be separate vertexes (ie. you can't have separate seams on a single vertex). Otherwise the engine thinks those UV seams are joined, which results in the stretching problem (because your UVs will be forced to connect and drag across islands). There's a way to split the seams (explained in Ezekial's tutorial, I'll cover it myself later).


Textures are totally messed up or missing:
Make sure you rename the "UV Maps" for the imported objects to "main_uv_texture".

Textures are a checkerboard/boxed pattern:
That means the MRL3 file is corrupt, broken or missing. You need to use the same MRL3 as the MOD3 you last imported into the scene (it uses the last imported MOD3 as reference data). The reason for this is that MOD3s refer to materials with some kind of hash ID, and if it can't find that in the MRL3, it won't be able to find the materials.
The same checkerboard pattern appears if you edit the MRL3 incorrectly and it can't find data inside it. In other words, if it can't find the material it's supposed to.

Textures look flat, or custom color affects the entire texture when it shouldn't:
The MRL3 can't find the texture files. If it can't find the CMM texture, changing color affects the entire texture. Same goes for if it can't find the EMM file, the entire model glows.


Can't see the UVs at all:

You have to import the mod3 with textures, or else you can't see or import/export UVs.


Error when importing with textures:

To import with textures you have to make sure the Scarlet folder is installed along with the import/export tool stuff. If you got the import/export tool via Github (latest version) it doesn't include the files in Scarlet. You have to download them manually (there's a link somewhere on the import/export tool Github) or use the files from the Nexus release (which may not be the latest version).


Can't export, base 0 error.
This happens with some of the 1.4 versions of the model import export tool, when importing new meshes.
The problem has been fixed in the latest version of 1.4.

Can't export, -1 error.
This may occur if you've edited the mesh in Blender and scaled UVs or mesh -1, or flipped normals. Haven't isolated or figured it out exactly, but the solution is to avoid editing in Blender as much as possible. Unless you know Blender really well (I don't). I've had a situations where I could not restore a mesh after getting the -1 error and had to redo those changes.


Import/export tool doesn't seem to be functioning as others use it, can't combine meshes or go over vert count, etc:

Make sure you're using the latest version on either Nexus or Github. Sometimes the Github version may have errors (the latest version seems to have problems combining models). You also have to make sure you replace all instances of the import/export tool (I had two, one in the Blender folder and one in my MHW mod work folder, and apparently the latter was still being referred to and was outdated, which was why I was having problems importing models and going over vert count).

Model works in some places but crashes in others:
Apparently this can be if you're referring to bone groups that don't exist in the skeleton, especially 255 (FF). With the Lion King mod, it worked in the Lunastra cutscene, but for some reason would crash in Teo's cutscene. I never figured out why. It had something to do with my cutting parts of the model and mirroring them via scale, or the way I cut the tail. When I redid those changes, I used "Mirror" instead and that seemed to work, but I still had to flip the mirrored mesh's normals, using Yavne.

Model polygons glitch and stretch horribly:
Occurs when replacing some LOD meshes, or TransferWeights is being ignored

Weight changes are being ignored (especially TransferWeights):
1. Delete the parts you're not using (ie. original model parts that you aren't changing) and export as FBX (default settings).
2. Make sure the mesh parts are attached to the armature (or else skeleton+weights won't export), and export as FBX (default settings).
3. Reimport the FBX. Delete the armature. This will unparent the meshes under it.
4. Reimport the model you're replacing on top. Make sure you untick "clear scene".
5. Replace the LOD mesh as you did before. Weight should now be updated.

Edited by UberGrainy
Link to comment
Share on other sites

I made my mod's basical body using just like what you write.

I don't know if it is useful , I write about that time .

- when I C&P NPCBS019 leg to Odogaron and try in game , leg texture is crash .

the result trying variously , I did well by to delete Bone_255 weight groups .-

- only simply C&P same type mesh(like nude body top & bottom) , it is OK for only renaming bone weight group name.

 

Thank you for always having lots of knowledge !!!

Link to comment
Share on other sites

Ohh, I think I see what you mean. So you need to delete all bone weight references for bones that are not actually in the model you're replacing, especially bone 255. Because bone255 (FF) is used in the bone map references, so if you have anything weighted to bone255 the game probably doesn't like it, and crashes.

 

Thanks for the heads up.

Edited by UberGrainy
Link to comment
Share on other sites

  • 5 weeks later...
  • 1 year later...

Greetings and thanks for all the usefull information in this forum, I m a simple MHW player but I wanted to import some model from DOA 6 to the game but my knwoledge about moding is less than zero, can you pin point me in a simple way the steps to start a proyect wher I can import a DOA 6 outfit to MHW?

Thanks before_hand.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...