ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

link camera moves with 2d distortion coordinates?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jason Jantzen
link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 6:40:27 pm

I've had trouble with this in the past, and haven't figured out a convenient solution yet. I've got a bulge effect on a 3d layer, so when the camera moves, or even the layer, the position coordinates don't move with it. Has someone figured a way to link the position coordinate for effects like this (radial wipe, ramp, etc) to the layer's position and animate the coordinate position independently?

Jason Jantzen
vimeo.com/jasonj


Return to posts index

Darby Edelen
Re: link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 8:20:08 pm

[Jason Jantzen] "Has someone figured a way to link the position coordinate for effects like this (radial wipe, ramp, etc) to the layer's position and animate the coordinate position independently?"

I'm not clear on the problem you're having. If there's a 3D layer that is not continuously rasterized its effects should maintain their location relative to the layer when you move the layer or camera. Is that the behavior you want or do you want the effect to stay in the same position relative to the composition?

Darby Edelen


Return to posts index

Jason Jantzen
Re: link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 8:41:36 pm

ah, that's it. i have a bunch of vectors, so yeah, they're continuously rasterized, and at this moment, there's no going back to resize them and start over. do you think there's any way around it?

Jason Jantzen
vimeo.com/jasonj


Return to posts index


Darby Edelen
Re: link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 8:59:07 pm

[Jason Jantzen] "ah, that's it. i have a bunch of vectors, so yeah, they're continuously rasterized, and at this moment, there's no going back to resize them and start over. do you think there's any way around it?"

With a continuously rasterized layer the effect's position is in composition space, so you'll need to use an expression to convert the position value in the effect from layer to composition space. Sounds complicated but there's an easy expression for this:

toComp(value);

The above applied to the effect's position property will cause the effect to track its position with the layer's position.

However, you still won't get proper rotation or scaling of the effect. Those would require separate more complex and more effect dependent expressions to handle.

Darby Edelen


Return to posts index

Darby Edelen
Re: link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 9:03:29 pm

[Darby Edelen] "However, you still won't get proper rotation or scaling of the effect. Those would require separate more complex and more effect dependent expressions to handle."

Here's the expression you'd apply to the Bulge's Horizontal and Vertical Radius properties assuming that you've applied it to a continuously rasterized 3D layer:

try{
c = thisComp.activeCamera;
z = c.cameraOption.zoom;
p = toWorld(anchorPoint);
cp = c.toWorld([0,0,0]);
cv = c.toWorldVec([0,0,1]);
dist = p - cp;
value * z / dot(dist, cv);
}
catch(err){
value;
}


This will return the default value (not work) if there is no active camera at the current frame.

Darby Edelen


Return to posts index

Jason Jantzen
Re: link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 9:20:37 pm

cool! the bulge expression works great, but how do I control the size of it? also, I'm still having trouble keeping the bulge center on the layer's position. keeps moving around with the camera move.

Jason Jantzen
vimeo.com/jasonj


Return to posts index


Darby Edelen
Re: link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 9:25:36 pm

[Jason Jantzen] "cool! the bulge expression works great, but how do I control the size of it? also, I'm still having trouble keeping the bulge center on the layer's position. keeps moving around with the camera move."

The expressions are tied to the Bulge Center and Bulge Radius properties, so changing them will change the location and size of the Bulge relative to the layer.

As I said, these expressions do not account for rotation of the layer relative to the camera, they only work correctly when assuming the layer is facing the camera.

These are only stop gap solutions.

Darby Edelen


Return to posts index

Jason Jantzen
Re: link camera moves with 2d distortion coordinates?
on Nov 6, 2012 at 10:08:30 pm

yeah, i'm using a null for my camera position and not rotating.

I figured it out finally. I just wasn't applying it to the right place, but then I also realized I needed to animate the position value again since its values changed relative to the comp.

Thanks so much Darby, I think this is perfect.

Jason Jantzen
vimeo.com/jasonj


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]