Final Xform Animation

Issue #12 resolved
Former user created an issue

Final xform doesn't animate for me - checking "animate" won't rotate it at all, and "manual" rotation by making keyframes just jumps from one to the next where each key is set, changing only to keyframe values and nothing in between it. Is final xform "animatable"?

Comments (4)

  1. Matt Feemster repo owner

    I dug into the code and it appears the rotating the affines during animation loops does not apply to the final xform, as you noticed. If you look at Ember.h, line 999

    https://bitbucket.org/mfeemster/fractorium/src/90e7097d7f04b9abbf866df53ef6f81ca2376698/Source/Ember/Ember.h?at=master&fileviewer=file-view-default

    you can see the function that does it:

    void RotateAffines(T angle)
        {
            for (size_t i = 0; i < XformCount(); i++)//Only look at normal xforms, exclude final.
            {
                //Don't rotate xforms with animate set to 0.
                if (m_Xforms[i].m_Animate == 0)
                    continue;
    
                //Assume that if there are no variations, then it's a padding xform.
                if (m_Xforms[i].Empty() && m_AffineInterp != eAffineInterp::AFFINE_INTERP_LOG)
                    continue;
    
                m_Xforms[i].m_Affine.Rotate(angle * DEG_2_RAD_T);
                //Don't rotate post.
            }
        }
    

    The function XformCount() excludes the final xform. In order to include it, we'd use TotalXformCount().

    To be honest, all of the animation code is just a C++ port of the original flam3 C code, with a few minor additions and bug fixes.

    So the only reason the final xform is excluded is because "it's always been that way".

    Also, you pointed out that the GUI allows you to select "animate" for a final xform, but it does nothing. I definitely see how this could be confusing.

    Here is what I'm thinking, tell me if you like it:

    -Leave the animate option available for final xforms on the GUI, but default it to false/unchecked. -If checked, animating the final will happen in loops.

    This will be fairly easy to implement, but I have some other features I'm working on, so it'll probably be about 2 months before another release.

    If you want to chat in real time about this, I am on the fractal chats discord under this same name, mfeemster.

  2. Log in to comment