How to erase mesh parts, define material ID/LOD, change mesh address reference

From Nexus Mods Wiki
Revision as of 13:01, 29 December 2018 by Pickysaurus (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a guide by UberGrainy for Monster Hunter: World. This requires some hex editing knowledge, and a hex editor.

Original post on the Nexus Mods Forums.

In mod3 files, after the material names, it refers to each part of the model. 80 bytes for each entry. If you replace those 80 bytes with 00s, it can't find the model, so it becomes hidden. You can also hide it by setting LOD to 00.

I previously said 6th byte was material ID. I don't know why I wrote that. Anyway, I rewrote the explanation.

Sample entry:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
13 00 AE 0B 00 00 00 00 01 00 00 00 21 00 24 43
00 00 00 00 00 00 00 00 1C 40 37 F6 00 00 00 00
4C 3E 00 00 00 00 00 00 00 24 01 00 00 00 AD 0B
FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00

Notable bytes:

QQ QQ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <- there are sometimes bytes at the end here, I don't know what they're for
13 00 PP PP 00 00 MM 00 LL LL 00 00 21 00 24 43
00 00 00 00 00 00 00 00 1C 40 37 F6 XX XX XX XX
YY YY YY YY 00 00 00 00 00 24 01 00 00 00 AD 0B <- don't know what these bytes on the end here are for
FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 <- there are sometimes bytes at the end here, I don't know what they're for


I do not know what QQ QQ and PP PP are, but QQ QQ always seems to match the previous entry's PP PP, except in the case of the first entry. I have yet to figure out what the other bytes do, but fiddling with them tends to cause crashes.


  • MM is the material ID. It uses the order of the materials listed earlier in the file. Change the value and you'll see the texture will change.
  • LL defines LOD. 00 00 = invisible. 01 00 = char creation, equip box. 02 00 = in-game regular distance. Other values include 04 00, 08 00, 10 00, E0 FF, FC FF. I haven't tested what all of those are. One of the values defines the shadow. To get infinite LOD, I just set these two bytes to FF FF. Shadow seems to be calculated when using FF FF.
  • XX XX XX XX is starting location of the mesh to look for. For example, if XX XX XX XX is 43 21 00 00, then the address is 00001234. Initial address always seems to be 00 00 00 00, so I'm assuming mesh data always starts after a certain place (ie. after this material index?)
  • YY YY YY YY seems to be the size of the mesh. In the above example, it's 4C 3E 00 00, which means 00003E4C. Reducing this value removes triangles.


To get the starting address of the next mesh, you take XX XX XX XX and add YY YY YY YY. In the above sample, 00000000 + 00003E4C means the next mesh will start at 00003E4C.


When you want to test the results, just hang out at the equipment box and switch equipment on and off. To test LOD, set LOD to low, and camera distance set to far, then go to training mode and swing on the Wedge Beetle. Don't forget to check the shadows to see if the shadow LOD is also working properly.


While looking up MRL format info, I found past MOD format specifications:

http://residentevilmodding.boards.net/thread/6320/capcoms-mtframework-mod-format-research

http://z13.invisionfree.com/Translation_Forum/ar/t26.htm


About customizable skin color

I may be wrong, but this is my current theory/understanding.

  1. CMM defines what parts of a texture are customizable. Usually red or green. This is usually for equipment.
  2. Skin texture usually refers to a default skin texture. In the case of NPC clothing, sometimes the skin is drawn onto the clothes texture.
  3. But even in the case of NPC textures having both clothing and skin, the skin is assigned its own material.
  4. The game decides which color is customizable on a piece of equipment. I suspect this is defined in common/equip_scolor.esvc
  5. In the model mrl3, skin materials may have some kind of shader switch that tells the game they are a Player or NPC skin material.

The game may be looking for both a specific material header name, and the shader switch. NPC skin shader has entries in the 100mb shader files. But player skin shader does not seem to. Until mrl3 structure is understood, I don't think I can resolve the skin issue.

I can't easily test mrl3, because the material/shader data varies in size, so I can't just copy paste stuff over, and the structure is kinda vague. As far as I know, nobody has figured out the mrl3 structure yet.