--- Chris Moore <[EMAIL PROTECTED]> escribió: > On 9/15/07, Carlos Lopez Gonzalez > <[EMAIL PROTECTED]> wrote: > > I have other idea: > > Hi Carlos. > > The idea you describe is exactly how I implemented > the animation of > gradients. I was mailing Ulrik back and forth about > how the animation > of gradients should look, rather than how it should > be implemented, > because I thought that would be easier for him to > relate to, but > something like what you suggested was already > forming in my mind. > It's available from subversion now - revision 676 > and later have > animated gradients. TCB, and all the other > interpolation modes work, > just like for colors, and all other types in Synfig. > > In the most common case, the 2 gradients will have > the same number of > CPoints, and they'll be in the same places, so the > number of CPoints > doesn't actually grow, but in the case where it does > I'm doing exactly > what you suggested. > > The only complication is when there are 2 or more > CPoints exactly on > top of each other. You might think that this isn't > useful, but it's > how you get sudden changes of color. The 'stripes' > valuenode type > uses it for example to make its sharp stripey > gradients. So when > combining two gradients, I look at them both in > order, and when I find > they both have CPoints at the same point, I take the > first CPoint from > each at that point and merge them, then the last > from each (at that > point) and merge them. I'm currently throwing any > extra ones away. > Is there any need for more than 2 CPoints at the > same position? > > Chris. > >
You're absolutely right. I felt a little silly once I send the message and read your first proposal and realize then that it was the same solution that I gave. Regarding about more than two Cpoints at same place I think It only should have some use if you want to animate the position of the CPoints. Imagine for example that you have 3 CPoints at same place. Frame 1 red @ 0.5 green @ 0.5 blue @ 0.5 When they are at the same place the gradient is a half red and a half blue. If I move the CPoint blue to 0.75 @ frame 24 then the gradient should look like a red-green-blue strip. I'm wondering if it would be better to Convert the Gradient into its components: *Gradient **CPoint 1 ***Color ***Position **CPoint 2 ***Color ***Position **CPoint 3 ***Color ***Position and so on. In this way the position or the color could be easily animated and everything is easier. If you want to go from a 3 CPoints gradient to a 5 CPoints gradient just create the 2 extra ones before, without changing the look of the original gradient and then move it and change its color as you want. FOrgive me if you have discussed this option before and I reopen it again... Thanks Carlos PS: Hi Ulrik! Nice to see you again! (We know each other from some time ago...) ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio > 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Synfig-user mailing list > Synfig-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/synfig-user > ____________________________________________________________________________________ Sé un Mejor Amante del Cine ¿Quieres saber cómo? ¡Deja que otras personas te ayuden! http://advision.webevents.yahoo.com/reto/entretenimiento.html ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Synfig-user mailing list Synfig-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-user