Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Keep particle from ever appearing backward to camera?

  • Keep particle from ever appearing backward to camera?

    Posted by Greg Neumayer on July 3, 2013 at 11:12 pm

    Here’s what I’m trying to accomplish:
    I have a bunch of letters as particles, and an emitter that spits them out. Their starting rotation is aligned to their path. When my emitter travels Left to Right, the letters come out backwards. This can be corrected by adding 180 deg to the Y rotation of the particle, but then, of course, if the emitter goes Rt to Lt, those ones are backward. I’m not looking for a “look at camera” effect where they all end up flat to the camera. I want them to be aligned to the path, but what I need help writing is an expression that will stealthily add 180 degrees to the particle’s Y rotation when they get perpendicular to the camera. So effectively, if it happens to be backward, it gets 180 degrees added to it’s Y-rotation value. And hopefully, because it only does this when it’s perpendicular to the camera (knife edge to camera), the flip will go unnoticed. Any ideas?
    Thanks!

    Antifreeze Design
    https://www.antifreezedesign.com

    Chris Wright replied 13 years, 2 months ago 3 Members · 7 Replies
  • 7 Replies
  • Dan Ebberts

    July 3, 2013 at 11:28 pm

    Try this for y rotation:

    if (toCompVec([0, 0, 1])[2] > 0 ) value else value + 180

    Dan

  • Greg Neumayer

    July 3, 2013 at 11:52 pm

    Thanks Dan.
    That seems like it will get me there*, but first I need to capture the relative rotation of the particle. I don’t know if I can do that with Particular. I’ve got ‘orient to motion’ turned on, but I’m not sure where I’d capture the particle rotation so that I can query it with your line of code. That Y rotation slot in Particular sits at zero, as the particles rotate along the path direction, so it’s a bit of a “whatever your rotation is PLUS this” kind of dial. Where do I access the relative rotation (vector?) of a particle?

    (*also note for the record: )
    if (toCompVec([0, 0, 1])[2] > 0 ) value else value + 180
    needs to use [0] in this case, since the X,Y,Z values are separated out, not in an array.

    Antifreeze Design
    https://www.antifreezedesign.com

  • Dan Ebberts

    July 4, 2013 at 12:08 am

    Ah, OK. As far as I know, Particular doesn’t provide any to access individual particle parameters. I thought maybe you had a DIY particle generator that was emitting 3D text layers.

    Dan

  • Greg Neumayer

    July 4, 2013 at 12:20 am

    I wish I were that good!
    Does AE provide enough expression tools that I could DIY an expression that would replace ‘align to path’? Then I could add your idea to it? Would I start by capturing the vector between current frame and previous of my emitter (null)?

    Antifreeze Design
    https://www.antifreezedesign.com

  • Dan Ebberts

    July 4, 2013 at 3:19 am

    How many particles do you have on the screen at any given time? A DIY particle system uses a separate layer for each particle (but they can be reused), so practical applications are limited. But you can get a lot of control over each particle.

    Dan

  • Greg Neumayer

    July 4, 2013 at 3:39 am

    I’m making multiple “snakes” of particles (via multiple instances of Particular, and have around 150 particles on screen at it’s heaviest. I’ve never considered a DIY solution. I’m leveraging quite a bit of Particular’s features like multiple particle instances or color variances.

    I would, however, be interested in taking a look at examples, tutorials, or other things that might get me started, or at least inspire. Do you have any leads?

    Thanks,
    Greg

    Antifreeze Design
    https://www.antifreezedesign.com

  • Chris Wright

    July 4, 2013 at 3:41 am

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