Follow surface

Hey everyone… Jordan’s back with a dazzling new question! (I’m guessing someone somewhere has already come up with this, but I don’t have time to search for it) I’ve gotten tired of spherical eyeballs, since they don’t look very good with my cartoony style of drawing and modeling. My method has always been in the past to have a sphere that tracks to an empty.
So here’s my question: Is there a Python script that I could use to make a pupil stay on the surface of a non-sphyrical eyeball and kind of “track to” an empty? Or in other words, it would be constrained to the eyeball and goes to the point nearest the empty. Also, if this is possible, would it work on a SubSurf object?

Maybe you can use the “follow terrain” script by Harkyman… not sure, but it might work. Make a search here in elysiun.

much easier, take one of your spherical eyes, throw it into a lattice, deform the lattice, and voila - rotating (using track or not) works like a charm :slight_smile:

I guess he means with no deformation of pupils…

The good old lattice system produces deformation of pupils if you deform lattice too much…

Take a deep breath :slight_smile:

This should work.

You have your eye, sphere whatever shape.

Have an empty in the middle of the eyeball that tracks to the object to look at.

Now add a lamp as a child to the empty move it so its outside the eyeball pointing at where the puple should be (directly away to where the character is looking at)

Now tell the light to shoot negative light (make the puple black.)

If you want to muck around with Puple shapes you could use a texture or an image for the puple/lamp image to project.

Im happy that I came up with this solution in a few seconds since I never needed to solve a problem like it.

Why don’t you use a spherical eye (+what you want) parented to a deformed lattice ?

Some cartoon models wouldent have spherical eyes- :stuck_out_tongue:

use maps controlled by empties - good old trick

Hi,
I am realy interested in that maps controled by empties…
does anyone know how to do it
I usualy use a script to update the UV and it works
but it is realy slow and if I duplicate the object and launch the game, the uvs of every instance are modified at the same time.
thx