Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Maintaining stroke widths within a 3d enabled precomp regardless of camera position.

  • Maintaining stroke widths within a 3d enabled precomp regardless of camera position.

    Posted by Sam Burrough on August 17, 2017 at 4:36 pm

    I am working on a 2d animation project which requires that all the line art stoke widths remain at 1px at all times.

    I can use Dan Ebberts’ amazing expression to maintain stroke widths for shape layers, but I have no idea how I would go about maintaining the stroke widths of shape layers that are within a precomp layer when tracking in close with the camera.

    Just wondering if anyone has tried to achieve this before and if so how did you get on?

    “To country people Cows are mild,
    And flee from any stick they throw;
    But I’m a timid town bred child,
    And all the cattle seem to know.”

    Sam Burrough replied 9 years ago 3 Members · 7 Replies
  • 7 Replies
  • Kevin Camp

    August 17, 2017 at 6:07 pm

    you might be able to link the distance between the pre-comp and the camera (in the main comp) to the stroke values in the pre-comp.

    if you post the expression, we could take a look…

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Cassius Marques

    August 17, 2017 at 9:19 pm

    Your title is a little misleading… you will never be able to mantain the width if you rotate the camera without enabling “auto orient” on the precomp. That would require a 3d path and would be outside AE’s standard capabilities.

    Its doable If all you need is to translate camera Z distance from a pre comp to a stroke width inside it. I’m sure Kevin can help you with that.

    Cassius Marques
    http://www.zapfilmes.com

  • Sam Burrough

    August 18, 2017 at 8:31 am

    Hi Kevin,

    Thanks, here’s Dan’s expression:

    nominalDist = 400;

    d = length (thisComp.layer(“Camera 1”).toWorld([0,0,0]),toWorld(anchorPoint));
    value*(d/nominalDist)

    (Set nominalDist to the distance where you want the stroke width to be the value you have it set to)

    “To country people Cows are mild,
    And flee from any stick they throw;
    But I’m a timid town bred child,
    And all the cattle seem to know.”

  • Sam Burrough

    August 18, 2017 at 9:09 am

    Hi David, thanks for getting back to me. I have explained some of the difficulties you mentioned above. I have now been provided with a reference which might help illustrate the desired result a little better. The following screenshots and gif are take from Buck’s Amp awards opening titles. As you can see the stroke width of the line art remains the same even when elements move towards or away from camera:

    “To country people Cows are mild,
    And flee from any stick they throw;
    But I’m a timid town bred child,
    And all the cattle seem to know.”

  • Sam Burrough

    August 18, 2017 at 9:12 am

    Thanks Cassius, I posted the expression above.

    “To country people Cows are mild,
    And flee from any stick they throw;
    But I’m a timid town bred child,
    And all the cattle seem to know.”

  • Kevin Camp

    August 18, 2017 at 7:12 pm

    [Sam Burrough] “d = length (thisComp.layer(“Camera 1″).toWorld([0,0,0]),toWorld(anchorPoint));”

    in that line of your expression, try changing thisComp to the comp(“NAME OF COMP WITH CAMERA”), where you replace [NAME OF COMP WITH CAMERA] with the name of your comp that has the camera and the pre-comp in it.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Sam Burrough

    August 21, 2017 at 8:54 am

    Will give this a go and report back, thanks Kevin!

    “To country people Cows are mild,
    And flee from any stick they throw;
    But I’m a timid town bred child,
    And all the cattle seem to know.”

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