May 16th, 2022 Case Hardened Sorting

Case hardened skins have lots of unique patterns. Certain patterns with more of the light blue color are valued higher by the community. These skins are referred to as "Blue Gems". The patterns are completely random for every seed so there is no easy way to sort them to find the ones with the most blue.

This page will explain how the blue gem percentage values were generated.

Texture Masking

In the Case Hardened texture, you can see the light blue areas on the left, and top left. There are also a few smaller areas scattered around the texture.

In order to get an accurate representation of the amount of blue applied to a specific weapon model, a color mask is applied over the top of the blue areas. We can then detect that specific color mask when reading the model and calculate the percent of blue visible on the model.

...
Original Case Hardened Texture
...
Case Hardened Texture - Blue Areas Masked
Percentage Calculation

First, a render is made with the specific model fully masked. you can see in the example image the karambit is fully masked with the green color.

We then render every seed for that model with this modified texture with the blue areas masked off. This results in skins with a bright green texture masked over the blue gem areas. In the example images you can see the Karambit Case Hardened seed 661.

Once the models are rendered with the masked texture, we can count the amount of masked off pixels. In the example shown bellow, the base Karambit with the fully masked green texture has a total of 46,383 pixels that are masked. We can compare that to seed 661 which has a total of 29,731 masked pixels.

This results in a masked percentage of ~64.09% 29731 / 46383 = 0.6409

...
Karambit - Full Color Mask
...
Karambit Case Hardened Seed 661
...
Karambit Case Hardened Seed 661 - Blue Areas Masked
Issues

This method results in accurate results for most skins in the game. We do run into some issues with certain models where part of the model will be hidden in game. An example of this would be the Falchion Knife Case Hardened where the bottom handle part of the knife would be hidden while holding it in game. This would cause seed 55 to have a higher ranking than seed 638.

In order to fix this issue and have more accurate results, we need to ignore specific areas of a model when calculating the percentage. We do this for these knives:

  • Falchion Knife
  • Butterfly Knife
  • Stiletto Knife
  • Navaja Knife (Lower half of the handle)
Other Blue Patterns

In order to find skins with any of the blue/purple from the Case Hardened texture, and not just the light blue areas, we can simply modify the texture mask to include these other areas. This texture masks out more of the blue/purple which is not included in the blue gem one.

...
Case Hardened Texture - All Blue Areas Masked

All the generated percentage values described here are generated for every Case Hardened Skin. The values are available on the skin page, and you can sort the seeds based on the blue gem percentage. See an example here