Certain flexes not working?

So in proceeding with something resembling an understanding of the flex-making process, I’ve run into some issues, and I’m not sure how severe they might be. It’s entirely possible these errors are simply due to the incompleteness of the flex list, but that hasn’t stopped some of them.

Basically, I’ve only made a grand total of six flexes, as I wanted to be certain everything was working before I committed to roughly 44 of the things only to find they were all worthless. Of those six, (number 0 reserved as a reference frame) only number 2 and 3 (upper lid raise and lower lid droop) work properly. Blink, squint, and inner and lower brow raiser do absolutely nothing. This applies to model viewer, garrysmod and Source Filmmaker; all consistent operation, or lack thereof.

Admittedly, having plugged in a template for a basic library of flexes, the compiler is primed to expect ALL flexes instead of just six, but asking the Wallworm VTA exporter to do 44 frames crashes Max. I think it’s because the exporter is expecting a key on every frame.

This is my full QC, in case anything stands out.


$modelname "tremors\burt\burt.mdl"$cdmaterials "models	remors\burt\"


$model burt "burt_reference.smd" {
	eyeball righteye "ValveBiped.Bip01_Head1" -1.72 -3.094 67.04 "eyeball_r" 1.00 -1 "pupil_r" 0.63
	eyeball lefteye "ValveBiped.Bip01_Head1" 1.19 -3.094 67.06 "eyeball_l" 1.00 2 "pupil_l" 0.63


	eyelid  upper_right "burt_expressions" lowerer 1 -0.17 neutral 0 0.22 raiser 2 0.33 split 0.1 eyeball righteye
	eyelid  lower_right "burt_expressions" lowerer 3 -0.30 neutral 0 -0.22 raiser 4 -0.05 split 0.1 eyeball righteye
	eyelid  upper_left "burt_expressions" lowerer 1 -0.19 neutral 0 0.20 raiser 2 0.31 split -0.1 eyeball lefteye
	eyelid  lower_left "burt_expressions" lowerer 3 -0.32 neutral 0 -0.24 raiser 4 -0.07 split -0.1 eyeball lefteye


	mouth 0 "mouth" "ValveBiped.Bip01_Head1" 0 1 0     // mouth illumination




	flexfile "burt_expressions.vta"
	{
		//defaultflex frame 0
		flex "f01" frame 1 //frame 1 = frame 41
		flex "f02" frame 2 //frame 2 = frame 42
		flex "f03" frame 3 //frame 3 = frame 43
		flex "f04" frame 4 //frame 4 = frame 44 (you can omit these and define the eyes using the 40's, or vice versa)
		flex "AU42" frame 5
		flex "AU1" frame 6
		flex "AU2" frame 7
		flex "AU4" frame 8
		flex "AU12" frame 9
		flex "AU15" frame 10
		flex "AU17" frame 11
		flex "AU10" frame 12
		flex "AU17D" frame 13
		flex "AU16" frame 14
		flex "AU6" frame 15
		flex "AU9" frame 16
		flex "AU25" frame 17
		flex "AU22" frame 18
		flex "AU20" frame 19
		flex "AU32" frame 20
		flex "AU24" frame 21
		flex "AU18" frame 22
		flex "AU38" frame 23
		flex "AU31" frame 24
		flex "AU26" frame 25
		flex "AU27" frame 26
		flex "AU26Z" frame 27
		flex "AU27Z" frame 28
		flex "AD30L" frame 29
		flex "AD30R" frame 30
		flex "AU1AU2" frame 31
		flex "AU1AU4" frame 32
		flex "AU2AU4" frame 33
		flex "AU12AU25" frame 34
		flex "AU6Z" frame 35
		flex "AU18Z" frame 36
		flex "AU22Z" frame 37
		flex "AU13" frame 38
		flex "AD96L" frame 39
		flex "AD96R" frame 40
		flex "upper_right_lowerer" frame 41
		flex "upper_right_raiser" frame 42
		flex "lower_left_lowerer" frame 43
		flex "lower_left_raiser" frame 44
	}


	//flexcontroller FACE_REGION range SLIDER_MIN SLIDER_MAX FLEXNAME
	//These are normally split into groups like eyes, mouth, eyebrows and such, and are the names you see as sliders that you can manipulate in faceposer or SFM
	//their relationship to the raw flexes is defined after this block.
	
	flexcontroller phoneme range 0 1 f01_f1
	flexcontroller phoneme range 0 1 f02_f2
	flexcontroller phoneme range 0 1 f03_f3
	flexcontroller phoneme range 0 1 f04_f4
	flexcontroller phoneme range 0 1 AU42_f5
	flexcontroller phoneme range 0 1 AU1_f6
	flexcontroller phoneme range 0 1 AU2_f7
	flexcontroller phoneme range 0 1 AU4_f8
	flexcontroller phoneme range 0 1 AU12_f9
	flexcontroller phoneme range 0 1 AU15_f10
	flexcontroller phoneme range 0 1 AU17_f11
	flexcontroller phoneme range 0 1 AU10_f12
	flexcontroller phoneme range 0 1 AU17D_f13
	flexcontroller phoneme range 0 1 AU16_f14
	flexcontroller phoneme range 0 1 AU6_f15	
	flexcontroller phoneme range 0 1 AU9_f16
	flexcontroller phoneme range 0 1 AU25_f17
	flexcontroller phoneme range 0 1 AU22_f18
	flexcontroller phoneme range 0 1 AU20_f19
	flexcontroller phoneme range 0 1 AU32_f20
	flexcontroller phoneme range 0 1 AU24_f21
	flexcontroller phoneme range 0 1 AU18_f22
	flexcontroller phoneme range 0 1 AU38_f23
	flexcontroller phoneme range 0 1 AU31_f24
	flexcontroller phoneme range 0 1 AU26_f25
	flexcontroller phoneme range 0 1 AU27_f26
	flexcontroller phoneme range 0 1 AU26Z_f27
	flexcontroller phoneme range 0 1 AU27Z_f28
	flexcontroller phoneme range 0 1 AD30L_f29
	flexcontroller phoneme range 0 1 AD30R_f30	
	flexcontroller phoneme range 0 1 AU1AU2_f31
	flexcontroller phoneme range 0 1 AU1AU4_f32
	flexcontroller phoneme range 0 1 AU2AU4_f33
	flexcontroller phoneme range 0 1 AU12AU25_f34
	flexcontroller phoneme range 0 1 AU6Z_f35
	flexcontroller phoneme range 0 1 AU18Z_f36
	flexcontroller phoneme range 0 1 AU22Z_f37
	flexcontroller phoneme range 0 1 AU13_f38
	flexcontroller phoneme range 0 1 AD96L_f39
	flexcontroller phoneme range 0 1 AD96R_f40
	flexcontroller phoneme range 0 1 upr_r_low_f41
	flexcontroller phoneme range 0 1 upr_r_rai_f42
	flexcontroller phoneme range 0 1 upr_l_low_f43
	flexcontroller phoneme range 0 1 upr_r_rai_f44


	
	//%RAWFLEX = named_contorller
	//These are normally complex mathmatic formulas that use the raw flexes from the .vta to create the controller sliders.
	//for example, mouth_open may be a combination of a moving jaw, lip stretching, and tounge moving, combined as mutliples and fractions to create a single usable slider.
	//for the purposes of demonstration, these are 1:1 assignemnts, so each raw fles has a specific control.
	
		%f01 = f01_f1
		%f02 = f02_f2
		%f03 = f03_f3
		%f04 = f04_f4
		%AU42 = AU42_f5
		%AU1 = AU1_f6
		%AU2 = AU2_f7
		%AU4 = AU4_f8
		%AU12 = AU12_f9
		%AU15 = AU15_f10
		%AU17 = AU17_f11
		%AU10 = AU10_f12
		%AU17D = AU17D_f13
		%AU16 = AU16_f14
		%AU6 = AU6_f15
		%AU9 = AU9_f16
		%AU25 = AU25_f17
		%AU22 = AU22_f18
		%AU20 = AU20_f19
		%AU32 = AU32_f20
		%AU24 = AU24_f21
		%AU18 = AU18_f22
		%AU38 = AU38_f23
		%AU31 = AU31_f24
		%AU26 = AU26_f25
		%AU27 = AU27_f26
		%AU26Z = AU26Z_f27
		%AU27Z = AU27Z_f28
		%AD30L = AD30L_f29
		%AD30R = AD30R_f30
		%AU1AU2 = AU1AU2_f31
		%AU1AU4 = AU1AU4_f32
		%AU2AU4 = AU2AU4_f33
		%AU12AU25 = AU12AU25_f34
		%AU6Z = AU6Z_f35
		%AU18Z = AU18Z_f36
		%AU22Z = AU22Z_f37
		%AU13 = AU13_f38
		%AD96L = AD96L_f39
		%AD96R = AD96R_f40
		%upper_right_lowerer = upr_r_low_f41
		%upper_right_raiser = upr_r_rai_f42
		%lower_left_lowerer = upr_l_low_f43
		%lower_left_raiser  = upr_r_rai_f44
}


//start eye/face data
$eyeposition 0 0 70


//head controllers
$attachment "eyes" "ValveBiped.Bip01_Head1" -0.22 -3.094 67.05 absolute
$attachment "mouth" "ValveBiped.Bip01_Head1" 0.80 -5.80 -0.15 rotate 0 -80 -90


$hboxset "default"
$hbox 1 "ValveBiped.Bip01_Head1" -1.250  -6.500  -3.190  8.250  3.500  3.310
$hbox 4 "ValveBiped.Bip01_L_UpperArm" 0.000  -2.750  -2.750  12.510  1.750  2.250
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -2.190  -2.380  13.000  1.810  1.620
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.060  -2.000  -1.500  4.060  1.000  2.500
$hbox 5 "ValveBiped.Bip01_R_UpperArm" 0.000  -3.000  -2.250  12.390  2.000  2.750
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500  -2.200  -1.550  12.500  1.800  2.450
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.060  -2.000  -2.500  4.060  1.000  1.500
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.000  -3.510  -3.280  15.640  3.490  2.720
$hbox 6 "ValveBiped.Bip01_L_Foot" -1.070  -2.000  -2.840  5.040  5.000  2.160
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.000  -3.510  -2.820  15.640  3.490  3.180
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.060  -2.010  -2.280  5.050  4.990  2.720
$hbox 3 "ValveBiped.Bip01_Pelvis" -7.500  -5.500  -6.000  7.500  8.500  5.000
$hbox 2 "ValveBiped.Bip01_Spine2" -2.500  -2.500  -7.000  14.500  7.500  7.000
// Model uses material "burt_mouth.vmt"
// Model uses material "l_eye.vmt"
// Model uses material "burt_face.vmt"
// Model uses material "burt_citizensheet.vmt"
// Model uses material "r_eye.vmt"
// Model uses material "pupil_r.vmt"
// Model uses material "glint.vmt"
// Model uses material "pupil_l.vmt"
$attachment "chest" "ValveBiped.Bip01_Spine2" 5.00 4.00 -0.00 rotate -0.00 90.00 90.00
$attachment "forward" "ValveBiped.forward" 0.00 0.00 0.00 rotate 0.00 0.00 -0.00
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0.00 0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" -0.00 0.00 0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" -0.00 0.00 0.00 rotate -90.00 -90.00 0.00
$includemodel "humans/male_shared.mdl"
$includemodel "humans/male_ss.mdl"
$includemodel "humans/male_gestures.mdl"
$includemodel "humans/male_postures.mdl"
$surfaceprop "flesh"
$eyeposition 0.000 0.000 70.000
$illumposition -1.764 0.080 36.127
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$ikchain rhand ValveBiped.Bip01_R_Hand knee  0.707 0.707 0.000
$ikchain lhand ValveBiped.Bip01_L_Hand knee  0.707 0.707 0.000
$ikchain rfoot ValveBiped.Bip01_R_Foot knee  0.707 -0.707 0.000
$ikchain lfoot ValveBiped.Bip01_L_Foot knee  0.707 -0.707 0.000
$collisionjoints "phymodel.smd" {


	$mass 90.0
	$inertia 10.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "valvebiped.bip01_pelvis"
	$jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"


	$jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 0.00


	$jointconstrain "valvebiped.bip01_r_upperarm" x limit -39.00 39.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" y limit -79.00 95.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 23.00 0.00


	$jointconstrain "valvebiped.bip01_l_upperarm" x limit -30.00 30.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" y limit -95.00 84.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" z limit -86.00 26.00 0.00


	$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" z limit -149.00 4.00 0.00


	$jointconstrain "valvebiped.bip01_l_hand" x limit -37.00 37.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" z limit -57.00 59.00 0.00


	$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 4.00 0.00


	$jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.00


	$jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 0.00


	$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 0.00


	$jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 0.00
	$jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.00
	$jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 0.00


	$jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 0.00


	$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 0.00


	$jointconstrain "valvebiped.bip01_l_foot" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.00


	$jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.00
	$animatedfriction 1.000 400.000 0.500 0.300 0.000
}

