Spin modifier Decelerate?

Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
edited December 1969 in Carrara Discussion

Good Morning
I'm having some issues with the spin modifier. I need a cylinder to spin slow down and stop. Then reverse direction.
I'm animating a tape machine so I have 5 things that that need to spin in sync and slow down. Spin seems like it should be a easier solution then rotate. The problem I have is it seems when I enter keyframes the object reverses direction regardless of spin setting.
I have tried two methods. One creating a spin modifier for each segment. One from 00 to 10 secs, one from 20 secs to 30 secs etc. This worked but I had problems decelerating.
The way I hoped would work is to create one spin modifier for the full duration of one minute, then using keyframes set spin at 0 rpm, then 1 rpm then zero rpm then -1 rpm. But behavior seems to me unpredictable. When a keyfrme goes from -1 rpm to -.5 rpm the object reverses direction. In fact adding a keyframe seems to reverse the objects direction no matter if the keyframe is set to 1 rpm or -1 rpm. I assume this is a bug? Am I missing something? Oddly using a discrete keyframe instead of a linear doesn't cause this reversal
Thank You
.8068

«1

Comments

  • th3Digitth3Digit Posts: 16,639
    edited December 1969

    I am not sure, but I think you need to keyframe in a complete standstill before you can reverse, I have done it with a ferris wheel unintentionally I might add, meant it to just slow to a stop then speed up and go again.

  • Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
    edited December 1969

    Hey Wendy!
    Sounds like you had a similar issue. Problem is
    I don't want it to reverse but any keyframe seems to cause a reverse.
    8068

  • RoygeeRoygee Posts: 2,220
    edited March 2013

    Yes, it is a bug - I recall a discussion on this some years ago when I was animating a Ferris Wheel. Someone very kindly gave us a formula to fix this - I have it on a CD somewhere - i'll search for that.

    In the meantime, you may have some luck searching the old forum for something like "spin modifier formula" :)

    EDIT:

    Found it!

    This was posted by Sub7th - where is he now?


    "Make sure you set your keyframes to angles rather than Quaternion
    Then go to the keyframe you want it to stop spinning at and type in the degree of rotations you want. So 1 rotation is 360 and 2 rotations = 720, etc.
    Next make sure the tweener is Bezier.

    Then you can use the "Ease in-out " and "Tighten in-out" to tweak the beginning and ending speed.

    Watch the curve in the tween graph - it should start going up then kind of flattening out at the top of the graph towards the end.

    That'l give you speed in the beginning and it should slow to a stop at the end. "

    Using variations of this method should get you to where you want to be.

    Wouldn't it be great if we had a repository for all these great tips so they don't get lost in the mists of time!

    Hope this helps you :)

    Post edited by Roygee on
  • Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
    edited December 1969

    Roygee
    Thanks for the information. I'll give it a shot. Anybody know if this was fixed in 8.5?
    ( I'm using 8.1.112)
    Thank You
    8068

  • 0oseven0oseven Posts: 492
    edited December 1969

    I tried a few things in c8.5 and still reversing so assume its not fixed, You should put in a bug report.

    I set rotation at 0 first keyframe and at 2 seconds set rotation to 1 cycle ps and keyframed, then at 4 seconds set rot to 0 again an set keyframe.
    To my mind this should produce an acceleration to 1cps then back to stop but it reverses in the second phase.

    Indeed the graph of the modifier shows a nice curve for this behavior and I couldn se anything else unusual.

    anyway I guess this just confirms what you already know'
    must be a bug not yet fixed.

  • Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
    edited December 1969

    Roygee
    I'm a little embarrassed here. I looked around for Quaternion and even searched the manual, and aside from the manual
    saying Carrara could use Quaternion I couldn't find the setting. Does this method still involve the spin modifier? Or is it using rotate?
    So I am a little unclear on how to use the method you mentioned.

    For the work I'm doing spin modifier is very handy, so yes I would like to submit a bug report. The only way I see to do that is via Carrara Cafe? I tried there and used my Carrara Cafe Log In and it wouldn't allow me. Anyone know if there is another way to submit a bug report?
    Thank You all again.
    8068

  • evilproducerevilproducer Posts: 8,571
    edited March 2013

    Hey, I just tested the formual Roygee found from Sub7th. It worked beautifully. You will find the Angles motion and Quaternion motion method in the object's Motion Tab under Keyframe. I've attached a screen shot.


    You will not need to use the spin modifier. You will need to use the object's rotation. 360º is one rotation so multiply that by how many rotations you want and place the play head at the point along the timeline you want you object to quit spinning and type the value into either the X, Y, or Z field under rotation. To reverse the rotation move the play head to the end of the animation (if it's supposed to stay spinning) and type a multiple of 360º and place a "-" in front of it (see screenshot) and it will reverse the direction of the spin. Use the bezier tweener and adjust the Ease in and Ease out percentage. I suppose you could also use an oscillate tweener as well.

    Picture_3.png
    242 x 75 - 10K
    spinning-pen.gif
    480 x 360 - 287K
    Picture_2.png
    253 x 596 - 52K
    Post edited by evilproducer on
  • wetcircuitwetcircuit Posts: 0
    edited December 1969

    So... which is Quarternian and which is Angles? I've been confused by this in the past...

    I'm assuming Angles is the one that is -180 to +180 degrees

    but what does Quaternian mean anyway...?

    or do I have them mixed up?

  • Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
    edited December 1969

    Roygee, Evilproducer
    Thanks so Much!!!!! This is perfect and I think easier then using a spin modifier.
    Brilliant!
    Now it's time to learn NLA because if I set this behavior on 4 objects I should be able to copy and paste right?
    Thank You both so much again, this is going to make my project go so much smoother!
    8068

  • RoygeeRoygee Posts: 2,220
    edited December 1969

    I'd also love to get a good layman's explanation of the difference - something to do with Euler angles and gimbal lock. All I know is that Quaternion is a right PITA for setting constraints. Wish this could be changed globally in the preferences.

    EP has answered very clearly - thanks - except for the bug reporting question

    Get this - there is no way I can find my way to the bug tracker through the Daz site since the new forum format. The URL is https://bugs.daz3d.com - but you'll have to register separately from your Daz account to be able to report a bug.

    Not being Genesis-related, it is highly unlikely anyone will take any notice of it anyway:)

  • evilproducerevilproducer Posts: 8,571
    edited December 1969

    So... which is Quarternian and which is Angles? I've been confused by this in the past...

    I'm assuming Angles is the one that is -180 to +180 degrees

    but what does Quaternian mean anyway...?

    or do I have them mixed up?


    Angles seems to be the one with the 360º rotation. At least that's what I used for the spinning pen. I used the standard 4 second time and switched the pen's keyframe method to angles and at the 2 second mark typed 720 in the "Z" rotation field. I then scrubbed to the end of the timeline and typed -720 in the "Z" field. That would give one rotation per second, stop, and then reverse one rotation per second.

  • Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
    edited December 1969

    So... which is Quarternian and which is Angles? I've been confused by this in the past...

    I'm assuming Angles is the one that is -180 to +180 degrees

    but what does Quaternian mean anyway...?

    or do I have them mixed up?

    http://en.wikipedia.org/wiki/Quaternion
    This cleared up nothing for me :)

  • evilproducerevilproducer Posts: 8,571
    edited December 1969

    8068 said:
    So... which is Quarternian and which is Angles? I've been confused by this in the past...

    I'm assuming Angles is the one that is -180 to +180 degrees

    but what does Quaternian mean anyway...?

    or do I have them mixed up?

    http://en.wikipedia.org/wiki/Quaternion
    This cleared up nothing for me :)

    I think one of my brain cells just exploded. Reading that late at night, not a good idea!

  • wetcircuitwetcircuit Posts: 0
    edited December 1969

    8068 said:
    So... which is Quarternian and which is Angles? I've been confused by this in the past...

    I'm assuming Angles is the one that is -180 to +180 degrees

    but what does Quaternian mean anyway...?

    or do I have them mixed up?

    http://en.wikipedia.org/wiki/Quaternion
    This cleared up nothing for me :)

    I think one of my brain cells just exploded. Reading that late at night, not a good idea!

    OMG... :shut:

  • evilproducerevilproducer Posts: 8,571
    edited March 2013

    I think one of my brain cells just exploded. Reading that late at night, not a good idea!

    OMG... :shut:

    I did say reading it late at night=not good! :sick: I'm still suffering.

    Post edited by evilproducer on
  • th3Digitth3Digit Posts: 16,639
    edited December 1969

    I looked too, eek

  • evilproducerevilproducer Posts: 8,571
    edited December 1969

    I looked too, eek


    It isn't late at night where you are though. Less brain cells should have exploded! :-P

  • th3Digitth3Digit Posts: 16,639
    edited December 1969

    less to spare

  • evilproducerevilproducer Posts: 8,571
    edited December 1969

    less to spare

    It's the Foster's isn't it? ;-)

  • th3Digitth3Digit Posts: 16,639
    edited December 1969

    Farmers Union iced Coffee
    I hardly touch alcohol now, seem to have an allergy, only can drink vodka, other stuff makes me ill and then only one or two 5% premixes and I am out like a light.
    so rarely do

  • evilproducerevilproducer Posts: 8,571
    edited December 1969

    Farmers Union iced Coffee
    I hardly touch alcohol now, seem to have an allergy, only can drink vodka, other stuff makes me ill and then only one or two 5% premixes and I am out like a light.
    so rarely do

    Not a drinker here either. No objection to it, just don't like it.

  • McGuiverMcGuiver Posts: 193
    edited March 2013

    Here is a somewhat understandable explanation I found. ;)

    Euler angles are most likely what you are used to (the 3 numbers in your Rotate Object are an Euler angle). An Euler angle expresses a 3d angle as 3 numbers, the rotation around the x, y and z axis. These numbers are in degrees (a number between 0-360).

    Quaternions are similar to Euler angles in that they express 3d angles. Unlike Euler angles, the mechanics of Quaternions quite difficult to grasp for most people (they are closely related to complex numbers). The reason that they are important is they do not suffer from a certain mathematical issue with Euler angles, called Gimbal Lock (http://en.wikipedia.org/wiki/Gimbal_lock).

    Angle/axis is related to quaternions. the problem with the angle/axis is that it''s difficult to use when there is a series of rotations to consider. a quaternion holds the same information as the angle axis representation, but is more convenient to implement operations using the quaternion representation.
    The problem with those is that changes in the rotation in one axis of rotation changes what orientation the other rotations will put the object in. Consider the case where an object''s orientation is represented by (0, 90, 0). When you change the last parameter, the effect will be a rotation around the z axis. However, when you change the first parameter, the effect will also be a rotation around the z axis since the original rotation around the x axis is the rotated around the y axis, meaning that the x axis becomes aligned with the z axis.

    Anyhow, this effect is called gimbal lock. If all that makes sense to you, it''s pretty easy to see that interpolating values in this representation will not result in the natural rotation of your object between two different orientations.

    The issue with quaternions is that constant interval linear interpolation of two quaternions will not produce a constant speed rotation. Instead, use spherical linear interpolation (slerp).
    EDIT: this is why the spin modifier does not work as you would think ....

    Post edited by McGuiver on
  • Design AcrobatDesign Acrobat Posts: 459
    edited December 1969

    Here's a video about Gimbal lock.

    http://vimeo.com/2824431

  • Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
    edited December 1969

    Here's a video about Gimbal lock.

    http://vimeo.com/2824431

    Excellent video, Thanks.
    8068

  • tbwoqtbwoq Posts: 238
    edited March 2013

    Not sure why the Spin modifier reverses direction when adding a 0.00 keyframe. I think there was a feature request awhile ago to change this. Currenlty, the direction appears to change at half the cycles per second in keyframes after setting a 0.00 key.
    ----
    In Carrara, the Quaternion gimbal display is fixed. So no matter how you move the rotation theres always a way to see the XYZ axis. No gimbal lock, just axis plane switching. With Angles you can change the order of the XYZ axis. So if you have a gimbal lock(two axis rotating on the same plane), you can change the order to avoid it.

    EDIT: Tip: In preferences, select 3D View->Allow Gimbal Mode keep checked to show the actual rotation of the gimbal wire display. Uncheck, 'Use linear tracking in manipulator'. This makes it easier for some rotation manipulations.

    Btw, is it just me or are the Angles hierarchy backwards. Example: XYZ...X should move Y and Y should move Z axis. Correct?

    Post edited by tbwoq on
  • Box8068_31c338ee4bBox8068_31c338ee4b Posts: 266
    edited December 1969

    tbwoq
    I really like the rotation option using angles, so I've haven't messed with the spin modifier much since I had the problem.
    But I did notice I was able to accelerate, it appeared to me that it was interpreting a decrease in spin rpm as a reversal of rotation.
    If I looked at the keyframes in the graph editor A flat line or increase held direction but a the keyframe that started the decrease the motion reversed.
    I'm not smart enough yet to answer your last question :)
    8068

  • RoygeeRoygee Posts: 2,220
    edited December 1969

    Btw, is it just me or are the Angles hierarchy backwards. Example: XYZ…X should move Y and Y should move Z axis. Correct?

    Not too sure what the question is and I can't say I have a great understanding of how Carrara deals with rotations. I have found that when setting constraints on a skeleton, you need to switch to angles, because doing it in Quaternion causes a lot of problems. Setting one constraint often causes another to go out of whack and before you know it, the joint is no longer correctly oriented.

    I haven't found anything in the Carrara manual referring to rotation order, so I use the Daz Studio rule of thumb - first, the axis the joint would twist in, then the one least likely to reach a 90 degree bend, then the one most likely to reach 90 degrees.

    So, for instance, in a skeleton of a human modeled in the T-position, the elbow joint would be XYZ and the knee would be ZYX.

    I recall a discussion here on this topic a few years back where a very knowledgeable member said that rotation order was of no importance - whether or not that is so, I use this rule of thumb and it works for me:)

  • th3Digitth3Digit Posts: 16,639
    edited December 1969

    Roygee said:
    Btw, is it just me or are the Angles hierarchy backwards. Example: XYZ…X should move Y and Y should move Z axis. Correct?

    Not too sure what the question is and I can't say I have a great understanding of how Carrara deals with rotations. I have found that when setting constraints on a skeleton, you need to switch to angles, because doing it in Quaternion causes a lot of problems. Setting one constraint often causes another to go out of whack and before you know it, the joint is no longer correctly oriented.

    I haven't found anything in the Carrara manual referring to rotation order, so I use the Daz Studio rule of thumb - first, the axis the joint would twist in, then the one least likely to reach a 90 degree bend, then the one most likely to reach 90 degrees.

    So, for instance, in a skeleton of a human modeled in the T-position, the elbow joint would be XYZ and the knee would be ZYX.

    I recall a discussion here on this topic a few years back where a very knowledgeable member said that rotation order was of no importance - whether or not that is so, I use this rule of thumb and it works for me:)
    but the thumb is opposable?
    unlike any other joint, so would not using the "rule of thumb" result in some very limber double jointed ik restraints?
    this is a joke btw, just could not help myself, utterly confused by this thread no and no closer to making my ferris wheel play nicely

  • RoygeeRoygee Posts: 2,220
    edited December 1969

    THUMBS RULE :)

  • tbwoqtbwoq Posts: 238
    edited December 1969

    The Angles rotation order hieracrhy is similar to regular instance list hierarchy in that the parent will also rotate(move) its children when selected.

    So with an Angles order of XYZ, rotating the X axis ring should also rotate both the Y & Z axis rings,....rotating the Y should only move the Y & Z axis rings. The Z axis ring will not move X or Y because its last in the hierarchy/chain.

    When I try this with Angles, XYZ order, its the oposite. Z moves the X & Y axis rings(etc.). If backwards, this could be major problem, or cause, why some animation transfers(maybe like BVH etc.) may/will not work correclty. Any form of a backwards hierarchy is major showstopper(imho).

    The Spin modifier appears to working correctly, only that adding a keyframe to change speed appears to split the difference in the math for 360/180 degrees or tweeners. The axis reverses direction with anything other than the same 1 to 1 input. Im sure someone with coding knowledge can say why the Spin modifier math isn't matching with motion axis rotation values.

Sign In or Register to comment.