Eyeball: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
Line 27: Line 27:
: Default yaw offset (from directly forward) for iris. Humans are typically 2-4 degrees [[Wikipedia:Strabismus|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.
: Default yaw offset (from directly forward) for iris. Humans are typically 2-4 degrees [[Wikipedia:Strabismus|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.
;<code><iris_material></code>
;<code><iris_material></code>
: Material to use as the iris texture. {{todo|This now appears to be a property of the eyeball material. Need some OB QCs to confirm.}}
: Material to use as the iris texture. {{TODO|This now appears to be a property of the eyeball material. Need some OB QCs to confirm.}}
;<code><iris_scale></code>
;<code><iris_scale></code>
: Scale of the iris texture.
: Scale of the iris texture.

Revision as of 20:17, 19 January 2009

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.pngTip:An iris material can cover the entire surface of the eye if need be.

Parameters

Tip.pngTip:The qc_eyes tool can help you manage the potentially confusing string of numbers needed for this command.
<name>
Name of eyeball, used to match eyelid rules. For humans, use righteye and lefteye.
<bone_name>
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_name>
Material above which the iris material will be drawn. Make sure every eye has a unique one!
<diameter>
Diameter of the eyeball, to prevent the iris from rolling inside the head. Note that this means it will travel in a circle even if the eye is oval: your model's flex should accommodate for this.
<angle>
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.
<iris_material>
Material to use as the iris texture.
Todo: This now appears to be a property of the eyeball material. Need some OB QCs to confirm.
<iris_scale>
Scale of the iris texture.

Example

$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