Disclaimer: I am not an expert in hex editing. There's more that can be done with .cmesh files than I know how to do. But since there's not a lot of information available, I figured I'd write this tutorial. I have used this method in both my Made 2 Measure and ReFabricated mods.
(Need a Hex Editor? Here's one: HxD)
Removing .cmesh shadows is useful when editing an alpha texture to include transparency. If part of the texture is invisible, that part of the .cmesh will still cast a shadow, because there is still geometry there. So using this method, we will effectively resize the shadow geometry polygons so it cannot be seen, via very simple hex editing.
We will be using the Pimp Hat as an example (cmhat_upimp01_n.cmesh). As you can see, I have removed the Hat part of the texture, leaving only the Feather:

The information we're looking for will usually be found beneath two lines which look something like this (we do not need to touch these lines):
Shadow information looks something like this:
Hex:
You'll notice a pattern of "FF"s running diagonally which repeats every five lines. Every "FF" denotes a polygon, and is followed by twenty more bytes (the "00"s below). These "FF" bytes need to remain so that there is 'something' there. Now, everything else (the actual shadow data) could be zeroed out like this:
Hex:
Pattern x4 (Highlighted):
...but this can take a long time (trust me), and can lead to shadows stretching through the floor on some cmeshes. What we'll do instead is fill out the data with "FF":
Highlight the entire chunk of data, from the begining of the "FF" pattern, right the way down to the last line with the pattern. The line afterwards will have bytes counting upwards (ie;
In your hex editor there should be a "Fill selection..." drop down option. In HxD, it's under "Edit > Fill selection...". Check "Fill pattern of pass > Hex-Values:" and type "FF". This will fill the entire selection with "FF"s.
This will essentially make the shadows either a) Too big for the game to render, or b) Too big to ever be seen from the outside. (Either way, it works!)
So the hex will now look like this:
And in-game, it will look like this:

(Need a Hex Editor? Here's one: HxD)
Removing .cmesh shadows is useful when editing an alpha texture to include transparency. If part of the texture is invisible, that part of the .cmesh will still cast a shadow, because there is still geometry there. So using this method, we will effectively resize the shadow geometry polygons so it cannot be seen, via very simple hex editing.
We will be using the Pimp Hat as an example (cmhat_upimp01_n.cmesh). As you can see, I have removed the Hat part of the texture, leaving only the Feather:

The information we're looking for will usually be found beneath two lines which look something like this (we do not need to touch these lines):
Code:
FF FF FF FF 00 00 00 00 01 00 14 00 60 00 00 00
FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00
Shadow information looks something like this:
Hex:
Code:
FB 2F 95 BD DB D0 E0 3F 57 14 B8 3C FF 00 00 00
13 00 00 00 D0 9D 9C BD 6B 69 ED 3F 97 77 D5 3C
FF 00 00 00 13 00 00 00 57 26 B7 BD E7 59 DF 3F
93 79 F2 3D FF 00 00 00 13 00 00 00 74 86 4D BD
DB D0 E0 3F 05 16 7C 3D FF 00 00 00 13 00 00 00
You'll notice a pattern of "FF"s running diagonally which repeats every five lines. Every "FF" denotes a polygon, and is followed by twenty more bytes (the "00"s below). These "FF" bytes need to remain so that there is 'something' there. Now, everything else (the actual shadow data) could be zeroed out like this:
Hex:
Code:
00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00
Pattern x4 (Highlighted):
Rich (BB code):
00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00
...but this can take a long time (trust me), and can lead to shadows stretching through the floor on some cmeshes. What we'll do instead is fill out the data with "FF":
Highlight the entire chunk of data, from the begining of the "FF" pattern, right the way down to the last line with the pattern. The line afterwards will have bytes counting upwards (ie;
00 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00
etc...). We don't need to highlight this line, or anything further.In your hex editor there should be a "Fill selection..." drop down option. In HxD, it's under "Edit > Fill selection...". Check "Fill pattern of pass > Hex-Values:" and type "FF". This will fill the entire selection with "FF"s.
This will essentially make the shadows either a) Too big for the game to render, or b) Too big to ever be seen from the outside. (Either way, it works!)
So the hex will now look like this:
Code:
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
And in-game, it will look like this:
