Proper .QC Pose Parameter Setup

Hello, for the past 2 weeks I have been getting this model fixed up for use. It’s been skinned and rigged with 3DS Max and I’ve been struggling with the .QC file. I’m trying to get Pose Parameters for aiming the turret head.

I had the Pose Parameters working until I found out that I could only edit one parameter at a time thus I needed to use the “subtract” option to allow me to edit both Pose Parameters in-game while at the same time playing the animation.
What’s happening is that I can only edit the pose parameters while the “Weapon_Fire” sequence is selected.

What I would like, if possible, is one sequence called “Aim” and the ability to edit both Pose Parameters in-game while that sequence is selected. Then I can play one of the three “Weapon_Fire” animations at the same time.

Here is the .QC file and a picture of the model.


$modelname "kklouzal\cannons\cannon_floor.mdl"
$scale 1.00
$cdmaterials "models\kklouzal\cannons"

$body "Body" "cannonfloor_ref.SMD"

$animation "cannonfloor_ref.SMD" "cannonfloor_ref.SMD"

$animation "_Weapon_Fire_Start" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 0 4 fps 30
$animation "_Weapon_Fire_End" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 4 9 fps 30
$animation "_Weapon_Fire" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 0 9 fps 30
$animation "Aim_Yaw_0" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 10 10 fps 30
$animation "Aim_Yaw_90" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 11 11 fps 30
$animation "Aim_Yaw_180" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 12 12 fps 30
$animation "Aim_Yaw_270" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 13 13 fps 30
$animation "Aim_Yaw_360" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 14 14 fps 30
$animation "Aim_Pitch_0" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 15 15 fps 30
$animation "Aim_Pitch_90" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 16 16 fps 30
$animation "Aim_Pitch_-90" "cannonfloor_anim.SMD" subtract "cannonfloor_ref.SMD" 0 frames 17 17 fps 30

$attachment Muzzle "CannonFloor_Weapon" 52.00 0.00 0.00 rotate

$sequence Weapon_Fire_Start {
	delta
	_Weapon_Fire_Start
	activity Weapon_Fire_Start -1
}
$sequence Weapon_Fire_End {
	delta
	_Weapon_Fire_End
	activity Weapon_Fire_End -1
}
$sequence Weapon_Fire {
	delta
	_Weapon_Fire
	activity Weapon_Fire -1
}

$sequence _Aim_Pitch {
	delta
	blendwidth 3
	Aim_Pitch_-90 Aim_Pitch_0 Aim_Pitch_90
	blend Aim_Pitch -90 90
}

$sequence _Aim_Yaw {
	delta
	blendwidth 5
	Aim_Yaw_0 Aim_Yaw_90 Aim_Yaw_180 Aim_Yaw_270 Aim_Yaw_360
	blend Aim_Yaw 0 360
	addlayer _Aim_Pitch
}

$surfaceprop "solidmetal"

$keyvalues {
	"prop_data" {
		"base" "metal.medium"
	}
}

$collisionmodel "C:\Users\Kyle\Documents\3dsMax\export\Cannon\cannonfloor_ref.SMD" {
	$concave
	$mass 250.000
}

Another problem I’ve noticed is that when setting the yaw, if it is spinning in a circle, as the value approaches 360 then passes from 360 over to 0, the model completely turns around the other direction and this can be seen in-game. I’m not sure how to remedy this either :<

If anyone could tell me what’s the matter with my .QC file it would be tremendously appreciated.
Thank you very much for your time.

If anyone has a clue what’s going on here that would be amazing :v

I was able to figure out a piece of it, I can now move the Aim_Pitch and Aim_Yaw at the same time as playing the firing animation, I had to addlayer Aim_Pitch to Aim_Yaw aswell as the three Weapon_Fire sequences, however I am still having another issue.

when setting the yaw, if it is spinning in a circle, as the value approaches 360 then passes from 360 over to 0, the model completely turns around the other direction and this can be seen in-game.

I have been working on this model for a long time and would really like to complete it, does nobody understand blend sequences or pose parameters?

What is that model from?

It’s from an old mod for an even older game. To stay on topic I know that character models use blend sequences and pose parameters for their movement poses, they blend 8 sometimes 9 sequences together. If someone just has an example .qc file I can study that would probably help me through this.
I’ve tried numerous ways to get the problem alleviated with no luck…

After decompiling a few of the HL2 turret models, studying their .QC files with countless trial and errors I have finally gotten the correct setup for setting the Aim_Pitch and Aim_Yaw Pose Parameters regardless of what Sequence is currently set to play on the model, which means I can aim the turret head and play any one of the three firing animations at the same time.

I do apologize for bumping this thread so many times but here is the end result of my .QC file in case anyone else struggles with this in the future.


$modelname "kklouzal\cannons\cannon_floor.mdl"
$scale 1.00
$cdmaterials "models\kklouzal\cannons"
$surfaceprop "solidmetal"

$model "Cannon_Floor" "cannonfloor_ref.SMD"

$attachment Muzzle "CannonFloor_Weapon" 52.00 0.00 0.00 rotate

$animation "idle_delta" "cannonfloor_ref.SMD" fps 30

$animation "Aim_Yaw_0" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 10 10
	fps 30
}

$animation "Aim_Yaw_90" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 11 11
	fps 30
}

$animation "Aim_Yaw_180" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 12 12
	fps 30
}

$animation "Aim_Yaw_270" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 13 13
	fps 30
}

$animation "Aim_Yaw_360" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 14 14
	fps 30
}

$sequence _Aim_Yaw {
	blendwidth 5
	blend Aim_Yaw -180 180
	delta
	autoplay
	Aim_Yaw_0 Aim_Yaw_90 Aim_Yaw_180 Aim_Yaw_270 Aim_Yaw_360
}

$animation "Aim_Pitch_0" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 15 15
	fps 30
}

$animation "Aim_Pitch_90" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 16 16
	fps 30
}

$animation "Aim_Pitch_-90" "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 17 17
	fps 30
}

$sequence _Aim_Pitch {
	blendwidth 3
	blend Aim_Pitch -90 90
	delta
	autoplay
	Aim_Pitch_-90 Aim_Pitch_0 Aim_Pitch_90
}

$sequence Weapon_Fire_Start "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 0 4
	fps 30
	delta
}

$sequence Weapon_Fire_End "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 4 9
	fps 30
	delta
}

$sequence Weapon_Fire "cannonfloor_anim.SMD" {
	subtract "idle_delta" 0
	frames 0 9
	fps 30
	delta
}

$keyvalues {
	"prop_data" {
		"base" "metal.medium"
	}
}

$collisionmodel "C:\Users\Kyle\Documents\3dsMax\export\Cannon\cannonfloor_ref.SMD" {
	$concave
	$mass 250.000
}

The secret was in the “autoplay” option in the Aim_Pitch and Aim_Yaw Sequence.

I’m still having one visual issue with the model when adjusting the Aim_Yaw Pose Parameter and I believe this has something to do with how I’ve setup the animations in 3DS Max.

When setting the Aim_Yaw, if it starts at 0 and gradually increases to 360 (rotating completely around it’s axis) once it passes from 360 over to 0 again the model reverses direction and completely moves back from 360 all the way to 0 again instead of just stepping over and wrapping back to 0.

I do not have any clue how to fix this if anyone has any suggestions please let me know. This is the last thing I need to fix for this model before its finished.

Thank you all for your time it is much appreciated.

Here is a video showing you what’s happening with the Yaw rotation.

Start’s at about :35