Michael Hussar
Forum Replies Created
-
Hi Stu,
Unfortunately, I’m not entirely sure about what the solution is here. Maybe Dan or one of the other more senior members will offer some suggestions. I’m sorry that I can’t be of much more help with this code.
Best,
Michael
-
The problem is that even though you can reference the NUll position in the expression, you can’t use the NULL to control the vertex points in real time(at least not the last time I researched trying to do the very same thing).
I would be nice and it seems like it makes sense to have this ability but for whatever the reason is, Adobe doesn’t allow for control of mask vertices in real time. -
Sure. What exactly are you trying to do?
-
Thanks for your help Dan! I was able to work out the problem. Just in case anyone else needs to map tracker nulls to vertex points on a mask, I’ve included the code below.
Best,
Michael
//used to find the comp shown in quotes in the given project and assign to variable.
var vComp = projectItem("compMouth");
var vNullPos = vComp.layer(1).property("ADBE Transform Group").property("ADBE Position");var V_Trackers =[];
var IT_Trackers = [[0,0],[0,0],[0,0],[0,0],[0,0]];
var OT_Trackers = [[0,0],[0,0],[0,0],[0,0],[0,0]];
var newArray = [];
var vertsArray = [];
var strArray = "";var myMask = vComp.layer("mouth").mask(1);
myProperty = myMask.property("ADBE Mask Shape");
myPath = myProperty.value;UpdatePositionXY () ;
function UpdatePositionXY () {
// iterate through all KEY FRAMES FOR EACH TRACKER -- ASSUMPTION IS THAT ALL TRACKERS WILL HAVE THE SAME NUMBER OF KEYFRAMES AS THE FIRST TRACKER WHICH IS BEING USED TO GET numKeys
for (var j = 1; j <= vNullPos.numKeys; j++){//Iterate through all tracker null layers for the given key frame and concatenate their position [x,y] data into an array of vertices
for (var tracker = 1; tracker <= vComp.numLayers-1; tracker++){V_Trackers.push(vComp.layer(tracker).property("ADBE Transform Group").property("ADBE Position").keyValue(j)) ;
$.writeln("------------------------------");
$.writeln("Mask shape vertex x-y coordinants based onTracker Null " + tracker + " for keyframe " + j + ":" );
$.writeln(V_Trackers[tracker-1]);strArray = V_Trackers[tracker-1].toString();
strArray = strArray.split(",");for (var s = 0; s < strArray.length; s++){
// $.writeln("This is the " + s + " element of the string array: " + parseFloat(strArray[s]));
newArray.push(parseFloat(strArray[s]));
}newArray.pop();
$.writeln(newArray);
vertsArray.push (newArray)
newArray = [];}
//CONCATENATED ALL THE TRACKERS X,Y FOR THE J'TH KEYFRAME
$.writeln("------------------------------");
$.writeln("These are ALL the mask shape vertex x-y coordinants based on all the tracker nulls for keyframe " + j );
$.writeln(vertsArray);myPath.inTangents = IT_Trackers;
myPath.outTangents = OT_Trackers;
myPath.closed = true;
myMask.rotoBezier = false;
myPath.vertices = vertsArray;
myProperty.setValueAtTime(vNullPos.keyTime(j),myPath);// Reset for next set of trackers in next key frame
V_Trackers = [];
vertsArray = [];
}}
-
Is there a way to convert the string array into
A bracketed tuple array ? Or maybe I’m going about this the wrong way and should be concatenating the position key values in a different way to build my array
That will be compatible with the mask shape vertex array? -
Thanks for the reply Dan.
I actually did just that and found that
the value of the string variable gave me exactly
What I expected but the value of the first item in
The array was missing the square brackets
In both the alert and the writeln.
I thought that once I used the split that it would
Creat array items with the square brackets.
This is why I’m confused -
Michael Hussar
December 2, 2011 at 7:41 pm in reply to: Need verification with Setting up an After effects composition for hdcam SRThanks Kevin! Question: When I spoke to the editor that will be receiving the my final animation, he said that he would take the final render file if it was rendered 1080p, i.e., I wouldn’t set any fields in the Render setting, 59.94 fps etc.
I know for certain that his final edit is 1080i 59.94. Won’t it cause him problems if he incorporates 1080p footage (my animation) into his 1080i edit? Or is it the case that he would import and convert my animation into his NLE program? If he can just do the conversion on his end, are there downsides to this wrt quality, render artifacts/glitches etc.?
-
Michael Hussar
July 18, 2009 at 3:43 am in reply to: Simple script to create logged clips from timecode numbersAlex, Thanks so much. Your detail are very helpful. I appreciate the time you took to spell it all out.
Thanks again 🙂
Michael
-
Michael Hussar
July 18, 2009 at 3:41 am in reply to: Simple script to create logged clips from timecode numbersThanks Mike ! much appreciated
Michael
-
thank you 🙂