View Full Version : help needed in rigging an oval eye
hueman 09-23-2008, 05:02 AM Hi guys,
I am rigging a bird model in which the eyes are oval instead of sphere.
If i rotate the eye it will come out of the socket so is there any way to just rig the pupil of the eye.
here is pic of eyeball
http://i272.photobucket.com/albums/jj161/blueman_2008/1.jpg
here the pic of the eyeball with body to give you a better idea of eyesocket
http://i272.photobucket.com/albums/jj161/blueman_2008/2.jpg
can we model an iris an rig it so that it constraints it self to the eye
http://i272.photobucket.com/albums/jj161/blueman_2008/3.jpg
|
|
alexyork
09-23-2008, 11:36 AM
i'm no rigger/animator by any stretch but...
it might be simpler to just animate a texture map moving over the surface, with a lookat or some other similar constraint. stopping it warping at the edges may be a challenge but it should work. either that or animate the iris as separate geom being deformed over the eyeball surface, again using lookat or siimilar. but this would likely be more complicated and difficult.
i'm sure there are other solutions, just throwing a couple of ideas out.
mushroomgod
09-23-2008, 12:51 PM
it might be simpler to just animate a texture map moving over the surface,
I agree
nt nt nt
biliousfrog
09-23-2008, 01:18 PM
I'd ask in the forum specific to your application as different software has different ways of doing it. I've done it in Lightwave by using a deformer on a normal, spherical eye to make it oval. Then, the eye can rotate but is automatically deformed to the oval shape. It means that you're not constrained to using cartoon style 'dots', you can have quite realistic eyes.
Minael2008
09-23-2008, 01:30 PM
what kind of bird, do birds even rotate their eyes? I thought they just cocked their heads and made their pupils bigger to focus more? Maybe you can just rig it so the pupil gets bigger or smaller. Or have the pupil as different geomety. A slightly bigger oval over the eyeball geometry. it being transparent excpet the black pupil. and can rotate it somewhat and you wont see where it goes over geometry. Hope you fix it. Looks neat. i want to rig myself an eye now. :(. damn that java class.
XminusOne
09-23-2008, 01:37 PM
You could use a hiearchy and some geometry and normal constraints to get that to work. The pupil would need to be seperate geometry, or you could do it the animated texture way. Either would work.
ThomasMahler
09-23-2008, 02:01 PM
I once did something like that with a round eye that I then lattice deformed. You gotta change the deformation order, so that the blinking and shit happens before the lattice deformation, so things will look okay. Your eye looks pretty freaking wild though, not sure if that'd work at that amount of stretching.
smackcakes
09-23-2008, 04:09 PM
I think I would ask if the eyes really need to be that stretched in the first place? Lots of animals in nature appear to have oval eyes (like humans) but the eyeballs themselves are actually round. I realise this would probably involve changing your model slightly, but it might be for the best. Even if you manage to rig the oval eyes perfectly... how sure are you that it won't end up looking weird when you actually see it move?
monkey-sage
09-23-2008, 05:15 PM
easy-peezy in maya but it doesn't look like your in maya. I'll tell ya how to do it maya and maybe you can translate that into your world!
Make a sphere just a regular sphere and group it to itself two times. you are going to use the first level and put all of the scale values in there and move it into location in the second level you are going to rotate the thing into position. The geometry itself should now be in the right place and at the right angle and size, also be free of any transforms. You can rotate the geometry now and it should stay the same shape while moving the textures properly because they are on the lowest transform level.
That's how I do it.
kemijo
09-23-2008, 05:57 PM
It's obvious that it *is* in fact Maya...
This should be in the Maya rigging forum as others have said, maybe it will get moved there.
Others have mentioned animating a texture map, which will work for the pupil but not the eyelids. Assuming that's fine, you'll want 3D controls (as opposed to controlling it in texture space) and you can either make your own custom attributes to control your texture-space parameters (assumedly the "translateFrame" on your 2D texture node) or better yet you can project it with a camera and animate that, which gives you the benefit of a viewport manipulator. For the eyelids though, you most likely want them to slide over the eyeball, which usually requires some planning. You could build a full rig, setting up eye rotation, eyelid animation, etc. on a normal spherical eye first (similar to the previous poster's suggestion). Then you would take the entire rigged region (all eyeball parts and some of the eyelid skin) and deform it all together, for instance with a lattice, into the shape you want. This will maintain all previous rigging on the ball and the part of the eyelids included in the lattice, and you'll get cool effects like the eyelid sliding smoothly over a non-spherical eyeball.
This all depends on if you want something anatomically correct or not. Eyeballs in animals (I believe) are always near spherical. Like someone said, do some research on the way a bird moves it eyes - if at all - and mimic that setup. You may find that the eyeball is spherical but the ball itself is much smaller than you are assuming. Something else may be taking room in the ocular cavity (i.e. caruncle). Of course If you want a cartoony look, then you can disregard anything you want.
Boucha
09-24-2008, 03:17 AM
yeah...once I had to rig an oval eye and i manage to rig it using either lattices or wrap deformers...The trick is to just create sphere for eye ball, pupil, etc and lattice deform all of them to a oval shape...I used a clever connection of pupil's rotation with a null group..You can either aim constrain the null group which is connected to the rotation of pupil or just rotate them manually...Remember, not to move the pivot around...
uiron
09-24-2008, 07:59 AM
you can try this script i wrote a while ago to constrain locator to a nurbs surface and animate it using U and V coordinates.
import maya.cmds as cmds
def locatorOnSurface(surface,locator):
#addAttr -ln "positionU" -at double -min 0 -max 1 |locator2;
#setAttr -e-keyable true |locator2.positionU
cmds.addAttr(locator,ln="positionU",at="double")
cmds.setAttr(locator+".positionU",e=True,keyable=True)
cmds.addAttr(locator,ln="positionV",at="double")
cmds.setAttr(locator+".positionV",e=True,keyable=True)
shapes = cmds.listRelatives(surface,shapes=True)
surfaceShape = shapes[0]
#read closest u and v from surface
cp = cmds.createNode("closestPointOnSurface")
cmds.connectAttr(surfaceShape+".worldSpace[0]",cp+".inputSurface")
cmds.connectAttr(locator+".translate",cp+".inPosition")
cmds.setAttr(locator+".positionU",cmds.getAttr(cp+".parameterU"))
cmds.setAttr(locator+".positionV",cmds.getAttr(cp+".parameterV"))
cmds.delete(cp)
# create a node with U and V we've got
ps = cmds.createNode("pointOnSurfaceInfo")
# cmds.setAttr(ps+".turnOnPercentage",1)
cmds.connectAttr(locator+".positionU",ps+".parameterU")
cmds.connectAttr(locator+".positionV",ps+".parameterV")
cmds.connectAttr(surfaceShape+".worldSpace[0]",ps+".inputSurface")
cmds.connectAttr(ps+".position",locator+".translate")
#normal constraint for the object
nc = cmds.normalConstraint(surface,locator)
cmds.connectAttr(ps+".tangentU",nc[0]+".worldUpVector")
locatorOnSurface("nurbsSphere1","locator1")
if you create nurbsSphere1, locator1 and run this script, it will snap locator to sphere, and locator will have two new attributes: positionU and positionV. by changing these values, you move locator on the sphere. to apply this to different objects, edit last line of the script, giving your names instead "nurbsSphere1" and "locator1".
in your case, you would need to constrain a new locator to an eye surface, link pupil to that new locator, then add some GUI for positionU and positionV of the locator.
CGTalk Moderation
09-24-2008, 07:59 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.