[Home]

How I add Skins to Models in WallWorm

(and a lil bit about custom doors)

By: Shy - [08/28/2021]



This is an article mostly for my own future reference, but I will briefly explain how I do models with multiple skins when working with WallWorm. Typically if my model only has a single material applied I will use the standard WallWorm way of applying skins by assigning a multimaterial (with each skin as a slot in that multimaterial) to the model’s WallWorm helper. The other WallWorm way of doing things is by using proxies, however I never use this method for whatever reason (laziness). Instead I manually apply the skins via the QC file. BUT each time you output your model the qc file is regenerated, well WallWorm makes this easy to fix because it has a button to open a QCI file.

The QCI file allows custom parameters to be added to the QC each time it is generated, this is also how I add prop data for things like doors. For a model with only one material but multiple skins you would insert this code:

$texturegroup skinfamilies
{
		{ "material1_skin1"}
		{ "material1_skin2"}
}

A real world example would be:

$texturegroup skinfamilies
{
		{ "hmm_glass_glow"}
		{ "hmm_glass_black"}
}

But as I said, in this use case it is just easier to assign a multimaterial to the WallWorm helper. You can also use the helper on models with multiple materials but only one material changes. If my model has multiple materials and they BOTH need to change with the skin then that is where I use this code:

$texturegroup skinfamilies
{
		{ "mat1_s1" 	"mat2_s1"}
		{ "mat1_s2"  	"mat2_s2"}
}

Real world:

$texturegroup skinfamilies
{
		{ "hmm_glass_glow_snow" 	"hmm_tb_main"}
		{ "hgs_glass_black"  		"hmm_tb_main_day"}
}

(notice I'm stupid and messed up my own texture naming conventions for the one texture?) Doing it this way means I don't have to worry about putting my alternative skins into 3dsmax at all. So long as the model has the materials that match the first skin entry this will work. This can be expanded to fit quite a lot of unique materials PER skin imagine each line containing material names as a skin. Both of my above examples only have two skins on the model. Adding more lines will add more skins. Like so:

$texturegroup skinfamilies
{
		{ "skin0"}
		{ "skin1"}
		{ "skin2"}
		{ "skin3"}
		{ "skin4"}
		{ "skin5"}
}

Another interesting situation is the fact that you don’t need to define every single texture the model uses in this list, assuming they don’t change. Meaning if you have a model with 2 materials applied to it, but you only want ONE of the materials to ever change with the skin you do NOT have to define that non changing material. Simply use the first example in this case, defining only the single changing material.

However assuming you have a model with multiple materials and you only want SOME of the materials to change SOMETIMES depending on skin you would want to define every material per skin. In this example material 2 only changes for the fourth skin but not the others, while material three swaps between two materials depending on the skin.

$texturegroup skinfamilies
{
		{ "mat1_s1" 	"mat2_s1"	"mat_3_s1"}
		{ "mat1_s2"  	"mat2_s1"	"mat_3_s2"}
		{ "mat1_s3"  	"mat2_s1"	"mat_3_s1"}
		{ "mat1_s4"  	"mat2_s4"	"mat_3_s2"}
}

While I am at it I might as well also show the full QCI of one of my doors used in Hogsmeade. Be warned, this is about the most bare bones door setup you can have, as it is actually missing some parameters like hardware types. You can go crazy when it comes to doors, custom parameters, custom sounds, etc… Notice the ‘defaults’ section actually is what defines the door sounds and is why my doors sound so good. These are not sound filenames but are a reference to the game’s world sounds script.

$keyvalues {

      "prop_data"
      {
         "base"      "Door.Standard"
         "allowstatic"      "1"
         "breakable_count"   "0"
         "blocklos"      "1"

      }
      "door_options"
      {
         "defaults" 
         {
         "open"      "Doors.FullOpen3" 
         "close"      "Doors.FullClose3" 
         "move"      "Doors.Move3" 
         "pound"      "Doors.Wood.Pound1" 
         "surfaceprop"   "wood" 
         }
      }
   }
$texturegroup skinfamilies
{
		{ "hmm_doora_1"  }
		{ "hmm_doora_2"  }
		{ "hmm_doora_3"  }
		{ "hmm_doora_4"  }
		{ "hmm_doora_5"  }
		{ "hmm_doora_6"  }
		{ "hmm_doora_7"  }
		{ "hmm_doora_8"  }
		{ "hmm_doora_9"  }
}