Activity › Forums › Adobe After Effects Expressions › Need help adding Z space to this connector expression
-
Need help adding Z space to this connector expression
Posted by Afshar13 on March 7, 2007 at 9:14 pmHi
I just finished Adobe Total Training dvd set and i found a Connector expression (by Fred Lewis for a line between two points) can any one fix this to work between 2 points in 3d space? you guys rule!Connector By Fred Lewis
These Expressioss can be used to make a connector that stretches like a rubber band between two layers, which by default are namedAfshar13 replied 19 years, 2 months ago 3 Members · 6 Replies -
6 Replies
-
Filip Vandueren
March 8, 2007 at 1:54 amHi,
I changed your expressions to this:
/ apply this Expression to the Connector layer’s Position parameter
// set follow1 below to the name of the first layer to follow
follow1 = “End 1”
this_comp.layer(follow1).position
________________
// apply this Expression to Connector layer’s ORIENTATION parameter
// set follow2 below to the name of second layer to follow
follow2 = “End 2”
lookAt(position,this_comp.layer(follow2).position);
________________
// apply this Expression to Connector layer’s Scale parameter
// set follow2 below to the name of second layer to follow
follow2 = “End 2”
stretch = 100 * (length(position,this_comp.layer(follow2).position) / this.width);
[stretch,scale[1], scale[2]];
—————
Set Y Rotation to -90 degreesI changed the Stretch expression so it works for layers that are not 100px wide.
Kown Issue:
– the line can get pretty thin at certain positions: it connects the two objects perfectly, but it doesn’t automatically show it’s flattest widest side to the camera.
– this only seems to work in Comps that have Square Pixel aspect ratio.
-
Afshar13
March 8, 2007 at 4:00 amthat seemed to do it accept where my connector touches my second element the connector does’nt quite touch it. There is a little gap between it and the element. I tried simply increasing the size of the connector but no joy. Any final sugestions for this AE newbe…
thanks again! -
Filip Vandueren
March 8, 2007 at 4:05 amIs it a solid or a vector layer ?
Perhaps toggling on the “Rasterize Continously” switch will help, as It could be an interpolation-stretch error from the soft edge.
Also make sure the AnchorPoint’s left is exactly at 0 -
Mylenium
March 8, 2007 at 11:11 amMost likely it’s the filtering of the 3D layers. You could only minimize this by using much longer layers, so instead of 100 px length use 10000 or so.
Mylenium
[Pour Myl
-
Afshar13
March 8, 2007 at 9:55 pmIts a vector mask, i will try these sugestions
Thank you gentlemen.
Reply to this Discussion! Login or Sign Up