Pink eyes from player model

I have a slight problem with the eyes of a player model I’m trying to mod.

http://img233.imageshack.us/img233/5742/gmflatgrass0002s.jpg

This was originally http://www.garrysmod.org/downloads/?a=view&id=43344 (I take no credit in making this; I just downloaded it to use it as a template for personal modding needs.)

The model worked as a player model, it had working eyes, but there weren’t any animations, so I used the m_anm.mdl, m_gst.mdl, m_pst.mdl, m_shd.mdl and m_ss.mdl for the $includemodel in the .QC file.

All the Gmod animations then worked, but now I’ve got the problem with the pink eyes in the image above. I would really appreciate it if anyone could help me resolve this, so that the player model has normal eyes.

[editline]4th November 2011[/editline]

Anyone? Please?..

Have same Problem with Mileena Ragdoll :C

What does your QC look like?

Here is the QC

*$cd “C:\Documents and Settings\mamos\Desktop\mdl\coot\qc”
$modelname “Humans\jacketntie\Male_04.mdl”
$model “male_04” “male_04_reference.smd” {
//-doesn’t work eyeball righteye ValveBiped.Bip01_Head1 -1.265 -2.549 72.866 eyeball_r 1.000 4.000 pupil_r 0.630
//-doesn’t work eyeball lefteye ValveBiped.Bip01_Head1 1.206 -2.547 72.871 eyeball_l 1.000 -4.000 pupil_l 0.630
mouth 0 “mouth” ValveBiped.Bip01_Head1 0.000 1.000 0.000
}
$cdmaterials “models\Humans\jackntie”
$cdmaterials “models\Humans\Male”
$cdmaterials “models\humans\male”
// Model uses material “breen_sheet.vmt”
// Model uses material “citizen_sheet.vmt”
// Model uses material “mouth.vmt”
// Model uses material “eyeball_l.vmt”
// Model uses material “eric_facemap.vmt”
// Model uses material “eyeball_r.vmt”
// Model uses material “pupil_r.vmt”
// Model uses material “glint.vmt”
// Model uses material “pupil_l.vmt”
$attachment “eyes” “ValveBiped.Bip01_Head1” 3.98 -3.72 0.03 rotate -0.00 -80.10 -90.00
$attachment “mouth” “ValveBiped.Bip01_Head1” 1.20 -5.70 -0.00 rotate 0.00 -80.00 -90.00
$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 “m_shd.mdl”
$includemodel “m_ss.mdl”
$includemodel “m_gst.mdl”
$includemodel “m_pst.mdl”
$includemodel “m_anm.mdl”
$surfaceprop “flesh”
$eyeposition 0.000 0.000 70.000
$illumposition 0.000 0.637 36.217
$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_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_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_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

$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 "tie1" x limit 0.00 0.00 0.00
$jointconstrain "tie1" y limit -100.00 100.00 0.00
$jointconstrain "tie1" z limit 0.00 115.00 0.00

$jointconstrain "tie2" x limit 0.00 0.00 0.00
$jointconstrain "tie2" y limit -40.00 40.00 0.00
$jointconstrain "tie2" z limit -110.00 120.00 0.00

$jointconstrain "tie3" x limit 0.00 0.00 0.00
$jointconstrain "tie3" y limit -30.00 30.00 0.00
$jointconstrain "tie3" z limit -110.00 120.00 0.00

$jointconstrain "tie4" x limit 0.00 0.00 0.00
$jointconstrain "tie4" y limit -20.00 20.00 0.00
$jointconstrain "tie4" z limit -110.00 120.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_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_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_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 "tie5" x limit 0.00 0.00 0.00
$jointconstrain "tie5" y limit -10.00 10.00 0.00
$jointconstrain "tie5" z limit -110.00 120.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
$animatedfriction 1.000 400.000 0.500 0.000 0.300

}*

The player model and ragdoll functions are included in the same QC. Is that what’s causing the problem perhaps?

I’m not exactly sure, but do you have the textures for the eye? It says it has the vmt, but what about the vtf?

All the vtf files are there. Both eyeball_l.vtf and eyeball_r.vtf are in the right section.

Oh. I’m not quite sure then, I’ve never messed with eyes on a model. :stuck_out_tongue:

Thanks anyway.

here’s your answer. As those two lines define the eyeballs. Though normally that would just lead to white eyeballs.
You might though be missing the engine textures. Try replacing the EP2 VMT shaders with hl2 baseline ones. Should stop the pink overlay then.

But they’re commented out.

Sure and the commenting out is one of the causes of the problem. To be honest I think it’s actually loading the eye textures, but is missing the engine textures. Seems to happen often enough that the game has problems reading them. Never figured out why. Usually renaming them and placing them elsewhere fixed the problems.

Here’s what I get by using the commented lines

http://img406.imageshack.us/img406/3405/gmflatgrass0003.jpg

The eyes are now dark green. I tried modifying the .vmt files, but the problem doesn’t change. I don’t exactly know where to find the hl2 baseline shaders…

What do the VMTs for the eyeballs look like? Are you running in DX9 or DX8?

Running on DX9
Example: eyeball_l.vmt
“eyes”
{
“$basetexture” “models/Humans/jackntie/eyeball_l”
“$iris” “models/Humans/jackntie/pupil_l”
“$halflambert” 1
}

Another example: pupil_l.vmt
“Eyeball”
{
“$basetexture” “models/Humans/jackntie/pupil_l”
}

If you’re wondering - yes, the vtf files have been placed in those directories.

Hope there’s a solution for this, the model looks great :smile:

Ok, here’s some more info.
Before adding the Gmod animations (g_anm.mdl) the model had the eyes WORKING. After I added the g_anm.mdl and the others, which seemed suitable, I got this pink eyes problem.

The eyes are pink because they’re commented out, and the “Eyes” and “EyeRefract” shaders require eyeballs to be defined in order to work at all. As you saw when you compiled with them uncommented, they were not pink, just misplaced.

Mess around with these three numbers a bit until you’re able to see the irises. I recommend opening the model in HLMV to do this, it will decrease the time between modification and testing.


eyeball righteye ValveBiped.Bip01_Head1 **-1.265 -2.549 72.866** eyeball_r 1.000 4.000 pupil_r 0.630

The first number is the X axis position, which in the case of the right eye, is how far from side to side (with the model facing you) the eye is placed.
The second number is the Y axis position, which is how far from side to side (with the model in profile) the eye is placed.
The third number is the Z axis position, which is how high or low vertically the eye is placed. If this were the EyeRefract shader I could probably give you a basic idea of where to start looking (you can tell due to magnitude of refraction), but you just have to wing it when the Eyes shader is used.

This probably happened because the GMod animations may have a slightly different bone roll than the model.

Ah that might explain something. It’s possible that the gman model includes a different base pose which modifies the models starting positions and thus breaks the eyeballs.
It’s also possible the skeleton might be slightly different placed.

Ah sorry, didn;t notice squiddy already replied to this.

HLMV is really buggy and it doesn’t let me open the model in any case (no matter which Source Engine or HL2 selected in Source SDK.) It just gives me an error every time I try to open it. But you’re probably right about the eyeball coordinates.