Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects 3D data to 2D space for write-on mask

  • 3D data to 2D space for write-on mask

    Posted by Andy Engelkemier on November 16, 2011 at 6:24 pm

    I have 3D renders and have a ball moving in 3D space. From 3dsMax I used the new link system to import the camera (it’s not moving in this case) and animated object. It matches my render exactly. Cool.

    Only, I needed those transforms to make a mask. I was planning on using write-on, but that only has 2D transforms.

    Is there a way to just watch the objects transforms in 2D space instead of 3D? I need it to move in 3D of course, but I only need to watch it in 2D.

    I couldn’t think of a way to gather that data. The only way I could think of to get a similar mask is to link a circle to it and echo every frame. But that gets Really heavy really fast.

    I’m drawing a blank on a good path. Can anyone jump in here?

    Roland R. kahlenberg replied 14 years, 6 months ago 4 Members · 7 Replies
  • 7 Replies
  • Walter Soyka

    November 16, 2011 at 6:56 pm

    [Andy Engelkemier] “Is there a way to just watch the objects transforms in 2D space instead of 3D? I need it to move in 3D of course, but I only need to watch it in 2D.”

    You need a layer space transform [link]. Add a new null object and paste this expression on its position:
    L = thisComp.layer("Shape Layer 1");
    L.toComp(L.anchorPoint)

    Substitute L.anchorPoint with [0,0,0] if you’re tracking a light (which doesn’t have an anchor point).

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

  • Andy Engelkemier

    November 16, 2011 at 7:16 pm

    That worked. I found that about the time your replied as well on another post that Dan Ebbert replied to. I used the 0,0,0 method, however the object Does have an anchor point. It’s not moved though, so that’s probably why it works.

    I like your formatting a bit better here because it is more telling of what’s going on. I’d never seen toComp, toWorld, fromComp, etc. used before so didn’t really understand what they would be used for.

    About the write-on though. I didn’t realize animating the brush size over time doesn’t change the size over time. It changes the brush size and All previous brush strokes at the current time. There goes my idea of creating some line thickness changes with write-on. I guess I’ll have to play with just animating a circle size and position with also using echo or something? That’s all I can think of for now. Once the frames start stacking up that just gets Really slow.

  • Brian Charles

    November 16, 2011 at 7:23 pm

    [Andy Engelkemier]
    About the write-on though. I didn’t realize animating the brush size over time doesn’t change the size over time. It changes the brush size and All previous brush strokes at the current time. “

  • Andy Engelkemier

    November 16, 2011 at 7:36 pm

    OMG I can’t believe I overlooked that.

    It’s been one of those days I guess. Sometimes I’m too quick to jump to another solution if I see one. I actually just needed the brush to go away for a couple sections. I just animated the position off screen, then back on where it resumed.

    This will allow me to get some wiggle in now, and I can taper that off instead of just having it disappear.

    My client won’t care, but I will be much more pleased. lol

    Thanks

  • Roland R. kahlenberg

    November 16, 2011 at 9:22 pm

    [Andy Engelkemier] “That worked. I found that about the time your replied as well on another post that Dan Ebbert replied to. I used the 0,0,0 method, however the object Does have an anchor point. It’s not moved though, so that’s probably why it works. “

    Using the [0,0,0] array works just like how using anchorPoint does and it should work even if the 3D layer was moving. If you used anchorPoint, your 2D layer will hook itself to the … well anchorPoint, which is at the center of the layer unless you’ve moved it.

    I prefer the array method, which incidentally, hooks itself to the top-left of the 3D layer. The array method allows you to selectively offset along each axis individually. So, if you wanted to link a 2D layer or effect to a 3D layer BUT offset it from the top-left by say 50 pixels on the x-axis and 200 pixels on the z-axis, then you would type [50,0,200] instead of [0,0,0].

    The following is a 2-line Expression script that will allow you to experiment a bit with the toComp Expression method. The first line must be part of the script. I have provided 3 examples of the second line, each will give you a different result. To test the 2-line script, simply remove the two forward slashes that precede each corresponding line – do not forget to put the forward slashes back on
    to disable that line of code as you test the other two examples.

    LayerTarget = thisComp.layer(“Yellow Solid 3”);
    //LayerTarget.toComp([0,0,0])
    //LayerTarget.toComp(anchorPoint-[00,0,0])
    //LayerTarget.toComp(LayerTarget.anchorPoint-[0,0,0])

    HTH
    RoRK

    Intensive AE & Mocha Training in Singapore and Malaysia
    Adobe ACE/ACI (version 7) & Imagineer Systems Inc Approved Mocha Trainer

  • Andy Engelkemier

    November 17, 2011 at 12:03 pm

    Very cool. Thanks for the examples to test out. That’s a great way to understand how things work. I’m sure that will help future readers as well.

    The way 3dsMax “set states” works is it imports a null object for every object you’re asking to bring in. So it seems the array method works the best.

  • Roland R. kahlenberg

    November 17, 2011 at 1:53 pm

    I think it’s cool too. 😉

    Most folks just take the toComp Expression method as an end-all procedure. But it can be used as a beginning to other useful and interesting stuff.

    Cheers
    RoRK

    Intensive AE & Mocha Training in Singapore and Malaysia
    Adobe ACE/ACI (version 7) & Imagineer Systems Inc Approved Mocha Trainer

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