[CREATE] Animation of a gradient

Carlos López González genetita at gmail.com
Mon Nov 8 09:13:32 PST 2010


Hi,
In Synfig we are considering to rewrite the current behavior of gradients
animation.
The current behavior is really user unsatisfactory when the gradient modify
its number of
stops along the time or moves it along the time.

It seems (because I haven't deep look the code yet) that stops never are
moved and instead
of move the the stops the when the gradient is interpolated between two
frames it just add as
many stops needs to match the previous and next frames where the changes are
made. So the
extra added stop points match the color of the two extreme gradients at that
position.

So I'm considering modify the gradient interpretation when animated to allow
move stop points
instead of create new static stop points and change its color.

I would like to have some feed back on anyone who has deal with animated
gradients and how was
the solution adopted.

Attached the definition of an animated gradient in its xml file in Synfig
(stop points are moved but Synfig creates
new stop points that merges the first and second waypoint)
As you can see, there is not information that specify if the stop points are
moved or they are just created on the fly
and its color adapted.I wold like to include some information in the file
definition to tell the application to behave moving the stop points
without change the color or add dummy stop points and change its color to
match the gradients in each waypoint.

    <param name="gradient">
      <animated type="gradient">
        <waypoint time="0s" before="auto" after="auto">
          <gradient guid="69ED6766CEA5C3EA94A650F755509AE2">
            <color pos="0.000000">
              <r>1.000000</r>
              <g>0.000000</g>
              <b>1.000000</b>
              <a>1.000000</a>
            </color>
            <color pos="1.000000">
              <r>0.000000</r>
              <g>0.000000</g>
              <b>0.000000</b>
              <a>1.000000</a>
            </color>
          </gradient>
        </waypoint>
        <waypoint time="1s" before="auto" after="auto">
          <gradient guid="C4E3A15BFF3FA7BEF9ED11B63F7C708C">
            <color pos="0.316239">
              <r>0.000000</r>
              <g>0.000000</g>
              <b>0.000000</b>
              <a>1.000000</a>
            </color>
            <color pos="0.683761">
              <r>1.000000</r>
              <g>0.000000</g>
              <b>1.000000</b>
              <a>1.000000</a>
            </color>
          </gradient>
        </waypoint>
      </animated>
    </param>

Greetings
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/create/attachments/20101108/cfbc0920/attachment.html>


More information about the CREATE mailing list