Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Auto Orient Y only – remain parallel horizontally

  • Auto Orient Y only – remain parallel horizontally

    Posted by Nathan Clark on September 12, 2022 at 1:10 am

    Hey guys,

    I’m a longterm user of Dan Ebberts’ Auto Orient Y Only expression. I have a requirement that’s a little bit more advanced and I can’t quite work out how to do it.

    The problem is, when auto oriented objects move away from camera centre, there is a twisting occurring. Usually I’d use another Ebberts’ expression to deal with this (‘Orient to Camera Plane’) – but I can’t work out how to combine the approaches.

    Basically I want the auto orient to always ensure that horizontal lines are parallel to the camera plane.

    If this isn’t super clear, I made a short video (<2min) explaining the issue.

    https://youtu.be/-33DeEHJjgI

    If anyone could help out I’d be extremely grateful,

    Thanks, Nathan

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Nathan Clark replied 3 years, 8 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    September 12, 2022 at 2:12 pm

    That’s a tricky one. This seems to work until the angles get too extreme (but there’s probably a better way):

    v = fromComp([1,0,0]);
    v1 = normalize([v[0],0,v[2]]);
    v2 = [1,0,0];
    radiansToDegrees(Math.acos(dot(v1,v2))) - 90
  • Nathan Clark

    September 12, 2022 at 4:01 pm

    Hi Dan, thanks so much for giving this a bit of thought. Sadly this new expression actually seems to make things worse 😬. I put together another video demonstration presenting a side-by-side with the original (auto orient Y) and the new expression – showing how it’s basically identical from one aspect, then gets progressively funkier as we orbit the camera around the 3d solid. Just in case it’s helpful, I’ll attach the project file. But also, if there’s no simple solution please don’t let this trouble you any further, I can always make a compromise and abandon this part of my treatment if need be. Thanks Nathan

    https://youtu.be/otEnb_C5eH4

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Dan Ebberts

    September 13, 2022 at 12:01 am

    I think part of the problem is that it’s not hard to conjure up a situation where just rotating on the y axis can’t make the top edge appear horizontal in the camera view, so I think it may be a problem with no solution in some situations.

  • Nathan Clark

    September 13, 2022 at 2:55 am

    Ah okay, so this I must counter! I believe that in every situation rotating the Y can make the top and bottom edges both appear perfectly horizontal, simultaneously. I intuitively know this thanks to a past-Nathan who was into doing perspective drawing. To prove this, another short video presentation. Again, no offence will be taken should you lose interest here, I just didn’t want to write it off as impossible for the above reason.

    https://youtu.be/3UWlx0KsKlU

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy