ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Bar Graph Issues (file included)

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ambrose Salmini
Bar Graph Issues (file included)
on Jan 29, 2018 at 3:09:30 pm
Last Edited By Ambrose Salmini on Jan 29, 2018 at 6:41:52 pm

So I have a bar graph with a logo above each bar. The head/logos are pulled closer in z-space (-1000px). This is because of a style I have in the transition and I don't want to lose the parallax. When I parent the head/logo to the bar, it moves up with the bar, but because of the z space difference it moves exponentially more pixels than the bar, creating unwanted space between the head/logo and the bar.

I've also tried to use sourceRectAtTime() to no avail, as it still produces the same issue.

Hopefully someone can help. Thanks!

Here is project showing the issue

Return to posts index

Andrei Popa
Re: Bar Graph Issues (file included)
on Jan 30, 2018 at 7:52:22 am

In the folowing expression the camera can not be parented as it will return the wrong value. You can use toWorld() or toComp() in that case(haven't really used those, so i can not go in more detail). You put a null at the top of the bar and make it stay there. Then use this expression on your logo layers position. Modify mult until the position is the one you want. Mult should be the distance between camera and your logo. It is not my expression, I got it from here

p1 = thisComp.layer("Camera").transform.position;
p2 = thisComp.layer("NullAtTopOfBar").transform.position;
mult = thisComp.layer("HELPER").effect("Distance")("Slider");

p1 + mult*(p2-p1)/length(p1,p2);

My Envato portfolio.

Return to posts index

Ambrose Salmini
Re: Bar Graph Issues (file included)
on Jan 30, 2018 at 3:04:35 pm

Thanks Andrei,

While this does work to keep the logo in place, it seems to actually be pushing the logo back in z space, effectively removing the distance I want to keep in Z space.

I too tried toWorld() and toComp() but I have a minimal understanding of it currently. Maybe that is where the answer lies.

Is there anyone that can help with that?

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved