Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flipping Multiple Cards in One Composition

New Here ,
Aug 16, 2019 Aug 16, 2019

Hello;

I am flipping 6 cards (two rows of 3)  in one composition, the two cards in the center of the composition flip perfectly, but the other cards want to flip to the opposite side of where they are.  If I add a keyframe to the position, it kind of works but still a not as smoothly as the two in the center.

I am assuming that the Y 180 degrees is looking at the composition space and that is my issue.  How can I fix this?

Thanks!

TOPICS
Expressions
354
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 12, 2019 Sep 12, 2019

Can you please provide a screenshot or short video of the issue, as well as the code your are using?

 

*Martin

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 13, 2019 Sep 13, 2019
LATEST

Since I don't have any idea how you set up your project I will tell you how I would do it

  • Add a Card Back layer to the composition, make it 3D, rotate the card 180º in Y
  • Duplicate the Card Back layer 5 times and make sure they have unique names
  • Add your 6 Card Face layers to the composition and make them 3D
  • Parent each Card Face layer to the appropriate card front layer so the Card Front is the parent
  • Add this expression from Dan Ebberts to the top Card Face layer

 

 

toCompVec([0, 0, 1])[2] > 0 ? value : 0​

 

 

  • With the opacity property selected choose Copy Expression only from the Edit Menu
  • Select all layers and Paste
  • Because the comp has 3D layers it is a good idea to add a comp camera and maybe some lights
  • Select all of the Card Back layers and lock them then if you want to clean up the timeline shy all the Card Back layers and enable Hide Shy Layers
  • Start with Card Face 1 and arrange your cards in the comp
  • Select all Card Face layers and press the R key to expose the rotation properties
  • Animate the rotation property of each card, probably Y rotation only, to make the cards flip the way you want them to flip
  • Finalize the framing and lighting of the scene by adjusting the position of the camera and adding lights as necessary
  • Add a background layer or nest this comp in your master comp

There you go. The expression hides the layers when they face away from the camera no matter where the camera is. This eliminates the problem of two layers sharing the same Z space. The parenting keeps the Card Back layers attached to the Card Face layers.

 

If that workflow does not solve your problem we need to see a screenshot of your composition with the modified properties of each layer revealed. Just press UU, PrintScreen and Paste to the forum. Cropped screenshots or screenshots that don't show us what you have done to the layers that are giving you problems are pretty useless.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines