Compiling a model with face flexes using Cra0kalo's StudioMDL

Greetings. I am trying to compile a model for Garry’s Mod with over 32 materials so I had to use cra0kalo’s StudioMDL for it. The problem is that the model won’t appear in the game with face flexes added with the following console error:


Model uses STRIP_IS_QUADLIST_REG - will crash in this engine - so not loading!

Reducing the number of materials is not an option, so what do I have to do to get both materials and face flexes working? They work flawlessly when separated, but that’s not what I need.
Here’s a part of the QC with merged facerules and standardflex:



$modelname "model.mdl"
$ambientboost
$definevariable expressions "Face.vta"
$definevariable headBone "ValveBiped.Bip01_Head1"
 
$eyeposition 0 0 70
 
//$attachment "eyes" $headBone$ 0.043 -4.2197 67.5554 absolute
//$attachment "mouth" $headBone$ 1.00 -6.30 0.00 rotate 0 -80 -90
 
 
$model facs_example "Head.smd" {
 

 
	flexfile $expressions$
	 {
	defaultflex frame 0		// baseline mouth closed expression
	flexpair "BROW" 1	frame 1 		// Brows 	Rising	
	flex "JAW" frame 2				// Jaw		Opened
	}
 
flexcontroller brow right_inner_raiser left_inner_raiser
flexcontroller phoneme jaw_drop
flexcontroller phoneme right_part left_part 
flexcontroller phoneme right_mouth_drop left_mouth_drop

%JAW = jaw_drop
%BROWL = left_inner_raiser
%BROWR = right_inner_raiser

}

$bodygroup Base
{
studio Base
}

$bodygroup Glasses
{
studio Glasses
blank
}

$cdmaterials "models\modeltextures"
$texturegroup skinfamilies
{
{ "model_top.vmt" "model_trousers_a.vmt" "model_trousers_b.vmt" "model_trousers.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_1.vmt" "model_trousers_a_1.vmt" "model_trousers_b_1.vmt" "model_trousers_1.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_2.vmt" "model_trousers_a_2.vmt" "model_trousers_b_2.vmt" "model_trousers_2.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_3.vmt" "model_trousers_a_3.vmt" "model_trousers_b_3.vmt" "model_trousers_3.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_4.vmt" "model_trousers_a_4.vmt" "model_trousers_b_4.vmt" "model_trousers_4.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_5.vmt" "model_trousers_a_5.vmt" "model_trousers_b_5.vmt" "model_trousers_5.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_6.vmt" "model_trousers_a_6.vmt" "model_trousers_b_6.vmt" "model_trousers_6.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_7.vmt" "model_trousers_a_7.vmt" "model_trousers_b_7.vmt" "model_trousers_7.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_8.vmt" "model_trousers_a_8.vmt" "model_trousers_b_8.vmt" "model_trousers_8.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
{ "model_top_p.vmt" "model_trousers_a_p.vmt" "model_trousers_b_p.vmt" "model_trousers_p.vmt" "model_shoes" "black_hand_base.vmt" "model_flesh.vmt" "model_head.vmt" }
}


StudioMDL is TRASH, don’t EVER use it unless you’re the godsent of ex valve prodige or whatever, why can’t you use crowbar? Paste in


code

the error that crowbar gives instead.

Crak0kalo’s studiomdl does not allow flexes and more than 32 materials at the same time. (From personal experience)

Edit: Also why are you using raw studiomdl? Use something like Crowbar

Wasn’t specific there, sorry. I used Crowbar with cra0’s compiler.

The only error I get is:


    WARNING: Reference Count for Material ___error (1) != 0

And it occurs no matter whether there’re skingroups or flexes or neither of them at all.

That error will always appear if you compile using Crak0kalo’s studiomdl, simply ignore it.

Anyway, you will need to reduce the amount of materials if you want flexes and +32 materials. You can try combining materials/textures/UVs into one if possible

StudioMDL is the actual compiler.

Tools like Crowbar or GuiStudioMDL are just wrappers for StudioMDL - all they do is provide a nicer way to construct the command-line arguments that you feed to it.

I’m currently stuck with the same issue, hopefully someone has a solution to this.