ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Absolute position in after effects (with a time remap)

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Goran Ognjanovic
Absolute position in after effects (with a time remap)
on Nov 16, 2018 at 9:24:15 pm

Hi guys, I checked many posts here and couldn't find the expression that works in my case.

I have an object (Eye) that is supposed to be controlled by a null located in the MainComp. This is a simplified structure:

MainComp (contains:)
Null
MidComp
-----------------------------------------------
MidComp (contains:)
StartComp (has default time remap)
-----------------------------------------------
StartComp (contains:)
Eye (some solid or any object)

I used the command: Edit/Copy with Property Links to connect the Eye to the Null which gives me this expression: comp("MainComp").layer("Null").transform.position
This works fine, if I animate the Null, it moves the Eye.

Problem is once I create a slider effect (needed for head "rotation") for example under MidComp and connect StartComp time remap to the slider, immediately my Eye animation stops working. It works without keyframes, as soon as I add keys it stops.


Is there a way to control this Eye with the Null using some expression that will calculate every frame? Maybe value_at_time thing or similar? Basically I need this Eye to always follow the absolute position of the Null.

Thank you so much!


Return to posts index

Kalleheikki Kannisto
Re: Absolute position in after effects (with a time remap)
on Nov 17, 2018 at 9:21:11 am

That structure is problematic. I would get the eye out of the start comp and onto the same level as the mid comp but where it is not affected by the time remap. Make the eye position dependent on the head rotation null via expessions so it appears to turn with it, then add to that motion the expression connected to the eye null to be able to further adjust where you're looking at.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Goran Ognjanovic
Re: Absolute position in after effects (with a time remap)
on Nov 18, 2018 at 11:59:02 am

Thanks! That doesn't work too, because eyes are deforming as the character is turning his head left or right. (more realistic eyes, deform as they change the angle). So I have to have them under some time remap comp.

I did try to have Iris only outside that structure but than I would need eyes blinking. And to make things worse the character also has glasses on top. ☺

If I don't find any solutions for the absolute position tracking I might bring everything to maya and rig it over there 2D/3D..


Return to posts index


Kalleheikki Kannisto
Re: Absolute position in after effects (with a time remap)
on Nov 19, 2018 at 10:49:15 am

Can't you apply the same type of animation to the eyes as to the head, just outside the head comp? How are you animating the head turn?

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Goran Ognjanovic
Re: Absolute position in after effects (with a time remap)
on Nov 19, 2018 at 1:05:58 pm

I'd love to post the animation but It has to stay private at the moment.

I created bunch of solids and masks, animated the mask points from straight head position to profile (as the character's face is more complex, there are a lot of masks and keyframes, including the eyes. As the face turns to profile one of the eyes gets hidden behind the nose. Also glasses are partially covering the eyes all the time).

All this is pre-comped, duplicated and time reversed to create the opposite side turn. But I was able to bring the eyes and glasses outside the time reverse thing. Than I'm using Duik to make everything move.
Eyes have to stay pre comped and time remapped so I can control the whole head using one slider. Time remap is fine, eye control works fine with it. Problem happens when I connect the time remap to any slider (Afx or Duik).

If necessery I can bring this head turn to maya and use various layers to re-create the rig. That's more work of course.

Anyway, thank you for your help!


Return to posts index

Goran Ognjanovic
Re: Absolute position in after effects (with a time remap)
on Nov 20, 2018 at 12:04:43 am

OK, looks like I made it work somehow.

kept everything as is, head turn still connected to the slider. Brought both eyes/irises a few comps up, animated them to follow the head turn and pre comped them together to be at the same level as the head turn precomp.
Time remapped it and connected the eyes comp (time remap) to the same head turn slider.
Than I used the both eyes comp position channel that was not used, and simply connected the posituon to my eye ctrl null position in the main comp.

It's pretty complicated but it works ☺
After that I had to bring some other elements forward (like glasses, eyelids and similar, animate their masks, etc) so iris appears to be inside/under.

Thank you! I hope to start the animation finally.


Return to posts index


Kalleheikki Kannisto
Re: Absolute position in after effects (with a time remap)
on Nov 20, 2018 at 11:37:09 am

Great. "Un-time-remapping" a time remapped comp is something I would not like to try -- I don't know if it is even possible -- so I construct separately controllable parts outside of it like you did here.

As a side note, this is a pretty nice setup, not that simple either, but a very nice end result:

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]