From Valve Developer Community
Revision as of 16:48, 17 October 2018 by CamBen (talk | contribs) (Parameters)
Jump to: navigation, search
The Demoman's eyeball.
Alyx's eyeball in Ep2.
A vortigaunt's largest eye. The iris covers its entire surface.

Eyeball is a property of $model. It consists of two components:

  1. An 'eye white' surface on the model, with a unique material.
  2. A dynamic iris decal that travels over the eye white material to simulate the eye looking in different directions.
Tip.png Tip: An iris material can cover the entire surface of the eye if need be.


Tip.png Tip: The qc_eyes tool can help you manage the potentially confusing string of numbers needed for this command.
Name of eyeball, used to match eyelid rules. For humans, use righteye and lefteye.
The bone which the eye is parented to, typically the head.
<X> <Y> <Z>
World location of the center of the ball of the eye.
Material above which the iris material will be drawn. Make sure every eye has a unique one!
Width of the eyeball when viewed from the front. Used to prevent the iris from rolling inside the head.
Note.png Note: The iris will travel in a circle even if the eyeball is oval. Your model's flex should accommodate for this.
Default yaw offset (from directly forward) for iris. Humans are typically 2-4 degrees wall-eyed. Not setting this correctly will result in either your characters appearing cross-eyed, or if you've compensated by misplacing the ball of the eye, them not tracking side to side.
Material used as the iris texture. This is is used by the compiler to identify what part of the mesh matches which eyeball, and must be the same material name in the QC as it appears assigned to the mesh.
Scale of the iris texture.


Hover your mouse over each value for its description.

$model "female_01" "female_01_reference_RE.smd" {
   eyeball righteye ValveBiped.Bip01_Head1 -1.261 -3.702 64.974 eyeball_r 1 4 pupil_r 0.66

See also