The only thing I can imagine is getting in the way, is that above the morpher modifier and skin modifier, I’ve done some tweaking to the shape of the model’s eyes, in order to better set-up the eye properties I was having issues with before. I did this under the impression that the VTA exporter wouldn’t care, as I only moved vertices and didn’t add or remove any, and the changes would apply to all morph targets regardless. Easy to cleanup if that’s the issue, as weighting in the face wouldn’t change, and making those six flexes wasn’t all that hard.

The eyes, however, make me question. The eye geometry is a separate object from the main body model, since I noticed other valve models kept them separate so the eyelids could roll over them better. The eyes have their own set of flexes, mostly to keep a consistent shape with the other flexes. Again, I figured as long as the reference smd was consistent with the default shape and model, the VTA exporter would only jot down where vertices were moving in relation to each other and ignore irrelevant data like geometry being segregated into different objects.

I’m going to keep trying things, but some clarification would be really nice.

The eyes aren’t separate geometry, just separate materials (face, left eye, right eye). Anyway, if you only have 6 flexes, just write a very small, temporary QC and export as 6 frames. Alternatively you could just duplicate the standard face as fillers for the remaining frames until you have an actual shapekey to use there.

Edit: On a side note, FACS flexes (particularly the eyes) are generally broken in GMod.

