Jump to content
Sign in to follow this  
DeepOmega

Card flipping animation assistance - anyway to automate this?

Recommended Posts

Sounds like you are already down a path, but the Echospace plug-in would work well for this too. If you wanted to do the itunes "coverflow" like effect that is. And if gray machine's code makes you head hurt like it does mine...

 

I was under the impression Echospace only works with identical layers - is this not the case? If so, damn.

 

Fortunately, code does not scare me. But these rendertimes do. Eesh.

 

By the way, gray machine - that camera facing stuff doesn't appear to work with precomped 3D layers. I think I might be able to adjust it so it bases it on a parent comp's camera, and then offset the position by the precomp's position, but at this point it's good enough to rough in. There's just some frame flickering with the flipping cards near the edge of the screen - they don't turn off at quite the right time.

 

Update if anyone cares about a lone animator's rassle with a ridiculous project on a ridiculous deadline: 45 seconds laid down pretty well. They should, hypothetically, just need timing polishing and some tweaks. Hypothetically. One page of text is in place. The nice part is, after this 45 seconds, I can wipe to a clean background and start rebuilding the layout, which will help with render times. With the current plan, this thing comes out to 11 8x8 grids. So that's, what, over 640 images, each of which is pretty high-res to accomadate zooming and camera effects as necessary. In the end, I doubt the high-res will be necessary, but I'd rather take the performance hit than risk getting to a point where I can't do a move I want without things going all pixelly.

 

Again, thanks for all the help guys.

 

~CTB

Share this post


Link to post
Share on other sites
By the way, gray machine - that camera facing stuff doesn't appear to work with precomped 3D layers. I

 

Maybe try swapping

 

b = thisComp.activeCamera.position - toWorld(anchorPoint);

 

with

 

b = comp("Your Comp Name").activeCamera.position - toWorld(anchorPoint);

 

Haven't tested that, though.

Share this post


Link to post
Share on other sites
a = toWorldVec([0,0,1]);

b = thisComp.activeCamera.position - toWorld(anchorPoint);

c = dot(a,b)/length(B);

if (c > 0) 0 else value

 

<nitpicking> if all you care about is whether c>0 or not, there really is no point in dividing by length(B). Just slows things down. </nitpicking>

 

But cool stuff :-)

Share this post


Link to post
Share on other sites
<nitpicking> if all you care about is whether c>0 or not, there really is no point in dividing by length( B) . Just slows things down. </nitpicking>

 

But cool stuff :-)

 

True.. in fact, here's a even smaller version:

 

a = toWorldVec([0,0,1]);

b = thisComp.activeCamera.position - toWorld(anchorPoint);

clamp(dot(a,B)+1, 0, 100);

Edited by graymachine

Share this post


Link to post
Share on other sites

I have an idea, but not sure how well it will work with your project. I have done a similar type of card flip project, and parented a image the same color as the background to the back of the card. Now if you have some funky bkg, then probably useless, but if it is a solid, then it should appear as if they disappear when flipped.

Share this post


Link to post
Share on other sites

It's showing tomorrow night. I'll post up a quicktime afterwards. The length got chopped to bits - it's down to less than 30 seconds. And I'm very dissatisfied with the camera moves. But since the due date was pushed up to monday... Ah well! Maybe I'll play around with it a bit more when I'm less busy, just for myself.

Share this post


Link to post
Share on other sites
True.. in fact, here's a even smaller version:

 

a = toWorldVec([0,0,1]);

b = thisComp.activeCamera.position - toWorld(anchorPoint);

clamp(dot(a,B)+1, 0, 100);

 

Pardon the additional nitpicking. This update seems to be culling the front face instead of back, which I realize can easily be overcome by setting the orientation to an additional 180 deg. Or by tacking on a inelegant

C=clamp(dot(a,+1, 0, 100);
linear(C, 0,100, 100,0)

The real reason I ask is that I'm trying to understand the 'dot()' and 'clamp()' functions better. I tried fumbling around with your syntax, but nothing I did seemed to work properly.

 

Also, do you know any good resources that explain the syntax and usage of all expression functions (those listed in the pulldown menu, as well as not)? The After Effects Help listing is piss poor.

Edited by substandard

Share this post


Link to post
Share on other sites

Oops, sorry. I was flipping it around to test it, and didn't notice which way was the front. Actually, this probably is really the shortest way to do it:

 

a = toWorldVec([0,0,1]);

b = thisComp.activeCamera.position - toWorld(anchorPoint);

if (dot( a , b ) > 0) 0 else value

 

 

Understanding "dot" requires understanding vectors, which JJ ifford explains pretty well:

 

http://jjgifford.com/expressions/geometry/...r_addition.html

 

Dot returns the product of two vectors. The short story here as that the product is always going to be negative if they are facing away from each other.

 

Clamp is much simpler, it simply returns a value limiting "a" to a value between b & c: clamp(a, b, c)

Edited by graymachine

Share this post


Link to post
Share on other sites
I was under the impression Echospace only works with identical layers - is this not the case? If so, damn.

 

Yes and no. You can un-hide the layers echospace creates and then replace them with alternate files w/ option+drag. But it does help if all the images are the same pixel size.

Share this post


Link to post
Share on other sites
Yes and no. You can un-hide the layers echospace creates and then replace them with alternate files w/ option+drag. But it does help if all the images are the same pixel size.

 

Gotcha. And now I know!

 

This reminds me tho. I did manage to knock up a quick normalizing expression - it automatically adjusts scale to whatever is needed to get a layer to a desired size. It made getting all 64 of these images to the same size a lot more reasonable.

 

~CTB

Edited by DeepOmega

Share this post


Link to post
Share on other sites
Gotcha. And now I know!

 

This reminds me tho. I did manage to knock up a quick normalizing expression - it automatically adjusts scale to whatever is needed to get a layer to a desired size. It made getting all 64 of these images to the same size a lot more reasonable.

 

~CTB

 

 

Really, what Echospace does is pretty similar to using something like:

 

thisComp.layer(index-1).WHATEVERPROPERTY.valueAtTime(time - .1)

 

Instead of "layer name" you can indentify layers by index number. Using "index - 1" pretty much says "follow the layer above".

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...