Skip to content

Model Parsing: Oops

It looks like my current code for model skins is incorrect, which will cause problems detecting the right textures for all dynamic/physics/ragdoll models in your map… unless those models are extremely simple, like crates or barrels.

In Hammer, you can specify a number for the “skin” that a prop uses, such as having a blue sign or a red sign. It turns out this is actually an index for a whole package of textures that work together. However, my code was developed and tested against simple models, so that there was a one-to-one relationship between the skin# chosen and which VMT needed to be used.

In more complex props, this relationship is no longer valid. For example, a level-two dispenser-model has two skins, but four different materials.

I’m working on fixing up my code so that it handles these cases properly in 2.0.3. Later, version 2.0.4 should have additional fixes that allow it to recognize a few more special-case materials, such as a the material for a model’s eyeballs. (Yes, eyeballs. They’re actually their own special thing, but you seldom see it used outside of NPC/Player models.)

Posted in Programming.

Tagged with .