Adverti horiz upsell
Advanced Eye Rig w/Nodes - Getting Eyelids to follow the Eyes
Advanced Eye Rig w/Nodes - Getting Eyelids to follow the Eyes
Jana Bergevin, updated 2010-04-07 21:13:38 UTC 48,559 views  Rating:
(5 ratings)
Page 3 of 4

    6. We now need to set up the parent constrains on the eye geometry so that we can setup the blend control. Make sure each eye is in its own group and that the pivot point is centered. Select both the LEyeGRPJoyStick and the LEyeGRPAim then select the LEyeGeo(the group that your left eye geometry is in) and apply a parent constrain. Do the same with the REyeGRPJoyStick, the REyeGRPAim, and the REyeGeo.

      eyegeosetup

        7. Following the parenting of the eye geometry we can now proceed with the EyeBlendCTRL. Select the EyeBlendCTRL and in the hypershader and add a multiplydivide node and a reverse node. Rename them to EyeBlendMD and EyeBlendRev. Connect the translateX of the EyeBlendCTRL to the Input1X of the EyeBlendMD. Change the Input2X of the EyeBlendMD to the max limit of the control (which in our case is 1.38) and set the operation of the node to Divide. Next connect the outputX of the EyeBlendMD to the InputX of the EyeBlendRev. Now you’ll need to connect the EyeBlendMD and EyeBlendRev to the parent constrains we just setup. Connect the outputX of the EyeBlendMD to the REyeGRPAimW1 of the REyeGeo_parentConstraint1. Do the same to the LEyeGRPAimW1 of the LEyeGeo_parentConstraint1. Next connect the outputX of the EyeBlendRev to the REyeGRPJoystickW0 of the REyeGeo_parentConstraint1 and do the same for the LEyeGRPJoystickW0 of the LEyeGeo_parentConstraint1. To test what you just set up move the EyeCTRL up, then move the EyeBlendCTRL to the Right and next move the EyeLookAtCTRL down. Move the EyeBlendCTRL slider back and forth and you should see the eyes move up and down (your going from one ctrl to the other). Hooray your almost done!

          eyeblendsetup

            8. Now for the eyelids.

            INTERLUDE: I want to make it very clear that for this tutorial it was easier for me to use these simple half sphere lids, but you will more than likely have your eyelids part of your characters geometry. If this is the case you will not need to parent constrain the eyelid geometry to the respective joint, instead you’ll be smooth binding the eyelid joints to the mesh and be painting weights. You only need to focus on the setup of the nodes that control the eyelid joints.

            Back to the tutorial! Select the RUprlid_jnt and then the R_Uprlid geometry and apply a parent constrain. Next select the RLwrlid_jnt and then the R_Lwrlid geometry and apply a parent constrain. Do the same with the left Uprlid and Lwrlid.

            Open up the hypershader if it’s not already open and create two blendcolor nodes and two multiplydivide nodes. Name them REyelidBC, LEyelidBC, LEyelidMD, and REyelidMD. Connect the translate X of the EyeBlendCTRL to the blender of the REyelidBC and the LEyelidBC. Next connect the outputR of the REyelidBC to the input1X of the REyelidMD. Then connect the output G of the REyelidBC to the input1Y of the REyelidMD. Do the same with the LEyelid BC and LEyelidMD. Select the REyelidMD and set the value of input2X to 0.5  and the value of input2Y to 0.2. Do the same for LEyelidMD. This will be the range of rotation for the eyelids.

            eyelidsetup

                Now we’ll need four addDoubleLinear nodes. Name them RUprlidADL, RLwrlidADL, LUprlidADL, and LLwrlidADL. Connect the output X of the REyelidMD to the Input 1 of the RUprlidADL and RLwrlidADL. Then connect the output X of the LEyelidMD to the Input 1 of the LUprlidADL and LLwrlidADL. Now we need to connect the output Y of the REyelidMD to the rotate Y of the RUprlid_jnt and the RLwrlid_jnt. Then connect the output Y of the LEyelidMD to the rotate Y of the LUprlid_jnt and LLwrlid_jnt. Connect the output 1 of the RLwrlidADL to the rotate X of the RLwrlid_jnt. Connect the output 1 of the RUprlidADL to the rotate X of the RUprlid_jnt. Connect the output 1 of the LLwrlidADL to the rotate X of the LLwrlid_jnt. Connect the output 1 of the LUprlidADL to the rotate X of the LUprlid_jnt. You still with me? We’re almost done!

                  eyelidsetup2