align function help…

Home Page forums Autodesk/Discreet Flame and Smoke align function help…

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #201598
    jjwatts
    Participant

    am trying to workout an expression to align the z rotation with the direction of an objects movement. i’m assuming the align expression is the one to use. something along the lines of align(axis.position, (0,0,1), frame….). any ideas? ta

    #215524
    ppcc
    Participant
    jjwatts wrote:
    am trying to workout an expression to align the z rotation with the direction of an objects movement. i’m assuming the align expression is the one to use. something along the lines of align(axis.position, (0,0,1), frame….). any ideas? ta

    Well, I think you almost have it, try to put this expression on the “rotation” parameter (not on x, y or z, but really “rotation”) : align(axis.position,(0,0,1)) and the the +z axis of the axis will follow the motion of the axis.
    If you want, take a look at the “expressions_text” setup in the example folder (/usr/discreet//examples/action/) to have an idea how to use it in conjunction with the eval function.
    Hope this helps.

    ventrap

    #215529
    Anonymous
    Inactive

    thanks, have tried that, however the result is just the object jumping 180º, north then south, rather than rotating smoothly…

    #215525
    ppcc
    Participant

    humm, strange, I tried it here and it seems to work, the only way I achieve not so good result is using motion path to move my axis. Do you use Motion path or explicit x/y/z motion?

    #215530
    Anonymous
    Inactive

    explicit translation as well. would you do me a favour and send me an action setup? i’m using 9.5.13….. i’ve had problems with a few expressions not working on my flame before, however the exact same expression worked on my flint…. hmmm… this current problem i’m trying on both machines, but with no joy… argh!!!

    #215526
    ppcc
    Participant

    Jason,
    you should receive the setup soon, check your mailbox.
    😉

    ventrap

    #215531
    Anonymous
    Inactive

    ok solution, courtesy of ventrap, thanks

    align(axis1.position,(1,0,0)) expressed onto the the whole of the rotation parameter
    of that axis gives, a 2d cutout/object, z rotation data based on the trajectory of the translation data.

    hope that makes sense…

    jason

    #215528
    Victor Makali
    Participant

    Is there a way to use Motion Path? I really want to use it to make nice smoth animations.

    #215527
    Ramazan
    Participant

    use motion path, then create a copy and link it to the original with a slip expression so the copy is always one frame ahead. Then use a lookat expression for the Z rotation channel to lookat the copy. Not tried it but it sounds cool to me !

    lookat expression from fxguide tips, by jake parker:

    http://www.fxguide.com/modules.php?name=fxtips&file=print&id=323

    example of a slip expression (by Alan Fairlie):

    http://www.fxguide.com/modules.php?name=fxtips&rop=showcontent&id=285

    let us know if it works!

    cheers

    paul

    ps…possibly another way is to have a particle generator on the motion path which generates the object as a particle with a lifetime of 1 frame, at a rate of 1 per frame…though you have to live with particle issues like the texturing etc

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Copy link
Powered by Social Snap