Head bone and eyes are misaligning on playermodel?
11 replies, posted
It works fine as a ragdoll, but as a player model, I'm getting this weird misalignment. I tried with a skeleton that exactly matches a player skeleton and I tried my own skeleton and the results are the same. I'm also 100% sure the vertex weights of the eyes are on the head bone.
This is my .qc
[code]
$Model "renamon" "renamon.smd" {
eyeball "eye_right" "ValveBiped.Bip01_Head1" -2.169500 -4.381100 68.817395 "eyeball_r" 2.5 20 "pupil_r" 1.4
eyeball "eye_left" "ValveBiped.Bip01_Head1" 2.169500 -4.381100 68.817395 "eyeball_l" 2.5 -20 "pupil_l" 1.4
}
[/code]
Here it is on a ragdoll
[vid]https://dl.dropboxusercontent.com/u/72472980/eyes5.webm[/vid]
and here it is on a player
[vid]https://dl.dropboxusercontent.com/u/72472980/eyes4.webm[/vid]
(And this is a work in progress so I am going to fix the spine and all the other vertex weights)
Finished all the bones, vertex weights, and jiggle bone related stuff. Just have to fix the eyes and I can add it to workshop.
[editline]6th January 2016[/editline]
When I eye-pose the model as a ragdoll, it gives the same results as a normal playermodel as a ragdoll.
[editline]6th January 2016[/editline]
Do the attachments or forward bone influence the eyes at all?
The forward bone and eye attachments don't seem to influence them at all.
[editline]7th January 2016[/editline]
I've found that the orientation of the head bone influences the eyes. That doesn't make any sense though because the X Y Z of the eyes are defined in the world reference frame. I'm so confused.
[editline]7th January 2016[/editline]
Here's a video showing that the eyes on the ragdoll are behaving correctly. I don't know what is different about the ragdoll and the player.
[vid]https://dl.dropboxusercontent.com/u/72472980/eyes6.webm[/vid]
-snip-
I've found that my custom eye bone has no effect on the eyes and the eyes attachment has no effect either.
It works fine in hlmv, on ragdolls, and in the player model selector, but on players and npcs it won't work. Could something be wrong with my skeleton?
[IMG]https://dl.dropboxusercontent.com/u/72472980/eyes.png[/IMG]
[IMG]https://dl.dropboxusercontent.com/u/72472980/eyes2.png[/IMG]
[IMG]https://dl.dropboxusercontent.com/u/72472980/eyes3.png[/IMG]
(Yes I need to fix the weights on the left arm) (They are fixed now)
[editline]7th January 2016[/editline]
God damn. After this shit I'm never making anything for source engine again.
heres a trick, put the Z of the eyeball inside the head so that the eye shader renders the entire ball then it would be easier to find your poses.
I messed around with r_eyeshift for about an hour to try seeing the ball, but couldn't get good results. I then set the eye's yaw offset to 60 since that's the angle the normal of the eyes makes with forward and I got much better results, but it seems the rotation of the eyeball is not working correctly. I don't know if the UVs orientation matters but I'll try rotating the UVs and see if that helps. (Nope rotating UVs doesn't do anything)
[vid]https://dl.dropboxusercontent.com/u/72472980/eyes7.webm[/vid]
[editline]8th January 2016[/editline]
Yeah with view pitch = 90 or -90 the eye is centered, but view pitch=0, the eye wraps around. Seem's the eye's pitch is off by 90. I guess I can try putting the eyes on a different bone again.
[editline]8th January 2016[/editline]
The orientation and position of the bone the eyes are attached to doesn't influence them at all.
[editline]8th January 2016[/editline]
Here it is in hlmv. I don't understand why it works perfectly here, but not on a player/npc.
[vid]https://dl.dropboxusercontent.com/u/72472980/eyes8.webm[/vid]
[editline]8th January 2016[/editline]
Could it be because I'm using the hl2 studiomdl and hlmv?
[editline]8th January 2016[/editline]
Nope, garrysmod studiomdl gives the same thing.
does it have the eye attachment in the qc and a forward attachment?
[code]
$attachment "forward" "ValveBiped.forward" 0.00 0.00 -0.00
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0.00 0.00 -0.00
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" 0.00 -0.00 0.00
$attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" -0.00 0.00 -0.00
$attachment "eyes" "ValveBiped.Bip01_Head1" 1.64 -4.45 -0.00 rotate 0.00 -80.10 -90.00[/code]
Yeah
[IMG]https://dl.dropboxusercontent.com/u/72472980/eyes4.png[/IMG]
Would it be okay if I added you on steam and maybe you can take a look?
go for it
If anyone reads this, we still need help lol.
I finally fixed it. The qc file requires these lines.
flexcontroller head range -30 30 head_rightleft
flexcontroller head range -15 15 head_updown
flexcontroller head range -15 15 head_tilt
flexcontroller eyes range -30 30 eyes_updown
flexcontroller eyes range -30 30 eyes_rightleft
flexcontroller body range -30 30 body_rightleft
flexcontroller chest range -30 30 chest_rightleft
flexcontroller head range -0.2 0.2 head_forwardback
so now it is
[code]$Model "renamon" "renamon.smd" {
eyeball "eye_right" "ValveBiped.Bip01_Head1" -2.047500 -4.451100 68.907395 "eyeball_r" 2.5 20 "pupil_r" 1.4
eyeball "eye_left" "ValveBiped.Bip01_Head1" 2.047500 -4.451100 68.907395 "eyeball_l" 2.5 -20 "pupil_l" 1.4
flexcontroller head range -30 30 head_rightleft
flexcontroller head range -15 15 head_updown
flexcontroller head range -15 15 head_tilt
flexcontroller eyes range -30 30 eyes_updown
flexcontroller eyes range -30 30 eyes_rightleft
flexcontroller body range -30 30 body_rightleft
flexcontroller chest range -30 30 chest_rightleft
flexcontroller head range -0.2 0.2 head_forwardback
}[/code]
And it works great now.
Sorry, you need to Log In to post a reply to this thread.