Oh I’m aware of the materials, the eye shader works great after some manual spacing and position tweaks. But regardless, the separated eye seemed the most efficient, specially seeing it’s only a few vertices anyway to correct and snap during flex creation.

I went the whole hog and just dumped the flexes, making the reference file a single object again and at least compiled with a VTA with “blink” in it. Was discouraged to see the blink wasn’t working in the model viewer, but less so, because barney, alyx and the rebels’ blink flex doesn’t work in the model viewer either. So there’s still hope it’s been fixed, but I only got to test something the model viewer ignores anyway.

At work now, so I can’t experiment till I’m back, but still. I’m really surprised how little documentation exists for these things given Source’s robust modding community.

Goddamnit, now NONE of the flexes show in the model viewer. I’m sure the reference matches the flexes, it all works great in the morpher. I captured the default frame a bunch of times to fill the missing frames up, but none of the real ones give me ANYTHING.

I have no idea what I’m doing wrong. What does this thing WANT from me?!

I notice that half the flex examples I see use a bust of the model instead of the full one. I’ve been copying the entire body model. Could that be why? The full model is just under 6k polys. Is there a limit to how many can be flexed? I thought the upper limit was 10k.

I’m exporting the VTA’s using the WallWorm exporter… I really don’t know what else to off here. I can’t make a damn flex library to use if I’m not sure they’re going to work.

EDIT:

That fuckin’ did it.

Wish ANYONE in the dev wiki or across the Internet had mentioned that using a bust was not only useful, but probably NECESSARY.

Well, now the flexes work, except its eyes are glued shut. I think this is fixable though. Read something in the QC of the HL2 citizen models once. But if anyone knows it already, would love the help.