Page 1 of 1

Saber - Outputting 2D coordinates for Start / End Offset

PostPosted: 07/4/2016, 6:09 am
by MisterBlack
Hello there,

First off, congratulations to the VC Team for yet an awesome plug-in. You guys are invaluable to the community!

Now, I'm working on a small project on which I'm planning on using Saber. This being said, one of the effects I want to achieve is to attach a light to the Start / End Offset. Obviously since the offset is expressed in percentages I need to find a way to output the position of the Offset in X,Y coordinates so I can link those to a light. So, is this possible? I imagine it is doable usign some expression but I couldn't find a way of doing it.

Any ideas?

Thanks guys!

Kind regards,
Andrei

Re: Saber - Outputting 2D coordinates for Start / End Offset

PostPosted: 07/5/2016, 12:49 am
by star+circle
In pseudo code:

Code: Select all
Saber start point + (Saber start offset/100)*(Saber end point - Saber start point)


Actual expression for position (assuming your Saber layer is called "Saber):

Code: Select all
thisComp.layer("Saber").effect("Saber")("Core Start")+thisComp.layer("Saber").effect("Saber")("Start Offset")/100*(thisComp.layer("Saber").effect("Saber")("Core End")-thisComp.layer("Saber").effect("Saber")("Core Start"))


That is for the start offset, the end offset expression should be pretty obvious from that.

Re: Saber - Outputting 2D coordinates for Start / End Offset

PostPosted: 07/6/2016, 12:19 am
by MisterBlack
Thanks!

However this only seems to work on a normal Start - End Point Saber. I'm using Saber on a mask so I need to have the light follow the Start Offset as it moves around the mask. Thanks anyway!

Re: Saber - Outputting 2D coordinates for Start / End Offset

PostPosted: 07/6/2016, 7:35 am
by star+circle
In that case, you'll need to animate a null along the same path (copy the path and paste it to the position of the null) and use an expression to get the position of the null at a time corresponding to the motion between beginning and end (using valueAtTime). Given that the default motion path takes 2 seconds, you'd have to calculate the time vs. Saber offset progress so that the inPoint of the null layer corresponds to Start and 2 seconds after the inPoint corresponds to End. Then link it to the Start Offset of Saber. And then attach the light position to the null. Duplicate with End value if you want flares at each end.

It is way simpler than it sounds, start offset null position expression here:

Code: Select all
transform.position.valueAtTime(thisComp.layer("Saber").effect("Saber")("Start Offset")/(2/thisComp.frameDuration))


(I didn't fully test it, I don't have Saber installed on the computer I'm at)