Here’s my solution…
Not elegant maybe, but works great. I’d love any feedback or enhancements.
This set of expressions will allow you to make a 3D line between any two 3d layers you stick it between. It will respond to depth of field, moving layers, etc. with no stacking issues and no need to use beam filter. The nice thing is that you can modify it so your line could have all kinds of effects or change shape, etc.
1) Stick a rectangular shape layer (with 3D checked and position dimensions separated) between any two 3D layers (that have position dimensions separated). The anchor of your shape layer should be (0,0,0).
2) Make the width of your rectangle exactly match the distance between those layers with this expression. (You need to apply this expression to JUST the width parameter of the rectangle.) I did it this way:
In a SLIDER:
point1=this_comp.layer(thisLayer, -1).position;
point2=this_comp.layer(thisLayer, 1).position;
length(point1, point2)
In my rectangle in the size parameter:
temp = effect(“Slider Control”)(“Slider”);
[temp[0], value[1]]
3) Put the shape exactly between the two layers in 3D space.
In X:
(thisComp.layer(thisLayer,-1).transform.xPosition+thisComp.layer(thisLayer, 1).transform.xPosition)/2
In Y:
(thisComp.layer(thisLayer,-1).transform.yPosition+thisComp.layer(thisLayer,1).transform.yPosition)/2
In Z:
(thisComp.layer(thisLayer,-1).transform.zPosition+thisComp.layer(thisLayer,1).transform.zPosition)/2
4) Orient the layer so it exactly connects the two other layers:
In ORIENTATION:
lookAt (thisComp.layer(thisLayer,-1).transform.position, thisComp.layer(thisLayer,1).transform.position)
Again, I’d love any suggestions. Thanks!
================================================
YOU can help save TimeSpace. Join the Chronos Protectorate!
https://www.95ers.com
https://www.SpaceAceMedia.com