Tutorials‎ > ‎

Proportion Trick

Proportion Trick discovered by CaptainBigButt.

Information that the tutorial is based on

  • QC files (Forum topic by CaptainBigButt with explanations and link to example files that use the Proportion Trick.)

Other tutorials on the subject:

  1. How to use the Size Proportion Trick (By MSF.)
  2. I'm trying to make a small playermodel, but its body is stretched-out to fit the human-body-form. (Forum topic where there are a few posts by Lukis that are full tutorial posts.)

This tutorial written by ZeqMacaw:

  1. Import the skeleton of the model being replaced.
  2. Import the custom mesh.
  3. Adjust the skeleton to fit the custom mesh. Note that sometimes some bones need rotating about the axis along the length of the bone because different games expect different orientation of the axes.
  4. Rig/weight the custom mesh to the skeleton.
  5. Pose the weighted mesh + skeleton to match the pose of the replaced model's idle/reference sequence. For example, if the replaced model's idle/reference sequence is the "T-pose", then pose the weighted mesh + skeleton into the "T-pose".
  6. Export the weighted mesh + skeleton to "rigged_mesh.smd" file. This file name will be used in two places in the QC file.
  7. Change the file name of the reference mesh used in $model or $body or $bodygroup line in the QC. Example of a $model line:
    $model "rigged_mesh.smd"
  8. Add these two lines in the QC after all $animation, $sequence, and $includemodel lines. The important thing is to have the $sequence be the final sequence, so it does not interfere with existing animations, particularly in multiplayer. The "a_proportions" is simply the name of the $animation that is then used in the $sequence. The "rigged_mesh.smd" is the file name from earlier steps, which contains the custom weighted mesh. The "reference" is the name of the idle/reference $sequence name, usually the first $sequence in the QC; it should be from the $sequence to which you matched the custom mesh in the earlier steps. The "proportions" is the name of the special $sequence that (in my own words) "tells the game to use the proportion trick"; it can be any name you want as long as it is not the same name as any other $sequence in the model.
    $animation "a_proportions" "rigged_mesh.smd" subtract "reference" 0
    $sequence "proportions" "a_proportions" predelta autoplay
    
  9. NOTE: If the custom mesh is significantly different, $attachment lines in the QC file might need changing to avoid attached models from clipping.
  10. [This is helpful step for survivor models and common infected models in L4D2.] Add this line AFTER any $sequence lines and BEFORE $sequence "proportions" and $includemodel lines in the QC file (where "modelname_$DeclareSequence.qci" has a $DeclareSequence sequence_name line for every sequence):
    $include "modelname_$DeclareSequence.qci"
    
    QCI file downloads:
  11. [This is helpful step for survivor models and common infected models in L4D2.] Delete or comment-out the lines in the QCI file that refer to the same names as the $sequence blocks in the QC file. Example: QC file has these two $sequence blocks:
    $sequence "TeenAngst" "survivor_teenangst_anims\TeenAngst.smd" {
    	fps 30
    }
    
    $sequence "ragdoll" "survivor_teenangst_anims\ragdoll.smd" {
    	fps 30
    	"ACT_DIERAGDOLL" 1
    }
    
    The "Zoey_$DeclareSequence.qci" has these two lines at the top that need deleting:
    $declaresequence TeenAngst
    $declaresequence ragdoll
    

Possible trouble areas

Hands might need more adjustments.

Examples of mods that use the trick