Forum Replies Created

Page 968 of 1081
  • Dan Ebberts

    July 23, 2007 at 7:12 pm in reply to: Count up Expression

    Just one note – be careful using “startTime” as a variable name because there is already a layer attribute with that name. I found this out the hard way. 🙂

    Dan

  • Dan Ebberts

    July 20, 2007 at 11:39 pm in reply to: Expression for keeping layers oriented toward camera

    No expression needed:

    Layer > Transform > Auto-Orient > Orient Towards Camera

    Dan

  • Dan Ebberts

    July 19, 2007 at 7:39 pm in reply to: Bounce at regular interval

    Yup, that’s how it should work.

    Dan

  • You can scale the output min and max by selecting “Custom” for the Range Output Min/Max setting. Does that not do what you need?

    Dan

  • Dan Ebberts

    July 19, 2007 at 1:31 pm in reply to: CC Sphere “Rotations”

    Andrew,

    I think the main difference would be that you can see the rotation values (and therefore get at them with other expressions), where auto-orient operates in stealth mode and hides the orientation values.

    Dan

  • Dan Ebberts

    July 19, 2007 at 12:55 am in reply to: CC Sphere “Rotations”

    Hmmm…. You know, it might be as simple as this:

    // x rotation:

    lookAt(thisComp.activeCamera.position,position)[0]

    // y rotation:

    lookAt(thisComp.activeCamera.position,position)[1]

    // z rotation:

    lookAt(thisComp.activeCamera.position,position)[2]

    Pretty cool idea.

    Dan

  • Dan Ebberts

    July 18, 2007 at 9:44 pm in reply to: Bounce at regular interval

    Aharon,

    If you keyframe one cycle of the bounce with three keyframes, add a slider to set the bounce period and another for the bounce start time, something like this should work:

    period = effect(“period”)(“Slider”);
    bounceStart = effect(“start”)(“Slider”);

    t = ((time – bounceStart)%period)/period;
    valueAtTime(linear(t, key(1).time, key(3).time))

    You’ll probably want to reduce the slider ranges to give you finer control.

    Dan

  • Dan Ebberts

    July 18, 2007 at 6:25 pm in reply to: Animate Checkbox to Audio Waveform

    Sure,

    Math.floor(time*freq)%2

    just generates a square wave that runs at the frequency defined by freq. It does that by multiplying the current comp time by the frequency, converting that to an integer (that’s what Math.floor does), then converting even integers to zeros and odd integers to ones (that’s what %2 does). This gives you the alternating ones and zeros while the level is above the threshold.

    Any good JavaScript reference will have more detailed info on Math.floor() and % if you’re interested.

    Dan

  • Dan Ebberts

    July 18, 2007 at 5:37 pm in reply to: Animate Checkbox to Audio Waveform

    Something like this maybe?

    threshold = .5;
    freq = 5; //mouth actions per second
    level = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);

    if (level > threshold) Math.floor(time*freq)%2 else 1

    Dan

  • Dan Ebberts

    July 18, 2007 at 4:04 pm in reply to: Referencing a parent of a comp

    No, not really. Here’s my understanding of the reason:

    Since a comp can appear as a precomp in any number of other comps, it can’t really have a parent. A nested comp is really an instance of a comp (not a copy), so any change to that comp affects all the instances wherever they appear. So you can’t have an instance of a comp that behaves differently than other instances.

    Dan

Page 968 of 1081

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy