Robert Müller
Forum Replies Created
-
-
Hm wouldnt this affect the rotation of the needle based on the text value and not the other way around, since the expression is on the rotation of the needle?
I think it would be easier with these expressions.
For the left text:
Math.round(linear(thisComp.layer("needle").transform.rotation,-90,90,100,0))
And for the right text I just switched the mapped values:
Math.round(linear(thisComp.layer("needle").transform.rotation,-90,90,0,100))
I added the “Math.round” so that you’ll get clean values -
Robert Müller
June 3, 2020 at 1:32 pm in reply to: Finding an intersection of two lines and parenting itHi,
this should work just fine, you need to access the global position of your guides. I made a setup parenting a small white circle on an outlined one, driven by the rotation:
xC=thisComp.layer("x1c"); //small white circle 1; For the X value
yC=thisComp.layer("y1c"); //small white circle 2; For the Y value
x=xC.toComp(xC.anchorPoint)[0]; //getting the global X value
y=yC.toComp(yC.anchorPoint)[1]; //getting the global Y value
[x,y]I added this expression to the position of a null which then I can trace using Write-on or the plugin you linked.
-
if (thisComp.layer("EXTRACT PIECE").effect("3 Extract Z")("Slider")==1-59) 0 else 100;
Just for my understanding, do you want your condition be true if the slider has the value 1 minus 59? Or are you trying to check if the slider is between the value 1 and 59? Because at the moment you are doing the first. -
Robert Müller
June 2, 2020 at 1:56 pm in reply to: Creating Dynamic Labels: Finding the current time of child compHi Chris,
this should do the trick
sLayer = "";
for (i = index+1; i <= thisComp.numLayers; i++){
L = thisComp.layer(i);
if (! (L.hasVideo && L.active && L.opacity > 0)) continue;
sLayer = L.name;
sTime=timeToCurrentFormat(time-L.inPoint);
break;
}"YOUR STUDIO NAME - " +thisComp.name+"|"+timeToCurrentFormat() + "\n"+ sLayer+"|"+sTime;
-
Robert Müller
May 26, 2020 at 9:39 am in reply to: Can i select layers from the index in a comp via expression even if i replace the comp?I guess with scripts it should be possible, but sadly im not that good at writing scripts. Sorry
-
Hi,
First for the delay, you should reference the position of your original layer like this:
//Position controller
z = (index-1)*thisComp.layer("CONTROL").effect("Z")("Slider");
x = (index-1)*thisComp.layer("CONTROL").effect("X")("Slider");
y = (index-1)*thisComp.layer("CONTROL").effect("Y")("Slider");delay=0.5; //delay in seconds
mainPos=thisComp.layer("Main_layer").transform.position.valueAtTime(time-delay);[mainPos[0]+x,mainPos[1]+y,mainPos[2]+z];
And for the rotation its pretty similar with angle controlls instead of sliders (nore: I used the orientation property so that I only have one expression for all the angles)
//Rotation controller
rotX = (index-1)*thisComp.layer("CONTROL").effect("rot.X")(1);
rotY = (index-1)*thisComp.layer("CONTROL").effect("rot.Y")(1);
rotZ = (index-1)*thisComp.layer("CONTROL").effect("rot.Z")(1);delay=0.5; //delay in seconds
mainRot=thisComp.layer("Main_layer").transform.orientation.valueAtTime(time-delay);[mainRot[0]+rotX,mainRot[1]+rotY,mainRot[2]+rotZ];
Note that if you have a controll layer and a Main layer, you might have to change the index calculation, depending on how your layers are arranged.
-
Robert Müller
May 26, 2020 at 9:19 am in reply to: Can i select layers from the index in a comp via expression even if i replace the comp?First of all you can’t have the expression control name depend on layer names. And as I understand it you want the checkbox to drive the transparency but switch the layers underneath? That is possible but you would have to copy the expression, since the expression needs to be on the transparency property of your layer. But if you use numbers as names for your checkboxes you can work with indexes. Like this:
thisComp.layer("ctrl").effect(index-1)(1)*100
And this is the controll layout

-
Hi,
this should work for what you want:
var map = thisComp.layer("Luma_Effector");
var pos = map.fromWorld(toWorld(anchorPoint));
var sample = map.sampleImage([pos[0], pos[1]], [1, 1], true);
var mapValue = linear((sample[0] + sample[1] + sample[2]) / 3, map.effect("Scale All Low Value")("Slider"), map.effect("Scale All High Value")("Slider"));
[value[0], mapValue];Explanation: Since scale needs 2 values (x and y) the value is stored in an array. You can recognize arrays by the “[” and “]” brackets and the different values are seperated by commas. To get a certain value from an array you reference its position again with square brackets and the corresponding number. Arrays always start at 0 so the first value is always something like “example[0]”. So with this in mind, I replaced the first part of your array with “value[0]”, which represents the entered x value, which is still keyframeable.
-
Hi,
what do you mean be like this? Are you talking about the linear movement? This can be fixed by easing the keyframes
