Allan Ricarte
Forum Replies Created
-
Wow, i really don’t know what to say, Thank you so much for the help! That’s exactly what i was looking for. I was literally trying to put this idea to work for months (yeah, months). Hope this general idea can help everyone that is looking for something similar to that. (Looping, Markers and arrays). Once again Filip, thank you!
-
yeah, it seems a bit confusing to understand what i’m trying to do, I’ll try my best to explain it as simple as possible
I’m using a “txt” as list array for it, It just a txt + 10 layers named “page 1” to “page 10”.
So, what i want to calculate is how many markers have been cross between the pages (1 to 10) until it cross itself , and break it with that value. This is an example video.
https://www.youtube.com/watch?v=xlWg4DTBpd8
Why do i need this number?
it’s to match that number with the “txt” array to calculate to z-depth. (Piece of code below)
This is a final example project, what i’m trying to reach. Just to have a overall view about it.
https://www.youtube.com/watch?v=cqbZV0gmaS0
Thanks for the answer!
list = thisComp.layer("txt").text.sourceText.split(",");
match = "match the markers what i need here";
for (i = 0; i<list.length; i++) {
if ( match == list[i] ){
arr = i;
break;
} else { arr = match}
}
Some contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.
-
So, basically what i’m trying to do is to use the markers as reference to the Z position. Like a page on top of each other but using markers as a guide for it.
For loop is checking which markers is coming first, and then will give it (1 * zPosition) to that exactly layer, afterwards the loop will check which markers is coming after the first one, then (2 * zPosition), and so on.
Another solution that i thought it was check all markers that crossed the timeline and then break it when it cross itself, and holding that value.
I’ve got everything done (code below), but i can’t hold the value, it’s still counts the other markers afterwards.I’ve tried everything and i know I’m missing something, but i couldn’t figure it out, unfortunately.
Any idea will help, Thanks for the reply!
book = "";
myArray = [];for (i = 1; i <= 10; i++){
mk = thisLayer.marker
m = thisComp.layer("Page "+i).markern = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;}k = 0;
if (mk.numKeys > 0){
k = mk.nearestKey(time).index;
if (mk.key(k).time > time) k--;}if ( n > 0 && m.key(n).comment === "page"){
myArray.push(myArray.length);
}if ( k > 0 && m.key(k).comment === "page"){
len = myArray.length;}else{
len = 0;}
}book = len
-
Allan Ricarte
December 5, 2018 at 3:58 pm in reply to: Triggering animation with markers without commentsSo basically, What I’m trying to achieve is to use the markers themselves to trigger the “animation” and use the markers comments to change
values in nested comps at the same time.That’s the idea behind it.
So, my first idea to identify each markers individually was changing “layerMarkerName” to number “layerMarkerName = 1” to specify markers, e.g “marker.key(1), marker.key(2)”. after triggering at the first marker, it would add +1 to its value and so on, but I couldn’t get it to work properly, i don’t know if it is even possible to do that.
Hopefully, this all makes sense. Any help it’d be helpful.
Thanks for the answer!
-
Yeah, it’s really tricky to be done.
I know exactly what you mean, both Sliders to do the interpolation and removing the card in percentage , but to be honest, i have no idea how i could achieve that in expression language, i’ve tried multiples expressions, i had no results, probably looks that I’m missing something really simple.
I had an idea that it could work, it’s just to predetermine each position from the text layer list. when it’s [1,] it would use position[0] = 540 for example, when [1,2,], the “1” would “position[0] – 30, rotation -2” and it would add another value for the 2 layer and so on. if i would need to remove any layer in between it would roll back to the previously value. Using sliders w/ percentage calc, i think i could do the interpolation. What do you think about it?
If you know any topic about expressions or something similar, that could help me to learn a little more about to achieve that, or if you can help about, please let me know
Thanks for the help!
-
Thanks for the answer
Basically, for sure i could do that, in this situation would work nicely, but in my original project is more complex than that
So, each shape shown in the video is like from a ‘list’ in txt layer, imagine if i had like 6 of them (1,2,3,4,5,6), and i wanna just move the third one, and do the “interpolation” moving everything else together, but i couldn’t stuck on that value ,because for example, if i need move the fifth one, i would need the layers do that “animation” again, but not using the “original value” and use the last value instead.
You’ve helped me like a week ago about a similar question, you gave me the idea about listing layers with a txt layer. Which helped me a lot, Thanks!
If you have any idea that could help me about it, i will really appreciate!
This is the an example animated
https://youtu.be/RhhssUlLpZIThanks again!.
Some contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.
-
Allan Ricarte
September 23, 2018 at 12:20 am in reply to: Auto Offset (index) by moving a layer to another [x,y]?Thank you so much, the text layer idea was really helpful and smart, i didn’t know you could do such a thing with expressions, Also this project will be helpful to me learn even more about that.
Once again, Thank you for your time!
Allan.
-
Allan Ricarte
September 21, 2018 at 3:26 pm in reply to: Auto Offset (index) by moving a layer to another [x,y]?That’s the exactly what i’m looking for, calculate a new index value based on their new [x,y] position, I’m looking for a “Deck of Cards” magic, where someone takes a card (a layer) anywhere from the deck, and fill the gap between cards automatically, i was thinking to do something like that:
if yPosition value is not +1 in above layer (e.g: 540, 542, 543), it would subtract -1 from yPosition from all layers above, but If i need to do that again, it would take the new value for that formula instead
It seems very complex, but i think it would work for me
Please let me know if i’m still unclear about it, I’ll do an animation to you guys better understanding.
Thanks for the help!
-
Allan Ricarte
September 21, 2018 at 5:52 am in reply to: Auto Offset (index) by moving a layer to another [x,y]?Thanks for the answer! But i think i didn’t explained very well, the idea behind is “Pick a card anywhere from the deck, and shuffle”, a deck of card (the index offset), i want to take a card anywhere from it (move [x,y]) and organize the deck back in order without letting a gap between cards that i just took.
Of course doing this by animation, it should be easy, but I have to do this a lot, That’s why i’m doing like a “Template”, “Preset” for it
Hopefully, I’ve explained better
Thanks again for your time!