ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Controlling an animation/expression with markers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
aryan singh
Controlling an animation/expression with markers
on Nov 24, 2017 at 6:42:09 am

hi, I've done markers, but i don't know how to set this markers with controllers please check my attached snapshot and please help.

thanks
aryan


Return to posts index

Dan Ebberts
Re: Controlling an animation/expression with markers
on Nov 24, 2017 at 4:39:51 pm

What does the action layer in your skeleton comp look like?

Dan



Return to posts index

aryan singh
Re: Controlling an animation/expression with markers
on Nov 24, 2017 at 7:06:33 pm

Hi Dan, first of all I thankful you replied me very soon, I'm a big fan of you ☺ I followed your script and everything is very inspired to me, actually sir this skeleton is rigged through duik plugin, and there is 4 individual actions of this character, now I want to control these actions through slider controller, I already used markers for particular action and it's working but I don't know how I link this markers with controller


Return to posts index


Dan Ebberts
Re: Controlling an animation/expression with markers
on Nov 24, 2017 at 7:43:58 pm

So inside your skeleton comp you have a layer named "action" with markers with comments that match those on your "skeleton" pre-comp layer in your "man" comp? It's hard to say without seeing how you have things set up.

Dan



Return to posts index

aryan singh
Re: Controlling an animation/expression with markers
on Nov 25, 2017 at 5:20:02 am

Hi Dan, please check these screenshot, there i marked with red pen lines those things, now i want to do that, skelton comp connect with sliders control so i can switch character actions according to numbers which i mentioned in markers. thank you :)


Return to posts index

Dan Ebberts
Re: Controlling an animation/expression with markers
on Nov 25, 2017 at 7:33:11 am

The setup looks reasonable, so I guess I don't understand what the issue is. Does it not work?

Dan



Return to posts index


aryan singh
Re: Controlling an animation/expression with markers
on Nov 27, 2017 at 5:18:46 am

Hi Dan, hope you're doing well, actually i have one character and i animate it with 4 different action, now i want to connect this character with sliders control so i can directly switch my character action from slider, e.g:- like we change cloths and color through sliders or checkbox controls same i want change my character action through slider control, is this possible ??

thanks
Aryan


Return to posts index

Dan Ebberts
Re: Controlling an animation/expression with markers
on Nov 27, 2017 at 6:24:33 pm

So instead of using markers with the name of the action you want to keyframe a slider with the value of the corresponding action number, is that correct? If so, you should be able to do that by modifying the expression to something like this (Note--I have not tested this at all, so you may have to squash a few bugs):


action = comp("skelton").layer("action");
s = effect("Slider Control")("Slider");
n = 0;
if (s.numKeys > 0){
n = s.nearestKey(time).index;
if (s.key(n).time > time){
n--;
}
}

if (n == 0){
0
}else{
val = Math.round(s.valueAtTime(s.key(n).time)).toString();
t = time - s.key(n).time;
try{
actMarker = action.marker.key(val);
if (action.marker.numKeys > actMarker.index){
tMax = action.marker.key(actMarker.index + 1).time - actMarker.time;
}else{
tMax = action.outPoint - actMarker.time;
}
t = Math.min(t, tMax);
actMarker.time + t;
}catch (err){
0
}
}



Dan

Dan



Return to posts index

aryan singh
Re: Controlling an animation/expression with markers
on Nov 28, 2017 at 4:48:40 am

Hi Thanks for the info Dan, i'll try this and let you know, thanks for your guidance

Aryan


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]