Home Technical Talk

3DS Max most efficient technique to control flat cartoon eyes?

Unc1e
polycounter lvl 3
Offline / Send Message
Unc1e polycounter lvl 3
Hi comrades!  Here's a head of cartoon character:
It has a flat face and i need to animate it like it is a drawn picture. So i want to control the whole head with consisted parts and the pupils in particular with their own controllers (preferably by using lookat constraint). So i think i need to limit pupils movement by the face plane somehow so they could move as a part of the head and only slide along face plane when their controllers used! I hope i explained situation clearly) Please someone give me an advice on how to do it in a proper way!

Replies

  • Klunk
    Options
    Offline / Send Message
    Klunk ngon master
    could use a helper (point or dummy) with an attachment constraint set to the center position of the pupil and targeting the head mesh and have the pupil use it as it parent then lock the pupils movemrnent in the link info panel.


    the disc has a float noise controller in x as an example

    though i imagine someone here has simple ball rotation to flat plane expression controller/script controller.....
  • Unc1e
    Options
    Offline / Send Message
    Unc1e polycounter lvl 3
    Klunk said:
    could use a helper (point or dummy) with an attachment constraint set to the center position of the pupil and targeting the head mesh and have the pupil use it as it parent then lock the pupils movemrnent in the link info panel.
    Big thanks for reply man! I think i get it, this way helps to stick pupil to the head and limits its movement by some axes. But how i must control the pupil? Directly? Is there any way to use lookat constraint here? Or maybe at least link pupil also to an another controller like point or dummy which will control character's look direction?
  • Unc1e
    Options
    Offline / Send Message
    Unc1e polycounter lvl 3
    I can link pupil direcly to the head and move it's pivot to the back of the head, then aplly lookat constraint to it, but then pupil's movement won't be limited by the face plane as it should be...
  • Klunk
    Options
    Offline / Send Message
    Klunk ngon master
    it's not pretty or elegant but it works :)

    start with the theory, basically find the intersection of the ray from the center of the eye ball to the target helper on the plane where the pupil resides.

    so the rig

    helper "ball" (the virtual center of the eye) it's parent is the main head mesh, has a lookat constraint (lookat axis = z) to the eye target
    helper "targ" where the eye is looking (parent none in this case though can be linked to the rig "master")
    helper "pupil" defines the plane where the pupil resides its parent is the head mesh and it position is as in the gif with z axis out.

    p helper the point on the plane has an position script controller with the following script

    p0 = ball.pos;<br>v = ball.dir;<br>pn = pupil.transform.row3;<br>d = dot pn pupil.transform.row4<br>t = ((d - dot p0&nbsp; pn ))/(dot pn v)<br>p0 + v * t
    ball and pupil are assigned to the nodes of the same name.

    the disc representing the pupil  has a position constraint to node p and an orientation constraint to pupil ( it moves with the position node but stay aligned to the plane)

    i've attached the scene (again as it had a proprietary object)



  • Unc1e
    Options
    Offline / Send Message
    Unc1e polycounter lvl 3
    Klunk said:
    it's not pretty or elegant but it works :)

    I'll try to implement described technique as soon as i get home but i see the result already and this is outstanding. For noob like me all this looks like kind of magic, really. You just took my problem and instantly solved it exactly how i wanted it to be solved. Thank you so much! I think i have one more little debt to Karma now)
  • coven
    Options
    Offline / Send Message
    coven polycounter lvl 6
    Does the pupil have to be geometry?
  • Unc1e
    Options
    Offline / Send Message
    Unc1e polycounter lvl 3
    coven said:
    Does the pupil have to be geometry?
    Not necessary, in this case it just have to be black filled circle, visible in Unity. Why?
Sign In or Register to comment.