Andy Kreutzberg
Forum Replies Created
-
Andy Kreutzberg
March 7, 2013 at 12:16 pm in reply to: Comparing Values from infinite amount of LayersHey again,
i just tried to play with the above code a little.
startIdx = 8;
stopIdx = thisComp.numLayers – 5;
n = 0;
for (idx = startIdx; idx <= stopIdx; idx++){
txt = thisComp.layer(idx).text.sourceText.split(“r”);
for (i = 0; i < txt.length; i++) n = Math.max(n, txt[i].length);I wanted to change it into a counter for the largest amount of line breaks in any of the text layers within the index range and output that amount as a number on a slider control. So i replaced the following line
txt = thisComp.layer(idx).text.sourceText.split(“r”)
by this line:
thisComp.layer(idx).text.sourceText.split(/n|r/);
However, the output for the variable n is a fixed number 17. I have tried to play around with this a bit further, but no matter what i change, i either get a fixed number, an error or the number of line breaks of the text layer with the highest index. I think i am missing a detail somewhere. Whenever i think i got it, something just does not work out.
-
Andy Kreutzberg
February 25, 2013 at 4:14 pm in reply to: Comparing Values from infinite amount of LayersNo worries, Dan! I have assigned an on/off switch in the form of a checkbox for this auto-scaler and wrapped your expression with an if/else statement. Now the error seems to have been gone. If it should happen again, i will just use the on/off switch to apply the feature. That should work. Thanks!
-
Andy Kreutzberg
February 25, 2013 at 3:54 pm in reply to: Comparing Values from infinite amount of LayersHey Dan, thank you very much for looking into this. Your expression seems to do what it should, however, i get an error “After Effects Error: invalid text transaction (26::386) after duplicating Layer 8 and double clicking the duplicate. So this error basically appears whenever i want to change the text of the duplicate while changing the originals text seems to yield no errors. I had that before with some expressions referring to sourceText as a floating variable.
-
Andy Kreutzberg
February 25, 2013 at 12:05 pm in reply to: Element 3D / How to make 3D Objects disappear behind element layers?Hello,
i am relatively new to element myself, but depending on how complex your scene is, you can use the animation groups that come with element for the purpose you mentioned. Say you have a obj file for the planet and an obj file for the text, the planet would sit on group 1 and the text would sit on group 2. Now if you animate them and the planet group is in front of the text group, the text will be covered by the planet group and not be visible. Alternatively, with the recent update you can also import obj. sequences containing pre-designed animations. Might be useful when your scene is too complex for using the groups animators (only 5 of these are possible as of now).
Not sure if that’s a solution for your specific case. I found element is useful for scenes with not too much animation from not too many objects. For more complex stuff, the plugin probably needs some extended features to be added in the future (like more than 5 animation groups).
-
Andy Kreutzberg
February 25, 2013 at 11:36 am in reply to: Comparing Values from infinite amount of LayersSo here is the details of the situation:
the first layer carrying the expression mentioned before always has the index of 8 (duplicating this layer will move the duplicate to index 8 and the original down to 9 though, not sure if thats important). After this index 8 layer that needs to be duplicated, there is a total of 5 layers with an index range from 9 to 13. When Layer 8 is duplicated, the index numbers for these layers are increasing of course. So basically, the range of the layers that need to be looked at is 8 to (number of layers) -5. Now i have the problem that i don’t know how to define this range and keep it infinite.
The thing is, each new layer will add an individual value to the calculation. How would the expression from post one look like with this defined range of layers, with each individual value from each new duplicate of layer 8 adding into the calculation?
-
Andy Kreutzberg
February 25, 2013 at 10:38 am in reply to: Expressions for keyframeable Dropdown PropertiesThanks Dan, that’s exactly what i needed to know. I suppose this will be the same for all keyframeable drop down selections. Never thought that the plain number would do it! Sometimes it’s easier than one would expect.
-
Andy Kreutzberg
February 22, 2013 at 7:41 pm in reply to: One Second Fade after Event at a certain Time…Now i just did the following test:
i changed the first line of your expression to:
if (target.position.speed > 0){
I noticed when the null is just staying still, the value remains 50 until it reaches the last keyframe before the movement kicks back in while it really should just fade from 50 to 0.
I also noticed that when i put a loopOut(“cycle”) on the null, the emission will stop and not continue with the null movement because the expression is looking at keyframes. Could there maybe be a solution involving valueAtTime for the speed of the null?
-
Andy Kreutzberg
February 22, 2013 at 7:09 pm in reply to: One Second Fade after Event at a certain Time…Thanks Kevin. It could be pretty close. Here is what happens when your expression is part of the birth rate:
The null moves downward from 0 to 3 seconds. During this time, the value for the particles is 50 but it should really be 0 during this action of the null. When it stops its downward movement at 3 seconds, the birth rate fades from 50 to 0 over the following second. So basically the range from 0 to 3 seconds (between the first two keyframes) should be 0 before going to 50 at the 3 second mark (keyframe 2) and then fading away to 0.
However, from second 5 to 6 the null is moving upwards again and then from second 6 to second 7 downwards to a stop. During this movement, the birth rate remains 50 and after the keyframe at the 7th second, the birth rate fades to 0. I might be able to adjust it though, it really is almost there. It just needs to be 0 while the movements happen.
-
Andy Kreutzberg
February 22, 2013 at 4:24 pm in reply to: Comparing Values from infinite amount of LayersHi Dan, thanks for your input. I will continue working on this by monday and then see how i can manage it. The layers in question would be duplicated in an index range between layer 7 and layer index thisComp.numLayers-5. Subtracting (thisComp.numLayers-5)-7 should give the amount of duplicated layers. So i guess somewhere in there is the solution. The index range for the duplicates is definitely defineable.
-
Guys, you helped me out again! I never used the modulus % operator before. Did some research now after i saw your expression and this seems to do the trick. Works like a charm. Also, in dan’s expression the array with the three values works nicely. At first, i was a bit confused about the comp.width thing but i just replaced it with [200, 750, 1300] which is the exact positions for the layers. It’s amazing. Thanks again!