Difference between revisions of "Convert"
m (add 'Gradient Color') 
m (→Overview: parabolic image) 

(81 intermediate revisions by 9 users not shown)  
Line 1:  Line 1:  
−  +  <! Page info >  
+  {{TitleConvert}}  
+  {{TOCright}}  
+  {{CategoryGlossary}}  
+  {{NewTerminology}}  
+  {{CategoryData Linking}}  
+  <! Page info end >  
+  * This page need a better formating (for example sorting by categories : math/angle/boolean/...)  
+  * Some convert types are missing [https://github.com/synfig/synfig/blob/master/synfigcore/src/synfig/valuenode.cpp#L151 see here]  
−  To convert the  +  ==Overview== 
+  Rightclicking on a value in the {{lParameters Panel}} brings up a context menu which has a submenu called {{LiteralConvert}}.  
+  
+  The {{LiteralConvert}} menu allows you to specify that the parameter should be controlled automatically in various ways or used in mathematical formulas. Depending on the type of the parameter the Convert menu will contain different options.  
+  
+  To convert the parameter back to its original type, select {{LiteralDisconnect}} from its context menu.  
+  
+  [[File:ParabolicShot.gifframecenter100pxYou can have a look to the {{lParabolic Shot}} tutorial for a "real life" use of the {{lConvert}} feature.  
+  ]]  
+  
+  {{NoteConverting animated valuesWhen a parameter is animated it is (internally) converted to '''Animated Value node'''. Converting to another '''Convert Types''' replaces the link. }}  
== Convert Types ==  == Convert Types ==  
Line 7:  Line 25:  
=== Add ===  === Add ===  
−  Converting a parameter to  +  Converting a parameter to {{LiteralAdd}} adds three subparameters, the first two of which are the same type as the parameter itself: 
* <param> "LHS"  * <param> "LHS"  
* <param> "RHS"  * <param> "RHS"  
* real "Scalar"  * real "Scalar"  
−  The  +  The {{LiteralAdd}} conversion can be used with parameters of type {{lConvert#Angleangle}}, {{lConvert#Colorcolor}}, {{lConvert#Gradientgradient}}, {{lConvert#Integerinteger}}, {{lConvert#Realreal}}, {{lConvert#Timetime}}, and {{lConvert#Vectorvector}}. 
The resulting value is:  The resulting value is:  
(LHS + RHS) * Scalar  (LHS + RHS) * Scalar  
−  ===  +  === And === 
−  Converting  +  Converting a {{lConvert#Boolbool}} parameter to {{LiteralAnd}} adds two subparameters: 
−  *  +  * bool "Link1" 
−  *  +  * bool "Link2" 
−  The resulting value is  +  The resulting value is true only if both Link1 and Link2 are true. 
−  +  
−  
−  ===  +  === Angle String === 
−  Converting  +  Converting an {{lConvert#Stringstring}}valued parameter to {{LiteralAngle String}} adds four subparameters: 
+  * angle "Angle"  
+  * integer "Width"  
+  * integer "Precision"  
+  * bool "Zero Padded"  
−  +  The resulting value a string containing the value of {{LiteralAngle}} (in degrees) formatted as a string with a minimum width {{LiteralWidth}}, with {{LiteralPrecision}} decimal places. If {{LiteralZero Padded}} is true, it will be leftpadded with '''0''' characters.  
−  +  === aTan2 ===  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  Converting an {{lConvert#Angleangle}}valued parameter to {{LiteralaTan2}} adds two subparameters:  
+  * real "X"  
+  * real "Y".  
−  +  The resulting value is:  
+  atan2(y,x)  
−  +  ie. atan(y/x) but without an error when x is '''0'''. The value is the angle between the x axis and the vector (x,y).  
+  === Spline ===  
−  +  Converting a {{lConvert#Listlist}} parameter to {{LiteralSpline}} doesn't seem to change anything. Perhaps that's the default type for lists of vertices, such as are found in outlines and regions?  
−  ===  +  === Compare === 
−  Converting a  +  Converting a {{lConvert#Boolbool}} parameter to {{LiteralCompare}} adds five subparameters: 
−  *  +  * real "LHS" 
−  +  * real "RHS"  
−  * real "  +  * bool "Greater than" 
−  +  * bool "Equal to"  
−  +  * bool "Less than"  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  *  +  
−  * bool "  +  
−  *  +  
−  +  
−  +  The valuenode compares {{LiteralLHS}} and {{LiteralRHS}}. The three boolean values determine which comparison returns '''true'''. For example, if LHS>RHS and {{LiteralGreater than}} is checked, the valuenode will evaluate to '''true'''.  
=== Composite ===  === Composite ===  
−  Converting a  +  Converting a {{lConvert#Spline PointSpline Point}} parameter to {{LiteralComposite}} adds six subparameters: 
* vector "Vertex"  * vector "Vertex"  
* real "Width"  * real "Width"  
Line 82:  Line 90:  
* vector "Tangent 2"  * vector "Tangent 2"  
−  Converting a  +  Converting a {{lConvert#Colorcolor}} parameter to {{LiteralComposite}} adds four realvalued subparameters: 
* real "Red"  * real "Red"  
* real "Green"  * real "Green"  
Line 88:  Line 96:  
* real "Alpha"  * real "Alpha"  
−  Converting a  +  Converting a {{lConvert#Segmentsegment}} parameter to {{LiteralComposite}} adds four vertex subparameters: 
* vertex "Vertex 1"  * vertex "Vertex 1"  
* vertex "Tangent 1"  * vertex "Tangent 1"  
Line 94:  Line 102:  
* vertex "Tangent 2"  * vertex "Tangent 2"  
−  Converting a  +  Converting a {{lConvert#Vectorvector}} parameter to {{LiteralComposite}} adds two realvalued subparameters: 
* real "XAxis"  * real "XAxis"  
* real "YAxis"  * real "YAxis"  
−  The resulting value is a  +  The resulting value is a Spline Point, Color, Segment, or Vector made by combining the component parts. 
+  
+  ==== Composite for {{lGroup Layer}}====  
+  The {{LiteralTransformation}} parameter of a {{lGroup Layer}} and {{lSwitch Group Layer}} is a composite parameter, it hold an {{lOffset ParameterOffset}}, {{lRotation ParameterRotation}}, {{lSkew ParameterSkew}} and {{lScale ParameterScale}} subparameter for the group.  
=== Cos ===  === Cos ===  
−  Converting a  +  Converting a {{lConvert#Realreal}}valued parameter to {{LiteralCos}} adds two subparameters: 
* angle "Angle"  * angle "Angle"  
* real "Amplitude".  * real "Amplitude".  
The resulting value is:  The resulting value is:  
−  Amplitude * cos(Angle)  +  {{LiteralAmplitude}} * cos({{LiteralAngle}}) 
+  
+  === Derivative ===  
+  
+  It allows to calculate the derivative (first or second order) of a given value node using the finite differences method. It has the following sub parameters:  
+  
+  * real "Link" : Value Node whom is calculated the derivative (Real, Angle, Time, Vector)  
+  * real "Interval" : Size of the interval to calculate the finite differences (Real >0).  
+  * integer "Accuracy" : Accuracy order. (ROUGH, NORMAL, FINE & EXTREME)  
+  * integer "Order" : First or Second order derivative (FIRST, SECOND)  
+  
+  === Dot Product ===  
+  
+  Converting a {{lConvert#Realreal}} or {{lConvert#Angleangle}} parameter to a {{LiteralDot Product}} adds two subparameters:  
+  * vector "LHS"  
+  * vector "RHS"  
+  
+  If the converted value is an angle, the return value is the angle between the two vectors:  
+  
+  return = acos((LHS · RHS) / (LHS * RHS))  
+  
+  If the converted value is a real, the result value is the dot product of the two vectors:  
+  
+  return = LHS · RHS = LHS * RHS * cos(alpha)  
+  
+  (where alpha is the angle between {{LiteralLHS}} and {{LiteralRHS}}).  
=== Duplicate ===  === Duplicate ===  
−  This ValueNode type is only used by the  +  This ValueNode type is only used by the {{lDuplicate Layer}}. It never appears in the {{LiteralConvert}} menu. It is used to control the range of the Index in the Duplicate Layer (q.v.). 
−  The  +  The {{LiteralDuplicate}} ValueNode type has 3 realvalued subparameters: 
* real "From"  * real "From"  
Line 119:  Line 155:  
* real "Step"  * real "Step"  
−  The value of the ValueNode varies from the value of  +  The value of the ValueNode varies from the value of {{LiteralFrom}} to the value of {{LiteralTo}} in steps of size {{LiteralStep}}. The sign of {{LiteralStep}} is ignored. If From<To the steps are positive, else they're negative. 
+  
+  === Dynamic ===  
+  
+  Allows to link two vectors with a dynamic link. The ValueNode (vector type) that is converted to {{LiteralDynamic}} will be linked to another vector value using a linear/rotational spring system with damping and friction.  
+  
+  {border="0" align="center" style="bordercollapse" cellpadding="0" cellspacing="0"  
+    
+   [[Image:ConvertDynamicExample1.gifcentercthumb[[File:ConvertDynamicsExample1project.sifz]]]]  
+   [[Image:ConvertDynamicExample2.gifcentercthumb[[File:ConvertDynamicsExample2project.sifz]]]]  
+  }  
+  Once you convert the Value to {{LiteralDynamic}} it offers the following subparameters:  
+  
+  * vector {{LiteralTip Static}} This is the equilibrium position of the system without external forces relative to the Origin. See Origin. Since it is a vector its length is used for the linear spring equilibrium length and its angle form the x axis is used for the torsion spring equilibrium angle. The initial value of this subparameter is the current value of the Value that is being converted to Dynamic.  
+  * vector {{LiteralOrigin}} This is the basement of the dynamic system. Defaults to ('''0.0''', '''0.0'''). If the user changes this value the final equilibrium calculated position of the value is modified too. Accelerations of the Origin are used to move the Tip due to the fictitious forces needed to apply under non inertial reference systems.  
+  * vector {{LiteralForce}} External force applied on the Tip of the dynamic system. Defaults to ('''0.0''', '''0.0''').  
+  * real {{LiteralTorque}} External momentum applied tot he dynamic system at the Origin. Defaults to '''0.0'''.  
+  * real {{LiteralDamping}} Damper coefficient of the linear link. Defaults to '''0.4'''  
+  * real {{LiteralFriction}} Friction coefficient of the rotational link. Defaults to '''0.4'''  
+  * real {{LiteralSpring}} Spring coefficient of the linear link. Defaults to '''30.0'''  
+  * real {{LiteralTorsion}} Torsion coefficient of the rotational link. Defaults to '''30.0'''  
+  * real {{LiteralMass}} Mass of the dynamic system. Defaults to '''0.3'''  
+  * real {{LiteralInertia}} Moment of inertia of the dynamic system. Defaults to '''0.3'''  
+  * bool {{LiteralSpring rigid}} When checked linear spring is rigid. Defaults to '''off'''  
+  * bool {{LiteralTorsion rigid}} When checked torsion spring is rigid. Defaults to '''off'''  
+  * bool {{LiteralOrigin drags tip}} When checked result is origin + dynamic tip otherwise result is just dynamic tip. Defaults to '''off'''  
+  
+  ==== Comments ====  
+  [[Image:Dynamics.pngrightthumb500pxGraphical representation of the dynamics system]]The movement of the Origin produces two effects. It drags the resulting vector the same amount of the Origin along the time (that is the resulting vector is the sum of the Origin(t) + dynamic tip(t)) and its acceleration produces an inertial force contrary to the acceleration direction and magnitude.  
+  
+  The Torque only affects the angle of the resulting vector respect to the Origin. This means that the mass center of gravity is located at the origin (where the torque is applied) and so there is not centrifugal effects.  
+  
+  Since the Origin only can be translated and not rotated, there are not Coriolis forces.  
+  
+  The Force is applied on the tip position so it would produce effects on the angle and on the length of the tip. Force (F) is decomposed into two vectors one aligned with the Tip vector (Fr) and other perpendicular (Fa). The one aligned (Fr) is used on the linear damper spring equations. The one perpendicular (Fa) is used as additional torque by this expression Fr*R (where R is the variable length of the Tip vector)  
+  
+  If Mass (Inertia) reaches near to zero, then the movement for linear (rotational) link is disabled.  
+  
+  User is responsible of the meaning of the values of the parameters (i.e. negative mass, or negative friction or spring constant)  
+  
+  Origin is automatically connected to a subparameter of an internal Value Node in order to calculate the second derivative of the Origin (that is the acceleration of the Origin). '''Do not''' Disconnect Origin value node. Export it instead and link or connect other Value Nodes to the exported.  
=== Dynamic List ===  === Dynamic List ===  
−  Converting a  +  Converting a {{lConvert#Listlist}} parameter to {{LiteralDynamic List}} seems to replace each of the {{LiteralVertex NNN}} subparameters with {{LiteralItem NNN}} parameters which '''can't be expanded''', but can be {{lexport}}ed. 
=== Exponential ===  === Exponential ===  
−  Converting a  +  Converting a {{lConvert#Realreal}} parameter to {{LiteralExponential}} adds two subparameters: 
* real "Exponent"  * real "Exponent"  
* real "Scale"  * real "Scale"  
−  The resulting value is the result raising the [http://en.wikipedia.org/wiki/E_%28mathematical_constant%29 mathematical constant 'e'] to the power of Exponent, and scaling the result by Scale.  +  The resulting value is the result raising the [http://en.wikipedia.org/wiki/E_%28mathematical_constant%29 mathematical constant 'e'] to the power of {{LiteralExponent}}, and scaling the result by {{LiteralScale}}. That is, it returns: 
Scale * e^Exponent  Scale * e^Exponent  
−  This is useful for tracking layers which have been zoomed, since the Zoom  +  This is useful for tracking layers which have been zoomed, since the {{lZoom Layer}} scales by e^(zoom factor). 
See [http://youtube.com/watch?v=GAWtndOHkUw this video] for an example of the use of this convert type.  See [http://youtube.com/watch?v=GAWtndOHkUw this video] for an example of the use of this convert type.  
Line 141:  Line 217:  
=== From Integer ===  === From Integer ===  
−  This is currently disabled.  +  This is currently disabled. It converts an integer to one of several types. 
=== Gradient Color ===  === Gradient Color ===  
−  Converting a  +  Converting a {{lConvert#Colorcolor}} parameter to {{LiteralGradient Color}} adds two subparameters: 
* gradient "Gradient"  * gradient "Gradient"  
* real "Index"  * real "Index"  
−  The resulting value is a color taken from the  +  The resulting value is a color taken from the {{lGradient Tool}} at the given index position. {{LiteralIndex}} '''0''' corresponds to the left of the {{LiteralGradient}}; {{LiteralIndex}} '''1''' corresponds to the right of the {{LiteralGradient}}. 
=== Gradient Rotate ===  === Gradient Rotate ===  
−  Converting a  +  Converting a {{lConvert#Gradientgradient}} parameter to {{LiteralGradient Rotate}} adds two subparameters: 
* gradient "Gradient"  * gradient "Gradient"  
* real "Offset"  * real "Offset"  
−  The resulting value is a gradient based on the  +  The resulting value is a gradient based on the {{LiteralGradient}} parameter, but shifted left (for negative values) or right, according to the value of the {{LiteralOffset}} parameter. An offset of '''1.0''' will shift the gradient by its entire visible width. Values shifted off the left or right edge aren't lost  they aren't visible in the gradient as it's displayed in the parameters dialog, but they will still be used when rendering (depending on parameters such as {{LiteralLoop}} and {{LiteralZigzag}}, which can cause gradients to be looped between their their left and right edges, rather than using the nondisplayed parts). 
+  
+  === Int String ===  
+  
+  Converting an {{lConvert#Stringstring}}valued parameter to {{LiteralInt String}} adds three subparameters:  
+  * integer "Int"  
+  * integer "Width"  
+  * bool "Zero Padded"  
+  
+  The resulting value a string containing {{LiteralInt}} formatted as a string with a minimum width {{LiteralWidth}}. If {{LiteralZero Padded}} is '''true''', it will be leftpadded with "0" characters.  
+  
+  === Joined List ===  
+  
+  Converting a {{lConvert#Stringstring}} parameter to be {{LiteralJoined List}} adds four subparameters:  
+  * list "Strings"  
+  * string "Before"  
+  * string "Separator"  
+  * string "After"  
+  
+  The result is a string containing the value of {{LiteralBefore}}, followed by all the strings in the {{LiteralStrings}} list, with the value of {{LiteralSeparator}} between each pair, followed by the value of {{LiteralAfter}}.  
=== Linear ===  === Linear ===  
−  Converting an  +  Converting an {{lConvert#Angleangle}} parameter to be {{LiteralLinear}} adds two angle subparameters: 
* angle "Rate"  * angle "Rate"  
* angle "Offset"  * angle "Offset"  
−  Converting a  +  Converting a {{lConvert#Colorcolor}} parameter to be {{LiteralLinear}} adds two angle subparameters: 
* color "Rate"  * color "Rate"  
* color "Offset"  * color "Offset"  
−  Converting an  +  Converting an {{lConvert#Integerinteger}} parameter to be {{LiteralLinear}} adds two angle subparameters: 
* integer "Rate"  * integer "Rate"  
* integer "Offset"  * integer "Offset"  
−  Converting a  +  Converting a {{lConvert#Realreal}} parameter to be {{LiteralLinear}} adds two realvalued subparameters: 
* real "Rate"  * real "Rate"  
* real "Offset"  * real "Offset"  
−  Converting a  +  Converting a {{lConvert#Timetime}} parameter to be {{LiteralLinear}} adds two time subparameters: 
* time "Rate"  * time "Rate"  
* time "Offset"  * time "Offset"  
−  Converting a  +  Converting a {{lConvert#Vectorvector}} parameter to be {{LiteralLinear}} adds two vector subparameters: 
* vector "Slope"  * vector "Slope"  
* vector "Offset"  * vector "Offset"  
−  The parameter's value will change linearly over time, starting with the value specified by  +  The parameter's value will change linearly over time, starting with the value specified by {{LiteralOffset}} at time zero, and increasing by the value specified by {{LiteralRate}} (or {{LiteralSlope}}, in the case of vector parameters) every second. 
The resulting value for vector parameters is:  The resulting value for vector parameters is:  
Line 194:  Line 289:  
and for the other 5 types of parameter it is:  and for the other 5 types of parameter it is:  
Offset + Rate*time  Offset + Rate*time  
+  
+  === Logarithm ===  
+  
+  Converting a {{lConvert#Realreal}}valued parameter to {{LiteralLogarithm}} adds three subparameters:  
+  
+  * real "Link"  
+  * real "Epsilon".  
+  * real "Infinite".  
+  
+  The resulting value is:  
+  
+  Log(Link) (if Link >= Epsilon)  
+  Infinite (if Link < Epsilon)  
+  
+  The {{LiteralEpsilon}} and {{LiteralInfinite}} parameters are only needed to prevent logarithm of negative or zero numbers. For regular operation the resulting value is simply the natural logarithm of {{LiteralLink}}. In fact a logarithm of a negative number cannot be calculated in the space of Real numbers. This convert type returns Infinite for simplicity.  
+  
+  === Not ===  
+  
+  Converting a {{lConvert#Boolbool}} parameter to {{LiteralNot}} adds one subparameter:  
+  * bool "Link"  
+  
+  The resulting value is the opposite of {{LiteralLink}}.  
+  
+  === Or ===  
+  
+  Converting a {{lConvert#Boolbool}} parameter to {{LiteralOr}} adds two subparameters:  
+  * bool "Link1"  
+  * bool "Link2"  
+  
+  The resulting value is true if either {{LiteralLink1}}, {{LiteralLink2}}, or both are '''true'''.  
+  
+  === Power ===  
+  
+  Converting a {{lConvert#Realreal}}valued parameter to {{LiteralPower}} adds three subparameters:  
+  * real "Base"  
+  * real "Power"  
+  * real "Epsilon".  
+  * real "Infinite".  
+  
+  The resulting value is Base^Power if the operation is defined.  
+  The undefined cases will also return a value (to avoid errors):  
+  0^0 = 1  
+  0^x = +/ infinite  
+  If a negative base is raised to a noninteger power, the power is rounded (typecast) to an integer  
+  
+  The {{LiteralEpsilon}} and {{LiteralInfinite}} parameters are only needed to prevent division by zero.  
+  
+  ===Reverse===  
+  
+  It operates on every type I could figure out how to reverse: lists, strings, spline points and segments, gradients, width points, and dash items.  
+  
+  From the {{lParameters Panel}}, select what you want to reverse, right click and select {{cConvertReverse}}  
+  
+  When reversing a list, it also reverses the individual elements of that list, meaning that, for instance, a spline will look exactly the same after being reversed.  
=== Radial Composite ===  === Radial Composite ===  
−  Converting a  +  Converting a {{lConvert#Colorcolor}} to {{LiteralRadial Composite}} adds four subparameters: 
* real "Luma"  * real "Luma"  
* real "Saturation"  * real "Saturation"  
Line 203:  Line 352:  
* real "Alpha"  * real "Alpha"  
−  Converting a  +  Converting a {{lConvert#Vectorvector}} to {{LiteralRadial Composite}} adds two subparameters: 
* real "Radius"  * real "Radius"  
* angle "Theta"  * angle "Theta"  
−  For color parameters, the resulting value is the color with the given  +  For color parameters, the resulting value is the color with the given {{LiteralLuma}}, {{LiteralSaturation}}, {{LiteralHue}}, and {{LiteralAlpha}} amounts. 
−  For vector parameters, the resulting value is the point reached by traveling a distance  +  For vector parameters, the resulting value is the point reached by traveling a distance {{LiteralRadius}} from the origin, in the distance given by the angle {{LiteralTheta}}. 
=== Random ===  === Random ===  
−  
−  Converting a parameter to  +  Converting a parameter to {{LiteralRandom}} adds five subparameters, the first of which is the same type as the converted parameter: 
* <param> "Link"  * <param> "Link"  
Line 221:  Line 369:  
* real "Animation Speed"  * real "Animation Speed"  
* integer "Interpolation"  * integer "Interpolation"  
+  * real "Loop Time"  
−  +  {{LiteralRandom}} can be used on {{lConvert#Angleangles}}, {{lConvert#Colorcolors}}, {{lConvert#Integerintegers}}, {{lConvert#Realreals}}, {{lConvert#Timetimes}}, and {{lConvert#Vectorvectors}}.  
It is used to cause a parameter's value to vary randomly over time, around a central value:  It is used to cause a parameter's value to vary randomly over time, around a central value:  
−  *  +  * {{LiteralLink}} provides the central value. 
−  *  +  * {{LiteralRadius}} defines the maximum random difference. 
−  *  +  * {{LiteralSeed}} seeds the random number generator 
−  *  +  * {{LiteralAnimation Speed}} defines how often a new random value is chosen (in choices per second) 
−  *  +  * {{LiteralInterpolation}} determines how the value is interpolated from one random choice to the next. Possible values are: 
−  ** 0  no interpolation; the value jumps from one value to the next  +  ** '''0'''  no interpolation; the value jumps from one value to the next 
−  ** 1  linear interpolation  +  ** '''1'''  linear interpolation 
−  ** 2  cosine  +  ** '''2'''  cosine 
−  ** 3  spline  +  ** '''3'''  spline 
−  ** 4  cubic (the default); uses [http://www.gamedev.net/reference/articles/article1497.asp CatmullRom] spline interpolation  +  ** '''4'''  cubic (the default); uses [http://www.gamedev.net/reference/articles/article1497.asp CatmullRom] spline interpolation 
+  * {{LiteralLoop Time}} makes the random value repeat after the given time. The value ends up the same at the given time as at time=0 so it's possible to make random looping animations without a nasty jump when the time wraps back to zero.  
−  The  +  The {{LiteralInterpolation}} subparameter should really be a dropdown menu, rather than an integer field, but that isn't yet implemented. 
=== Range ===  === Range ===  
−  Converting a parameter to  +  Converting a parameter to {{LiteralRange}} adds three subparameters, all the same type as the parameter itself: 
* <param> "Min"  * <param> "Min"  
* <param> "Max"  * <param> "Max"  
* <param> "Link"  * <param> "Link"  
−  +  {{LiteralRange}} can be used on {{lConvert#Angleangles}}, {{lConvert#Integerintegers}}, {{lConvert#Realreals}}, and {{lConvert#Timetimes}}.  
−  It is used to limit the value of the linked parameter to be between Min and Max.  +  It is used to limit the value of the linked parameter to be between {{LiteralMin}} and {{LiteralMax}}. 
The resulting value is:  The resulting value is:  
Line 254:  Line 404:  
Max (if Link > Max)  Max (if Link > Max)  
Link (otherwise)  Link (otherwise)  
+  
+  === Real String ===  
+  
+  Converting a {{lConvert#Stringstring}} parameter to {{LiteralReal String}} adds four subparameters:  
+  
+  * real "Real"  
+  * int "Width"  
+  * int "Precision"  
+  * bool "Zero Padded"  
+  
+  The result is a string formatted to contain the given value {{LiteralReal}}. {{LiteralWidth}} specifies the minimum field width, {{LiteralPrecision}} specifies the number of decimal places and {{LiteralZero Padded}} specifies whether to pad with zeros on the left hand side.  
+  
+  For example, with Real=3.1415, Width=6, Precision=2, and ZeroPadded=true, we get:  
+  "003.14"  
+  (6 characters long, 2 decimal places, and padded with zeros on the left).  
=== Reciprocal ===  === Reciprocal ===  
−  Converting a  +  Converting a {{lConvert#Realreal}}valued parameter to {{LiteralReciprocal}} adds three subparameters: 
* real "Link"  * real "Link"  
* real "Epsilon".  * real "Epsilon".  
Line 267:  Line 432:  
Infinite (if epsilon < Link < 0)  Infinite (if epsilon < Link < 0)  
−  The  +  The {{LiteralEpsilon}} and {{LiteralInfinite}} parameters are only needed to prevent division by zero. For regular operation the resulting value is simply the reciprocal of {{LiteralLink}}. 
=== Reference ===  === Reference ===  
−  Converting a parameter to  +  Converting a parameter to {{LiteralReference}} adds a single subparameter called {{LiteralLink}}. The {{LiteralLink}} parameter is the same type as the parameter being converted. 
−  It doesn't seem to do anything at all, other than adding an extra parameter. Whatever value is put into  +  It doesn't seem to do anything at all, other than adding an extra parameter. Whatever value is put into {{LiteralLink}} becomes the value of the parameter being converted. 
The only use for this conversion type I can think of is the following:  The only use for this conversion type I can think of is the following:  
Line 280:  Line 445:  
* you're not yet sure exactly how point B should move, so you experiment with different conversion types for point B  * you're not yet sure exactly how point B should move, so you experiment with different conversion types for point B  
* changing the conversion type for point B breaks the connection you made in the first step  * changing the conversion type for point B breaks the connection you made in the first step  
−  * converting point B to be a reference, and then experimenting with different conversions in its  +  * converting point B to be a reference, and then experimenting with different conversions in its {{LiteralLink}} parameter allows point A to connect to point B and for the connection to remain in place while you experiment in the {{LiteralLink}} parameter 
The resulting value is:  The resulting value is:  
Line 287:  Line 452:  
=== Repeat Gradient ===  === Repeat Gradient ===  
−  Converting a  +  Converting a {{lConvert#Gradientgradient}} parameter to {{LiteralRepeat Gradient}} adds seven subparameters: 
* gradient "Gradient"  * gradient "Gradient"  
* integer "Count"  * integer "Count"  
Line 296:  Line 461:  
* color "End Color"  * color "End Color"  
−  The resulting value is a gradient containing  +  The resulting value is a gradient containing {{LiteralCount}} equally spaced, equally wide copies of {{LiteralGradient}}. Each copy has {{LiteralGradient}} going forwards and then backwards. {{LiteralWidth}} specifies relative width of the forward copy, with a width of '''0''' or less meaning only the backward copy is used, and a width of '''1''' or more meaning only the forward copy is used. A value of '''0.5''' will result in the forward and reverse copies of {{LiteralGradient}} being the same width. 
−  If  +  If {{LiteralSpecify Start}} is checked then {{LiteralStart Color}} will be inserted at the beginning of the new gradient, otherwise the beginning of {{LiteralGradient}} will be used as the beginning of the new gradient. 
−  If  +  If {{LiteralSpecify End}} is checked then {{LiteralEnd Color}} will be appended to the end of the new gradient, otherwise the end of {{LiteralGradient}} will be used as the end of the new gradient. 
−  Here's an example of a repeated gradient  the radiating green/yellow lines are a repeated gradient, applied to a perpendicular curve gradient. This gradient was repeated with a width of 0.5, meaning it is used backwards and forwards the same amount:  +  Here's an example of a repeated gradient  the radiating green/yellow lines are a repeated gradient, applied to a perpendicular curve gradient. This gradient was repeated with a width of '''0.5''', meaning it is used backwards and forwards the same amount: 
−  [[  +  [[File:Repeatgradientvaluenodegradient.pngframecenter]] 
and here's the resulting image, along with the .sif file:  and here's the resulting image, along with the .sif file:  
−  [[  +  [[File:Repeatgradientvaluenode.pngframecenter]] 
−  +  
+  You can donwload the project {{lMedia:Repeatgradientvaluenode.sif}}  
=== Reverse Tangent ===  === Reverse Tangent ===  
−  Converting a  +  Converting a {{lConvert#Spline PointSpline Point}} parameter to {{LiteralReverse Tangent}} adds two subparameters: one called {{LiteralReference}} of type Spline Point, and a boolean parameter called {{LiteralReverse}}. 
−  *  +  * Spline Point "Reference" 
* bool "Reverse"  * bool "Reverse"  
−  +  {{LiteralReverse Tangent}} can only be used on {{lConvert#Spline PointSpline Points}}.  
−  The resulting value is the same as the  +  The resulting value is the same as the {{LiteralReference}} Spline Point, but with its tangents switched over. This is useful when attempting to link the vertices of a {{lRegion Layerregion}} to the vertices of an {{lOutline Layeroutline}} when the region and the outline were drawn in opposite directions, and so tangent1 of an outline vertex needs to be linked to tangent2 of the region vertex, and vice versa. 
=== Scale ===  === Scale ===  
−  Converting a parameter to  +  Converting a parameter to {{LiteralScale}} adds two subparameters: one called {{LiteralLink}}, of the same type as the parameter itself, and a realvalued parameter called {{LiteralScalar}}. 
* <param> "Link"  * <param> "Link"  
* real "Scalar"  * real "Scalar"  
−  +  {{LiteralScale}} can be used on {{lConvert#Angleangles}}, {{lConvert#Colorcolors}}, {{lConvert#Integerintegers}}, {{lConvert#Realreals}}, {{lConvert#Timetimes}}, and {{lConvert#Vectorvectors}}.  
The resulting value is:  The resulting value is:  
Line 334:  Line 500:  
=== Segment Tangent ===  === Segment Tangent ===  
−  Converting a  +  Converting a {{lConvert#Vectorvector}} parameter to {{LiteralSegment Tangent}} adds two subparameters: 
* segment "Segment"  * segment "Segment"  
* real "Amount"  * real "Amount"  
−  Amount is a number between 0 and 1, defining the distance along the given  +  {{LiteralAmount}} is a number between '''0''' and '''1''', defining the distance along the given {{LiteralSegment}}. The resulting value for the whole parameter is the tangent to the segment, at the given point along the segment. 
=== Segment Vertex ===  === Segment Vertex ===  
−  Converting a  +  Converting a {{lConvert#Vectorvector}} parameter to {{LiteralSegment Vertex}} adds two subparameters: 
* segment "Segment"  * segment "Segment"  
* real "Amount"  * real "Amount"  
−  Amount is a number between 0 and 1, defining the distance along the given  +  {{LiteralAmount}} is a number between '''0''' and '''1''', defining the distance along the given {{LiteralSegment}}. The resulting value is the vertex at the given point along the segment. 
=== Sine ===  === Sine ===  
−  Converting a  +  Converting a {{lConvert#Realreal}}valued parameter to {{LiteralSine}} adds two subparameters: 
* angle "Angle"  * angle "Angle"  
* real "Amplitude".  * real "Amplitude".  
Line 356:  Line 522:  
The resulting value is:  The resulting value is:  
Amplitude * sin(Angle)  Amplitude * sin(Angle)  
+  
+  === Spline Tangent ===  
+  
+  Converting a {{lConvert#Angleangle}}, {{lConvert#Realreal}, or {{lConvert#Vectorvector}} parameter to {{LiteralSpline Tangent}} adds six subparameters:  
+  * spline "Spline"  
+  * bool "Loop"  
+  * real "Amount"  
+  * angle "Offset"  
+  * real "Scale"  
+  * bool "Fixed Length"  
+  
+  {{LiteralAmount}} is a number between '''0''' and '''1''', defining the distance along the given spline. The resulting value for the whole parameter is the tangent to the spline, at the given point along the spline, optionally rotated and scaled according to the {{LiteralOffset}}, {{LiteralScale}}, and {{LiteralFixed Length}} parameters.  
+  
+  {{LiteralOffset}} is an angle used to give the tangent an extra rotation before returning it. If {{LiteralFixed Length}} is '''true''', the tangent is then scaled to have a length equal to {{LiteralScale}}. Otherwise the tangent is multiplied by {{LiteralScale}}.  
+  
+  If a vector was converted the result is the tangent itself. If an angle was converted, the result is the angle of the tangent to the horizontal, and if a real was converted, the result is the length of the tangent.  
+  
+  This {{lFollowing a Splinetutorial}} gives an example of the use of this convert type.  
+  
+  === Spline Vertex ===  
+  
+  Converting a {{lConvert#Vectorvector}} parameter to {{LiteralSpline Vertex}} adds three subparameters:  
+  * spline "Spline"  
+  * bool "Loop"  
+  * real "Amount"  
+  
+  {{LiteralAmount}} is a number between '''0''' and '''1''', defining the distance along the given spline. The resulting value for the whole parameter is a vector giving the position of the given point along the spline.  
+  
+  This {{lFollowing a Splinetutorial}} gives an example of the use of this convert type.  
+  
+  === Spline Width ===  
+  
+  Converting a {{lConvert#Realreal}} parameter to {{LiteralSpline Width}} adds three subparameters:  
+  * spline "Spline"  
+  * bool "Loop"  
+  * real "Amount"  
+  * real "Scale"  
+  
+  {{LiteralAmount}} is a number between '''0''' and '''1''', defining the distance along the given spline. The resulting value for the whole parameter is the width of the spline at the given point along it, multiplied by the {{LiteralScale}} parameter.  
=== Step ===  === Step ===  
−  Converting an  +  Converting an {{lConvert#Angleangle}}, {{lConvert#Colorcolor}}, {{lConvert#Integerinteger}}, {{lConvert#Realreal}}, {{lConvert#Timetime}}, or {{lConvert#Vectorvector}} parameter to be {{LiteralStep}} adds four subparameters: 
* <param> "Link"  * <param> "Link"  
* time "Duration"  * time "Duration"  
Line 365:  Line 570:  
* real "Intersection"  * real "Intersection"  
−  The parameter's value will change in steps.  +  The parameter's value will change in steps. Each step is {{LiteralDuration}} seconds long. The steps start at times {{LiteralStart Time}}, {{LiteralStart Time}}+{{LiteralDuration}}, etc. The value of the valuenode is the value of {{LiteralLink}} at some time. {{LiteralIntersection}} determines which time is used. An {{LiteralIntersection}} of '''0.0''' means that the value of {{LiteralLink}} at the start of the step should be used. An {{LiteralIntersection}} of '''0.5''' (the default) means to use the value of {{LiteralLink}} at the middle of the step, etc. 
The resulting value at time <math>T</math> is:  The resulting value at time <math>T</math> is:  
<math>Link \Bigg ( \Bigg ( Duration \cdot \left ( \left \lfloor \frac{T  Start\ Time}{Duration} \right \rfloor + Intersection \right ) \Bigg ) + Start \ Time \Bigg )</math>  <math>Link \Bigg ( \Bigg ( Duration \cdot \left ( \left \lfloor \frac{T  Start\ Time}{Duration} \right \rfloor + Intersection \right ) \Bigg ) + Start \ Time \Bigg )</math>  
−  === Example ===  +  ==== Example ==== 
−  +  {{LiteralLink}} is a sine wave. {{LiteralDuration}} is '''10f''' (the frame rate is 24 fps). {{LiteralStart Time}} is '''1s'''.  
−  So one step starts at 1s, and others start at 0s 14f, 0s 4f, 1s 10f, etc.  +  So one step starts at '''1s''', and others start at '''0s 14f''', '''0s 4f''', '''1s 10f''', etc. 
−  This is the sine wave:  +  This is the (kind of) sine wave: 
−  [[  +  [[File:Convert Smoothsine 0.63.06.pngframecenter]] 
−  And this is the effect of the Step valuenode on it, with an  +  And this is the effect of the Step valuenode on it, with an {{LiteralIntersection}} of '''0.0'''. Notice that at time '''0s''', the step has a negative value  that step runs from '''6f''' to '''4f''', and so its value is the value of {{LiteralLink}} at time '''6f'''. ''These images were created in [http://www.gimp.org/ The Gimp]  it's not currently possible to view two curves at the same time in Synfig Studio.'' 
−  [[  +  [[File:Convert Steppedsine 0.0 0.63.06.pngframecenter]] 
−  Here it is with an  +  Here it is with an {{LiteralIntersection}} of '''0.5''': 
−  [[  +  [[File:Convert Steppedsine 0.5 0.63.06.pngframecenter]] 
−  and here, with an  +  and here, with an {{LiteralIntersection}} '''of 1.0''': 
−  [[  +  [[File:Convert Steppedsine 1.0 0.63.06.pngframecenter]] 
+  
+  You can download the project {{lMedia:Doc Convert Step.sifz}}  
=== Stripes ===  === Stripes ===  
−  Converting a  +  Converting a {{lConvert#Gradientgradient}} parameter to {{LiteralStripes}} adds four subparameters: 
* color "Color 1"  * color "Color 1"  
* color "Color 2"  * color "Color 2"  
Line 400:  Line 607:  
* real "Width"  * real "Width"  
−  The resulting value is a gradient containing  +  The resulting value is a gradient containing {{LiteralStripe Count}} equally spaced, equally wide stripes of color {{LiteralColor 2}} with a background of {{LiteralColor 1}}. {{LiteralWidth}} specifies the width of the stripes, with a {{LiteralWidth}} of '''0''' or less meaning they are invisible, and a {{LiteralWidth}} of '''1''' or more meaning the whole gradient is of {{LiteralColor 2}}. 
=== Subtract ===  === Subtract ===  
−  Converting a parameter to  +  Converting a parameter to {{LiteralSubtract}} adds three subparameters, the first two of which are the same type as the parameter itself: 
* <param> "LHS"  * <param> "LHS"  
* <param> "RHS"  * <param> "RHS"  
* real "Scalar"  * real "Scalar"  
−  The  +  The {{LiteralSubtract}} conversion can be used with parameters of type {{lConvert#Angleangle}}, {{lConvert#Colorcolor}}, {{lConvert#Gradientgradient}}, {{lConvert#Integerinteger}}, {{lConvert#Realreal}}, {{lConvert#Timetime}}, and {{lConvert#Vectorvector}}. 
The resulting value is:  The resulting value is:  
Line 416:  Line 623:  
=== Switch ===  === Switch ===  
−  Converting a parameter to  +  Converting a parameter to {{LiteralSwitch}} adds three subparameters: 
* <param> "Link Off"  * <param> "Link Off"  
* <param> "Link On"  * <param> "Link On"  
* bool "Switch"  * bool "Switch"  
−  +  {{LiteralLink Off}} and {{LiteralLink On}} are the same type as the parameter being converted.  
−  The resulting value is the value of  +  The resulting value is the value of {{LiteralLink Off}} when {{LiteralSwitch}} is '''off''', and {{LiteralLink On}} when {{LiteralSwitch}} is '''on'''. 
This conversion can be used on all value types.  This conversion can be used on all value types.  
Line 429:  Line 636:  
=== Time Loop ===  === Time Loop ===  
−  Converting a parameter to  +  Converting a parameter to {{LiteralTime Loop}} adds four subparameters: one called {{LiteralLink}}, of the same type as the parameter itself, and three time parameters: 
* <param> "Link"  * <param> "Link"  
Line 436:  Line 643:  
* time "Duration"  * time "Duration"  
−  It works similarly to the  +  It works similarly to the {{lTime Loop Layer}} but affects only a single parameter. 
−  For any integer value n, from "Local Time + abs(Duration)*n" to "Local Time + abs(Duration)*(n+1)", the resulting value of the parameter is the same as that of the  +  For any integer value '''n''', from "Local Time + abs(Duration)*n" to "Local Time + abs(Duration)*(n+1)", the resulting value of the parameter is the same as that of the {{LiteralLink}} parameter from {{LiteralLink Time}} to "Link Time + Duration". 
−  In other words,  +  In other words, {{LiteralDuration}} seconds of values of the parameter {{LiteralLink}} starting from time {{LiteralLink Time}} onwards are looped over and over, with the value of the {{LiteralLink}} parameter at time {{LiteralLink Time}} corresponding to the resulting value at time {{LiteralLocal Time}}. 
−  As an example, suppose the  +  As an example, suppose the {{LiteralLink}} parameter has a value of time the current time. At '''0s''' the value is '''0''', at '''10s''' the value is '''20'''. 
If we set:  If we set:  
Line 448:  Line 655:  
* Local Time = 2s  * Local Time = 2s  
* Duration = 4s  * Duration = 4s  
−  then from 2s to 6s and from 6s to 10s, etc., the resulting value is the value of  +  then from '''2s''' to '''6s''' and from '''6s''' to '''10s''', etc., the resulting value is the value of {{LiteralLink}} from '''5s''' to '''9s''', as follows: 
Then the resulting values will be:  Then the resulting values will be:  
Line 460:  Line 667:  
* 7s > "Link" value at 6s = 12  * 7s > "Link" value at 6s = 12  
−  If  +  If {{LiteralDuration}} is '''zero''', the resulting value is whatever the value of the {{LiteralLink}} parameter is at time {{LiteralLink Time}}. 
−  If  +  If {{LiteralDuration}} is negative, the resulting value at {{LiteralLocal Time}} still matches the value of {{LiteralLink}} at {{LiteralLink Time}}, but the animation goes in the opposite direction. For example: 
If we set:  If we set:  
Line 468:  Line 675:  
* Local Time = 2s  * Local Time = 2s  
* Duration = 4s  * Duration = 4s  
−  then from 2s to 6s and from 6s to 10s, etc., the resulting value is the value of  +  then from '''2s''' to '''6s''' and from '''6s''' to '''10s''', etc., the resulting value is the value of {{LiteralLink}} from '''5s''' to '''1s''', as follows: 
Then the resulting values will be:  Then the resulting values will be:  
Line 482:  Line 689:  
This conversion can be used on all value types.  This conversion can be used on all value types.  
−  ===  +  === Time String === 
−  +  Converting a {{lConvert#Stringstring}} parameter to {{LiteralTime String}} adds one subparameter called {{LiteralTime}}, of type time:  
−  Converting a parameter to  +  * time "Time" 
+  
+  The result is a string containing the given {{LiteralTime}}.  
+  
+  === Timed Swap ===  
+  <! This convert type was disabled in Synfig 0.61.06 and earlier because it didn't work. >  
+  Converting a parameter to {{LiteralTimed Swap}} adds four subparameters:  
* <param> "Before"  * <param> "Before"  
* <param> "After"  * <param> "After"  
−  * time "  +  * {{lImage:Type_time_icon.png14px}} {{lDev:Types'''time'''}} "Time" 
−  * time "  +  * {{lImage:Type_time_icon.png14px}} {{lDev:Types'''time'''}} "Lenght" 
−  +  {{LiteralBefore}} and {{LiteralAfter}} are the same type as the parameter being converted.  
−  This conversion type linearly switches from  +  This conversion type linearly switches from {{LiteralBefore}} to {{LiteralAfter}}, taking {{LiteralLenght}} seconds to do so, and completing the swap at {{LiteralTime}}. 
−  Note that this doesn't give us anything that we can't achieve using the "  +  Note that this doesn't give us anything that we can't achieve using the "{{lConvert#LinearLinear}}" conversion type and a few {{lWaypointwaypoints}}. 
−  +  {{LiteralTimed Swap}} can be used on {{lConvert#Angleangles}}, {{lConvert#Colorcolors}}, {{lConvert#Integerintegers}}, {{lConvert#Realreals}}, {{lConvert#Timetimes}}, and {{lConvert#Vectorvectors}}.  
The resulting value is:  The resulting value is:  
−  if time > "  +  if "current time" > "swap Time" then "After" 
−  else if time < ("  +  else if "current time" < ("swap Time"  "Lenght") then "Before" 
else interpolate between "Before" and "After"  else interpolate between "Before" and "After"  
+  
+  See {{lDoc:Slideshow_Tutorial}} for an example.  
=== TwoTone ===  === TwoTone ===  
−  Converting a  +  Converting a {{lConvert#Gradientgradient}} to {{LiteralTwoTone}} adds two colorvalued subparameters: 
* color "Color1"  * color "Color1"  
* color "Color2"  * color "Color2"  
−  The resulting gradient has two  +  The resulting gradient has two {{lColor Stop}}, one at each end, starting with {{LiteralColor1}} and ending with {{LiteralColor2}}. 
−  These color parameters can be animated, giving us the ability to have the gradient change color over time.  +  These color parameters can be animated, giving us the ability to have the gradient change color over time. It used to be used as a workaround for [http://sourceforge.net/tracker/index.php?func=detail&aid=1568818&group_id=144022&atid=757416 this bug]. 
=== Vector Angle ===  === Vector Angle ===  
−  Converting an  +  Converting an {{lConvert#Angleangle}} to {{LiteralVector Angle}} adds a vector subparameter: 
* vector "Vector"  * vector "Vector"  
−  The resulting value is the angle between the  +  The resulting value is the angle between the {{LiteralVector}} and the X axis. 
=== Vector Length ===  === Vector Length ===  
−  Converting a  +  Converting a {{lConvert#Realreal}} to {{LiteralVector Length}} adds a vector subparameter: 
* vector "Vector"  * vector "Vector"  
−  The resulting value is the length of the  +  The resulting value is the length of the {{LiteralVector}}. 
=== Vector X ===  === Vector X ===  
−  Converting a  +  Converting a {{lConvert#Realreal}} to {{LiteralVector X}} adds a vector subparameter: 
* vector "Vector"  * vector "Vector"  
−  The resulting value is the X component of the  +  The resulting value is the X component of the {{LiteralVector}}. 
=== Vector Y ===  === Vector Y ===  
−  Converting a  +  Converting a {{lConvert#Realreal}} to {{LiteralVector Y}} adds a vector subparameter: 
* vector "Vector"  * vector "Vector"  
−  The resulting value is the Y component of the  +  The resulting value is the Y component of the {{LiteralVector}}. 
== Which Value Types can use which Convert Types? ==  == Which Value Types can use which Convert Types? ==  
−  There are 13 different types of value in Synfig.  +  There are 13 different types of value in Synfig. Each of these types has a different set of convert types available to it, as follows: 
−  === Angle ===  +  === {{lImage:type_angle_icon.png22px}} Angle === 
−  +  Angle parameters can be converted to {{lConvert#AddAdd}}, {{lConvert#aTan2aTan2}}, {{lConvert#Spline TangentSpline Tangent}}, {{lConvert#Dot ProductDot Product}}, {{lConvert#LinearLinear}}, {{lConvert#RandomRandom}}, {{lConvert#RangeRange}}, {{lConvert#ScaleScale}}, {{lConvert#StepStep}}, {{lConvert#SubtractSubtract}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#Timed SwapTimed Swap}}, {{lConvert#Vector AngleVector Angle}}, and {{lConvert#ReferenceReference}} types.  
−  +  === {{lImage:type_bool_icon.png22px}} Bool ===  
−  +  Bool parameters can only be converted to the {{lConvert#AndAnd}}, {{lConvert#GreyedGreyed}}, {{lConvert#OrOr}}, {{lConvert#NotNot}}, {{lConvert#CompareCompare}} {{lConvert#RandomRandom}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}},and {{lConvert#ReferenceReference}} types.  
−  +  
−  +  === {{lImage:Type canvas icon 0.63.06.png22px}} Canvas ===  
−  +  Canvas parameters can be converted to the {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, and {{lConvert#ReferenceReference}} type.  
−  +  
−  +  === {{lImage:type_color_icon.png22px}} Color ===  
−  +  Color parameters can be converted to {{lConvert#AddAdd}}, {{lConvert#CompositeComposite}}, {{lConvert#Gradient ColorGradient Color}}, {{lConvert#LinearLinear}}, {{lConvert#Radial CompositeRadial Composite}}, {{lConvert#RandomRandom}}, {{lConvert#ScaleScale}}, {{lConvert#StepStep}}, {{lConvert#SubtractSubtract}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#Timed SwapTimed Swap}}, and {{lConvert#ReferenceReference}} types.  
−  +  
−  +  === {{lImage:type_gradient_icon.png22px}} Gradient ===  
−  +  Gradient parameters can be converted to {{lConvert#AddAdd}}, {{lConvert#Gradient RotateGradient Rotate}}, {{lConvert#Repeat GradientRepeat Gradient}}, {{lConvert#StripesStripes}}, {{lConvert#SubtractSubtract}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#TwoToneTwoTone}}, and {{lConvert#ReferenceReference}} types.  
−  +  
−  +  
−  ===  +  === {{lImage:type_integer_icon.png22px}} Integer === 
−  +  
−  +  Integer parameters can be converted to {{lConvert#AddAdd}}, {{lConvert#LinearLinear}}, {{lConvert#RandomRandom}}, {{lConvert#RangeRange}}, {{lConvert#ScaleScale}}, {{lConvert#StepStep}}, {{lConvert#SubtractSubtract}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#Timed SwapTimed Swap}}, and {{lConvert#ReferenceReference}} types.  
−  ===  +  === {{lImage:type_list_icon.png22px}} List === 
−  +  
−  +  
−  +  List parameters can be converted to {{lConvert#SplineSpline}}, {{lConvert#Dynamic ListDynamic List}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, and {{lConvert#ReferenceReference}} types.  
−  +  
−  +  
−  ===  +  === {{lImage:type_real_icon.png22px}} Real === 
−  +  
−  +  
−  +  Real parameters can be converted to {{lConvert#AddAdd}}, {{lConvert#Spline WidthSpline Width}}, {{lConvert#CosCos}}, {{lConvert#Dot ProductDot Product}}, {{lConvert#ExponentialExponential}}, {{lConvert#LinearLinear}}, {{lConvert#LogarithmLogarithm}}, {{lConvert#PowerPower}}, {{lConvert#RandomRandom}}, {{lConvert#RangeRange}}, {{lConvert#ReciprocalReciprocal}}, {{lConvert#ScaleScale}}, {{lConvert#SineSine}}, {{lConvert#StepStep}}, {{lConvert#SubtractSubtract}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#Timed SwapTimed Swap}}, {{lConvert#Vector LengthVector Length}}, {{lConvert#Vector XVector X}}, {{lConvert#Vector YVector Y}}, and {{lConvert#ReferenceReference}} types.  
−  +  
−  +  
−  ===  +  === {{lImage:type_segment_icon.png22px}} Segment === 
−  +  
−  +  
−  +  Segment parameters can be converted to the {{lConvert#CompositeComposite}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, and {{lConvert#ReferenceReference}} types.  
−  +  
−  +  
−  ===  +  === {{lImage:type_blinepoint_icon.png22px}} Spline Point === 
−  +  
−  +  Spline Point parameters can be converted to {{lConvert#CompositeComposite}}, {{lConvert#Reverse TangentReverse Tangent}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, and {{lConvert#ReferenceReference}} types.  
+  
+  
+  === {{lImage:type_string_icon.png22px}} String ===  
+  
+  String parameters can be converted to the {{lConvert#Angle StringAngle String}}, {{lConvert#Int StringInt String}}, {{lConvert#Joined ListJoined List}}, {{lConvert#Real StringReal String}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#Time StringTime String}}, and {{lConvert#ReferenceReference}} types.  
+  
+  === {{lImage:type_time_icon.png22px}} Time ===  
+  
+  Time parameters can be converted to the {{lConvert#AddAdd}}, {{lConvert#LinearLinear}}, {{lConvert#RandomRandom}}, {{lConvert#RangeRange}}, {{lConvert#ScaleScale}}, {{lConvert#StepStep}}, {{lConvert#SubtractSubtract}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#Timed SwapTimed Swap}}, and {{lConvert#ReferenceReference}} types.  
+  
+  === {{lImage:type_vector_icon.png22px}} Vector ===  
+  
+  Vector parameters can be converted to {{lConvert#AddAdd}}, {{lConvert#Spline TangentSpline Tangent}}, {{lConvert#Spline VertexSpline Vertex}}, {{lConvert#CompositeComposite}}, {{lConvert#LinearLinear}}, {{lConvert#Radial CompositeRadial Composite}}, {{lConvert#RandomRandom}}, {{lConvert#ScaleScale}}, {{lConvert#Segment TangentSegment Tangent}}, {{lConvert#Segment VertexSegment Vertex}}, {{lConvert#StepStep}}, {{lConvert#SubtractSubtract}}, {{lConvert#SwitchSwitch}}, {{lConvert#Time LoopTime Loop}}, {{lConvert#Timed SwapTimed Swap}}, and {{lConvert#ReferenceReference}} types.  
== Compatibility ==  == Compatibility ==  
−  When a new ValueNode type is added to Synfig, the .sif file format is extended to include a way of writing the new type.  +  When a new ValueNode type is added to Synfig, the .sif file format is extended to include a way of writing the new type. This extension won't be able to be read by any older version of Synfig. Here's a list of the ValueNode types that have been added, along with the subversion revision number in which they first appeared: 
<blockquote>  <blockquote>  
Line 615:  Line 825:  
 <hr>  <hr>  <hr>   <hr>  <hr>  <hr>  
    
−   '''(0.61.09)'''   +   '''(1.0.2)'''  15/08/09  
+    
+    [https://github.com/synfig/synfig/pull/199 pull#199]  {{l#ReverseReverse}}  
+    
+   '''(1.0)'''  15/04/27   
+    
+    [https://github.com/synfig/synfig/pull/105 pull#105]  {{l#DynamicDynamic}}  
+    
+   '''(0.63.06)'''    
+    
+    ?  BLine Width renamed {{l#Spline WidthSpline Width}}  
+    
+    ?  BLine Vertex renamed {{l#Spline VertexSpline Vertex}}  
+    
+    ?  BLine Tangent renamed {{l#Spline TangentSpline Tangent}}  
+    
+   <hr>  <hr>  <hr>  
+    
+   '''(0.61.09)'''    
+    
+    2034  {{l#LogarithmLogarithm}}  
+    
+    2010  {{l#Int StringInt String}}  
+    
+    2010  {{l#Angle StringAngle String}}  
+    
+    2007  {{l#Joined ListJoined List}}  
+    
+    2003  {{l#Real StringReal String}}  
+    
+    2000  {{l#Time StringTime String}}  
+    
+    1891  {{l#Dot ProductDot Product}}  
    
−    1885   +    1885  {{l#Gradient ColorGradient Color}} 
    
−    1882   +    1882  {{l#Vector XVector X}} 
    
−    1882   +    1882  {{l#Vector YVector Y}} 
    
−    1881   +    1881  {{l#Vector LengthVector Length}} 
    
−    1880   +    1880  {{l#Vector AngleVector Angle}} 
    
 <hr>  <hr>  <hr>   <hr>  <hr>  <hr>  
Line 631:  Line 873:  
 '''(0.61.08)'''  1839    '''(0.61.08)'''  1839   
    
−    1694   +    1694  {{l#Spline WidthBLine Width}} 
    
−    1690   +    1690  {{l#RandomRandom}} (for bools) 
    
−    1691   +    1691  {{l#StepStep}} 
    
−    1354   +    1354  {{l#SubtractSubtract}} (for gradients) 
    
−    1354   +    1354  {{l#AddAdd}} (for gradients) 
    
−    1267   +    1267  {{l#From IntegerFrom Integer}} 
    
−    1267   +    1267  {{l#DuplicateDuplicate}} 
    
−    1238   +    1238  {{l#ReciprocalReciprocal}} 
    
−    1226   +    1226  {{l#Time LoopTime Loop}} 
    
−    1162   +    1162  {{l#Reverse TangentReverse Tangent}} 
    
−    1132   +    1132  {{l#aTan2aTan2}} 
    
−    1111   +    1111  {{l#CosCos}} 
    
−    923   +    923  {{l#SwitchSwitch}} 
    
−    907   +    907  {{l#RandomRandom}} 
    
 <hr>  <hr>  <hr>   <hr>  <hr>  <hr>  
Line 663:  Line 905:  
 '''(0.61.07)'''  878    '''(0.61.07)'''  878   
    
−    776   +    776  {{l#RangeRange}} 
    
−    744   +    744  {{l#BLine VertexSpline Vertex}} 
    
−    744   +    744  {{l#BLine TangentSpline Tangent}} 
    
−    742   +    742  {{l#AddAdd}} 
    
−    739   +    739  {{l#ExponentialExponential}} 
    
−    666   +    666  {{l#Repeat GradientRepeat Gradient}} 
    
−    610   +    610  {{l#Timed SwapTimed Swap}} 
    
 <hr>  <hr>  <hr>   <hr>  <hr>  <hr> 
Latest revision as of 22:52, 13 September 2016
Contents
 1 Overview
 2 Convert Types
 2.1 Add
 2.2 And
 2.3 Angle String
 2.4 aTan2
 2.5 Spline
 2.6 Compare
 2.7 Composite
 2.8 Cos
 2.9 Derivative
 2.10 Dot Product
 2.11 Duplicate
 2.12 Dynamic
 2.13 Dynamic List
 2.14 Exponential
 2.15 From Integer
 2.16 Gradient Color
 2.17 Gradient Rotate
 2.18 Int String
 2.19 Joined List
 2.20 Linear
 2.21 Logarithm
 2.22 Not
 2.23 Or
 2.24 Power
 2.25 Reverse
 2.26 Radial Composite
 2.27 Random
 2.28 Range
 2.29 Real String
 2.30 Reciprocal
 2.31 Reference
 2.32 Repeat Gradient
 2.33 Reverse Tangent
 2.34 Scale
 2.35 Segment Tangent
 2.36 Segment Vertex
 2.37 Sine
 2.38 Spline Tangent
 2.39 Spline Vertex
 2.40 Spline Width
 2.41 Step
 2.42 Stripes
 2.43 Subtract
 2.44 Switch
 2.45 Time Loop
 2.46 Time String
 2.47 Timed Swap
 2.48 TwoTone
 2.49 Vector Angle
 2.50 Vector Length
 2.51 Vector X
 2.52 Vector Y
 3 Which Value Types can use which Convert Types?
 4 Compatibility
* This page need a better formating (for example sorting by categories : math/angle/boolean/...) * Some convert types are missing see here
Overview
Rightclicking on a value in the Parameters Panel brings up a context menu which has a submenu called "Convert".
The "Convert" menu allows you to specify that the parameter should be controlled automatically in various ways or used in mathematical formulas. Depending on the type of the parameter the Convert menu will contain different options.
To convert the parameter back to its original type, select "Disconnect" from its context menu.
Converting animated values When a parameter is animated it is (internally) converted to Animated Value node. Converting to another Convert Types replaces the link.

Convert Types
Add
Converting a parameter to "Add" adds three subparameters, the first two of which are the same type as the parameter itself:
 <param> "LHS"
 <param> "RHS"
 real "Scalar"
The "Add" conversion can be used with parameters of type angle, color, gradient, integer, real, time, and vector.
The resulting value is:
(LHS + RHS) * Scalar
And
Converting a bool parameter to "And" adds two subparameters:
 bool "Link1"
 bool "Link2"
The resulting value is true only if both Link1 and Link2 are true.
Angle String
Converting an stringvalued parameter to "Angle String" adds four subparameters:
 angle "Angle"
 integer "Width"
 integer "Precision"
 bool "Zero Padded"
The resulting value a string containing the value of "Angle" (in degrees) formatted as a string with a minimum width "Width", with "Precision" decimal places. If "Zero Padded" is true, it will be leftpadded with 0 characters.
aTan2
Converting an anglevalued parameter to "aTan2" adds two subparameters:
 real "X"
 real "Y".
The resulting value is:
atan2(y,x)
ie. atan(y/x) but without an error when x is 0. The value is the angle between the x axis and the vector (x,y).
Spline
Converting a list parameter to "Spline" doesn't seem to change anything. Perhaps that's the default type for lists of vertices, such as are found in outlines and regions?
Compare
Converting a bool parameter to "Compare" adds five subparameters:
 real "LHS"
 real "RHS"
 bool "Greater than"
 bool "Equal to"
 bool "Less than"
The valuenode compares "LHS" and "RHS". The three boolean values determine which comparison returns true. For example, if LHS>RHS and "Greater than" is checked, the valuenode will evaluate to true.
Composite
Converting a Spline Point parameter to "Composite" adds six subparameters:
 vector "Vertex"
 real "Width"
 real "Origin"
 bool "Split Tangents"
 vector "Tangent 1"
 vector "Tangent 2"
Converting a color parameter to "Composite" adds four realvalued subparameters:
 real "Red"
 real "Green"
 real "Blue"
 real "Alpha"
Converting a segment parameter to "Composite" adds four vertex subparameters:
 vertex "Vertex 1"
 vertex "Tangent 1"
 vertex "Vertex 2"
 vertex "Tangent 2"
Converting a vector parameter to "Composite" adds two realvalued subparameters:
 real "XAxis"
 real "YAxis"
The resulting value is a Spline Point, Color, Segment, or Vector made by combining the component parts.
Composite for Group Layer
The "Transformation" parameter of a Group Layer and Switch Group Layer is a composite parameter, it hold an Offset, Rotation, Skew and Scale subparameter for the group.
Cos
Converting a realvalued parameter to "Cos" adds two subparameters:
 angle "Angle"
 real "Amplitude".
The resulting value is:
"Amplitude" * cos("Angle")
Derivative
It allows to calculate the derivative (first or second order) of a given value node using the finite differences method. It has the following sub parameters:
 real "Link" : Value Node whom is calculated the derivative (Real, Angle, Time, Vector)
 real "Interval" : Size of the interval to calculate the finite differences (Real >0).
 integer "Accuracy" : Accuracy order. (ROUGH, NORMAL, FINE & EXTREME)
 integer "Order" : First or Second order derivative (FIRST, SECOND)
Dot Product
Converting a real or angle parameter to a "Dot Product" adds two subparameters:
 vector "LHS"
 vector "RHS"
If the converted value is an angle, the return value is the angle between the two vectors:
return = acos((LHS · RHS) / (LHS * RHS))
If the converted value is a real, the result value is the dot product of the two vectors:
return = LHS · RHS = LHS * RHS * cos(alpha)
(where alpha is the angle between "LHS" and "RHS").
Duplicate
This ValueNode type is only used by the Duplicate Layer. It never appears in the "Convert" menu. It is used to control the range of the Index in the Duplicate Layer (q.v.).
The "Duplicate" ValueNode type has 3 realvalued subparameters:
 real "From"
 real "To"
 real "Step"
The value of the ValueNode varies from the value of "From" to the value of "To" in steps of size "Step". The sign of "Step" is ignored. If From<To the steps are positive, else they're negative.
Dynamic
Allows to link two vectors with a dynamic link. The ValueNode (vector type) that is converted to "Dynamic" will be linked to another vector value using a linear/rotational spring system with damping and friction.
Once you convert the Value to "Dynamic" it offers the following subparameters:
 vector "Tip Static" This is the equilibrium position of the system without external forces relative to the Origin. See Origin. Since it is a vector its length is used for the linear spring equilibrium length and its angle form the x axis is used for the torsion spring equilibrium angle. The initial value of this subparameter is the current value of the Value that is being converted to Dynamic.
 vector "Origin" This is the basement of the dynamic system. Defaults to (0.0, 0.0). If the user changes this value the final equilibrium calculated position of the value is modified too. Accelerations of the Origin are used to move the Tip due to the fictitious forces needed to apply under non inertial reference systems.
 vector "Force" External force applied on the Tip of the dynamic system. Defaults to (0.0, 0.0).
 real "Torque" External momentum applied tot he dynamic system at the Origin. Defaults to 0.0.
 real "Damping" Damper coefficient of the linear link. Defaults to 0.4
 real "Friction" Friction coefficient of the rotational link. Defaults to 0.4
 real "Spring" Spring coefficient of the linear link. Defaults to 30.0
 real "Torsion" Torsion coefficient of the rotational link. Defaults to 30.0
 real "Mass" Mass of the dynamic system. Defaults to 0.3
 real "Inertia" Moment of inertia of the dynamic system. Defaults to 0.3
 bool "Spring rigid" When checked linear spring is rigid. Defaults to off
 bool "Torsion rigid" When checked torsion spring is rigid. Defaults to off
 bool "Origin drags tip" When checked result is origin + dynamic tip otherwise result is just dynamic tip. Defaults to off
Comments
The movement of the Origin produces two effects. It drags the resulting vector the same amount of the Origin along the time (that is the resulting vector is the sum of the Origin(t) + dynamic tip(t)) and its acceleration produces an inertial force contrary to the acceleration direction and magnitude.The Torque only affects the angle of the resulting vector respect to the Origin. This means that the mass center of gravity is located at the origin (where the torque is applied) and so there is not centrifugal effects.
Since the Origin only can be translated and not rotated, there are not Coriolis forces.
The Force is applied on the tip position so it would produce effects on the angle and on the length of the tip. Force (F) is decomposed into two vectors one aligned with the Tip vector (Fr) and other perpendicular (Fa). The one aligned (Fr) is used on the linear damper spring equations. The one perpendicular (Fa) is used as additional torque by this expression Fr*R (where R is the variable length of the Tip vector)
If Mass (Inertia) reaches near to zero, then the movement for linear (rotational) link is disabled.
User is responsible of the meaning of the values of the parameters (i.e. negative mass, or negative friction or spring constant)
Origin is automatically connected to a subparameter of an internal Value Node in order to calculate the second derivative of the Origin (that is the acceleration of the Origin). Do not Disconnect Origin value node. Export it instead and link or connect other Value Nodes to the exported.
Dynamic List
Converting a list parameter to "Dynamic List" seems to replace each of the "Vertex NNN" subparameters with "Item NNN" parameters which can't be expanded, but can be Exported.
Exponential
Converting a real parameter to "Exponential" adds two subparameters:
 real "Exponent"
 real "Scale"
The resulting value is the result raising the mathematical constant 'e' to the power of "Exponent", and scaling the result by "Scale". That is, it returns:
Scale * e^Exponent
This is useful for tracking layers which have been zoomed, since the Zoom Layer scales by e^(zoom factor).
See this video for an example of the use of this convert type.
From Integer
This is currently disabled. It converts an integer to one of several types.
Gradient Color
Converting a color parameter to "Gradient Color" adds two subparameters:
 gradient "Gradient"
 real "Index"
The resulting value is a color taken from the Gradient Tool at the given index position. "Index" 0 corresponds to the left of the "Gradient"; "Index" 1 corresponds to the right of the "Gradient".
Gradient Rotate
Converting a gradient parameter to "Gradient Rotate" adds two subparameters:
 gradient "Gradient"
 real "Offset"
The resulting value is a gradient based on the "Gradient" parameter, but shifted left (for negative values) or right, according to the value of the "Offset" parameter. An offset of 1.0 will shift the gradient by its entire visible width. Values shifted off the left or right edge aren't lost  they aren't visible in the gradient as it's displayed in the parameters dialog, but they will still be used when rendering (depending on parameters such as "Loop" and "Zigzag", which can cause gradients to be looped between their their left and right edges, rather than using the nondisplayed parts).
Int String
Converting an stringvalued parameter to "Int String" adds three subparameters:
 integer "Int"
 integer "Width"
 bool "Zero Padded"
The resulting value a string containing "Int" formatted as a string with a minimum width "Width". If "Zero Padded" is true, it will be leftpadded with "0" characters.
Joined List
Converting a string parameter to be "Joined List" adds four subparameters:
 list "Strings"
 string "Before"
 string "Separator"
 string "After"
The result is a string containing the value of "Before", followed by all the strings in the "Strings" list, with the value of "Separator" between each pair, followed by the value of "After".
Linear
Converting an angle parameter to be "Linear" adds two angle subparameters:
 angle "Rate"
 angle "Offset"
Converting a color parameter to be "Linear" adds two angle subparameters:
 color "Rate"
 color "Offset"
Converting an integer parameter to be "Linear" adds two angle subparameters:
 integer "Rate"
 integer "Offset"
Converting a real parameter to be "Linear" adds two realvalued subparameters:
 real "Rate"
 real "Offset"
Converting a time parameter to be "Linear" adds two time subparameters:
 time "Rate"
 time "Offset"
Converting a vector parameter to be "Linear" adds two vector subparameters:
 vector "Slope"
 vector "Offset"
The parameter's value will change linearly over time, starting with the value specified by "Offset" at time zero, and increasing by the value specified by "Rate" (or "Slope", in the case of vector parameters) every second.
The resulting value for vector parameters is:
Offset + Slope*time
and for the other 5 types of parameter it is:
Offset + Rate*time
Logarithm
Converting a realvalued parameter to "Logarithm" adds three subparameters:
 real "Link"
 real "Epsilon".
 real "Infinite".
The resulting value is:
Log(Link) (if Link >= Epsilon) Infinite (if Link < Epsilon)
The "Epsilon" and "Infinite" parameters are only needed to prevent logarithm of negative or zero numbers. For regular operation the resulting value is simply the natural logarithm of "Link". In fact a logarithm of a negative number cannot be calculated in the space of Real numbers. This convert type returns Infinite for simplicity.
Not
Converting a bool parameter to "Not" adds one subparameter:
 bool "Link"
The resulting value is the opposite of "Link".
Or
Converting a bool parameter to "Or" adds two subparameters:
 bool "Link1"
 bool "Link2"
The resulting value is true if either "Link1", "Link2", or both are true.
Power
Converting a realvalued parameter to "Power" adds three subparameters:
 real "Base"
 real "Power"
 real "Epsilon".
 real "Infinite".
The resulting value is Base^Power if the operation is defined. The undefined cases will also return a value (to avoid errors):
0^0 = 1 0^x = +/ infinite If a negative base is raised to a noninteger power, the power is rounded (typecast) to an integer
The "Epsilon" and "Infinite" parameters are only needed to prevent division by zero.
Reverse
It operates on every type I could figure out how to reverse: lists, strings, spline points and segments, gradients, width points, and dash items.
From the Parameters Panel, select what you want to reverse, right click and select "Convert → Reverse"
When reversing a list, it also reverses the individual elements of that list, meaning that, for instance, a spline will look exactly the same after being reversed.
Radial Composite
Converting a color to "Radial Composite" adds four subparameters:
 real "Luma"
 real "Saturation"
 angle "Hue"
 real "Alpha"
Converting a vector to "Radial Composite" adds two subparameters:
 real "Radius"
 angle "Theta"
For color parameters, the resulting value is the color with the given "Luma", "Saturation", "Hue", and "Alpha" amounts.
For vector parameters, the resulting value is the point reached by traveling a distance "Radius" from the origin, in the distance given by the angle "Theta".
Random
Converting a parameter to "Random" adds five subparameters, the first of which is the same type as the converted parameter:
 <param> "Link"
 real "Radius"
 integer "Seed"
 real "Animation Speed"
 integer "Interpolation"
 real "Loop Time"
"Random" can be used on angles, colors, integers, reals, times, and vectors.
It is used to cause a parameter's value to vary randomly over time, around a central value:
 "Link" provides the central value.
 "Radius" defines the maximum random difference.
 "Seed" seeds the random number generator
 "Animation Speed" defines how often a new random value is chosen (in choices per second)
 "Interpolation" determines how the value is interpolated from one random choice to the next. Possible values are:
 0  no interpolation; the value jumps from one value to the next
 1  linear interpolation
 2  cosine
 3  spline
 4  cubic (the default); uses CatmullRom spline interpolation
 "Loop Time" makes the random value repeat after the given time. The value ends up the same at the given time as at time=0 so it's possible to make random looping animations without a nasty jump when the time wraps back to zero.
The "Interpolation" subparameter should really be a dropdown menu, rather than an integer field, but that isn't yet implemented.
Range
Converting a parameter to "Range" adds three subparameters, all the same type as the parameter itself:
 <param> "Min"
 <param> "Max"
 <param> "Link"
"Range" can be used on angles, integers, reals, and times.
It is used to limit the value of the linked parameter to be between "Min" and "Max".
The resulting value is:
Min (if Link < Min) Max (if Link > Max) Link (otherwise)
Real String
Converting a string parameter to "Real String" adds four subparameters:
 real "Real"
 int "Width"
 int "Precision"
 bool "Zero Padded"
The result is a string formatted to contain the given value "Real". "Width" specifies the minimum field width, "Precision" specifies the number of decimal places and "Zero Padded" specifies whether to pad with zeros on the left hand side.
For example, with Real=3.1415, Width=6, Precision=2, and ZeroPadded=true, we get:
"003.14"
(6 characters long, 2 decimal places, and padded with zeros on the left).
Reciprocal
Converting a realvalued parameter to "Reciprocal" adds three subparameters:
 real "Link"
 real "Epsilon".
 real "Infinite".
The resulting value is:
1/Link (Link <= epsilon or epsilon <= Link) Infinite (if 0 <= Link < epsilon) Infinite (if epsilon < Link < 0)
The "Epsilon" and "Infinite" parameters are only needed to prevent division by zero. For regular operation the resulting value is simply the reciprocal of "Link".
Reference
Converting a parameter to "Reference" adds a single subparameter called "Link". The "Link" parameter is the same type as the parameter being converted.
It doesn't seem to do anything at all, other than adding an extra parameter. Whatever value is put into "Link" becomes the value of the parameter being converted.
The only use for this conversion type I can think of is the following:
 you know that point A should follow point B, so you export point B and connect point A to it
 you're not yet sure exactly how point B should move, so you experiment with different conversion types for point B
 changing the conversion type for point B breaks the connection you made in the first step
 converting point B to be a reference, and then experimenting with different conversions in its "Link" parameter allows point A to connect to point B and for the connection to remain in place while you experiment in the "Link" parameter
The resulting value is:
Link
Repeat Gradient
Converting a gradient parameter to "Repeat Gradient" adds seven subparameters:
 gradient "Gradient"
 integer "Count"
 real "Width"
 bool "Specify Start"
 bool "Specify End"
 color "Start Color"
 color "End Color"
The resulting value is a gradient containing "Count" equally spaced, equally wide copies of "Gradient". Each copy has "Gradient" going forwards and then backwards. "Width" specifies relative width of the forward copy, with a width of 0 or less meaning only the backward copy is used, and a width of 1 or more meaning only the forward copy is used. A value of 0.5 will result in the forward and reverse copies of "Gradient" being the same width.
If "Specify Start" is checked then "Start Color" will be inserted at the beginning of the new gradient, otherwise the beginning of "Gradient" will be used as the beginning of the new gradient.
If "Specify End" is checked then "End Color" will be appended to the end of the new gradient, otherwise the end of "Gradient" will be used as the end of the new gradient.
Here's an example of a repeated gradient  the radiating green/yellow lines are a repeated gradient, applied to a perpendicular curve gradient. This gradient was repeated with a width of 0.5, meaning it is used backwards and forwards the same amount:
and here's the resulting image, along with the .sif file:
You can donwload the project Media:Repeatgradientvaluenode.sif
Reverse Tangent
Converting a Spline Point parameter to "Reverse Tangent" adds two subparameters: one called "Reference" of type Spline Point, and a boolean parameter called "Reverse".
 Spline Point "Reference"
 bool "Reverse"
"Reverse Tangent" can only be used on Spline Points.
The resulting value is the same as the "Reference" Spline Point, but with its tangents switched over. This is useful when attempting to link the vertices of a region to the vertices of an outline when the region and the outline were drawn in opposite directions, and so tangent1 of an outline vertex needs to be linked to tangent2 of the region vertex, and vice versa.
Scale
Converting a parameter to "Scale" adds two subparameters: one called "Link", of the same type as the parameter itself, and a realvalued parameter called "Scalar".
 <param> "Link"
 real "Scalar"
"Scale" can be used on angles, colors, integers, reals, times, and vectors.
The resulting value is:
Link * Scalar
Segment Tangent
Converting a vector parameter to "Segment Tangent" adds two subparameters:
 segment "Segment"
 real "Amount"
"Amount" is a number between 0 and 1, defining the distance along the given "Segment". The resulting value for the whole parameter is the tangent to the segment, at the given point along the segment.
Segment Vertex
Converting a vector parameter to "Segment Vertex" adds two subparameters:
 segment "Segment"
 real "Amount"
"Amount" is a number between 0 and 1, defining the distance along the given "Segment". The resulting value is the vertex at the given point along the segment.
Sine
Converting a realvalued parameter to "Sine" adds two subparameters:
 angle "Angle"
 real "Amplitude".
The resulting value is:
Amplitude * sin(Angle)
Spline Tangent
Converting a angle, {{lConvert#Realreal}, or vector parameter to "Spline Tangent" adds six subparameters:
 spline "Spline"
 bool "Loop"
 real "Amount"
 angle "Offset"
 real "Scale"
 bool "Fixed Length"
"Amount" is a number between 0 and 1, defining the distance along the given spline. The resulting value for the whole parameter is the tangent to the spline, at the given point along the spline, optionally rotated and scaled according to the "Offset", "Scale", and "Fixed Length" parameters.
"Offset" is an angle used to give the tangent an extra rotation before returning it. If "Fixed Length" is true, the tangent is then scaled to have a length equal to "Scale". Otherwise the tangent is multiplied by "Scale".
If a vector was converted the result is the tangent itself. If an angle was converted, the result is the angle of the tangent to the horizontal, and if a real was converted, the result is the length of the tangent.
This tutorial gives an example of the use of this convert type.
Spline Vertex
Converting a vector parameter to "Spline Vertex" adds three subparameters:
 spline "Spline"
 bool "Loop"
 real "Amount"
"Amount" is a number between 0 and 1, defining the distance along the given spline. The resulting value for the whole parameter is a vector giving the position of the given point along the spline.
This tutorial gives an example of the use of this convert type.
Spline Width
Converting a real parameter to "Spline Width" adds three subparameters:
 spline "Spline"
 bool "Loop"
 real "Amount"
 real "Scale"
"Amount" is a number between 0 and 1, defining the distance along the given spline. The resulting value for the whole parameter is the width of the spline at the given point along it, multiplied by the "Scale" parameter.
Step
Converting an angle, color, integer, real, time, or vector parameter to be "Step" adds four subparameters:
 <param> "Link"
 time "Duration"
 time "Start Time"
 real "Intersection"
The parameter's value will change in steps. Each step is "Duration" seconds long. The steps start at times "Start Time", "Start Time"+"Duration", etc. The value of the valuenode is the value of "Link" at some time. "Intersection" determines which time is used. An "Intersection" of 0.0 means that the value of "Link" at the start of the step should be used. An "Intersection" of 0.5 (the default) means to use the value of "Link" at the middle of the step, etc.
The resulting value at time Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle T} is:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle Link \Bigg ( \Bigg ( Duration \cdot \left ( \left \lfloor \frac{T  Start\ Time}{Duration} \right \rfloor + Intersection \right ) \Bigg ) + Start \ Time \Bigg )}
Example
"Link" is a sine wave. "Duration" is 10f (the frame rate is 24 fps). "Start Time" is 1s.
So one step starts at 1s, and others start at 0s 14f, 0s 4f, 1s 10f, etc.
This is the (kind of) sine wave:
And this is the effect of the Step valuenode on it, with an "Intersection" of 0.0. Notice that at time 0s, the step has a negative value  that step runs from 6f to 4f, and so its value is the value of "Link" at time 6f. These images were created in The Gimp  it's not currently possible to view two curves at the same time in Synfig Studio.
Here it is with an "Intersection" of 0.5:
and here, with an "Intersection" of 1.0:
You can download the project Media:Doc Convert Step.sifz
Stripes
Converting a gradient parameter to "Stripes" adds four subparameters:
 color "Color 1"
 color "Color 2"
 integer "Stripe Count"
 real "Width"
The resulting value is a gradient containing "Stripe Count" equally spaced, equally wide stripes of color "Color 2" with a background of "Color 1". "Width" specifies the width of the stripes, with a "Width" of 0 or less meaning they are invisible, and a "Width" of 1 or more meaning the whole gradient is of "Color 2".
Subtract
Converting a parameter to "Subtract" adds three subparameters, the first two of which are the same type as the parameter itself:
 <param> "LHS"
 <param> "RHS"
 real "Scalar"
The "Subtract" conversion can be used with parameters of type angle, color, gradient, integer, real, time, and vector.
The resulting value is:
(LHS  RHS) * Scalar
Switch
Converting a parameter to "Switch" adds three subparameters:
 <param> "Link Off"
 <param> "Link On"
 bool "Switch"
"Link Off" and "Link On" are the same type as the parameter being converted.
The resulting value is the value of "Link Off" when "Switch" is off, and "Link On" when "Switch" is on.
This conversion can be used on all value types.
Time Loop
Converting a parameter to "Time Loop" adds four subparameters: one called "Link", of the same type as the parameter itself, and three time parameters:
 <param> "Link"
 time "Link Time"
 time "Local Time"
 time "Duration"
It works similarly to the Time Loop Layer but affects only a single parameter.
For any integer value n, from "Local Time + abs(Duration)*n" to "Local Time + abs(Duration)*(n+1)", the resulting value of the parameter is the same as that of the "Link" parameter from "Link Time" to "Link Time + Duration".
In other words, "Duration" seconds of values of the parameter "Link" starting from time "Link Time" onwards are looped over and over, with the value of the "Link" parameter at time "Link Time" corresponding to the resulting value at time "Local Time".
As an example, suppose the "Link" parameter has a value of time the current time. At 0s the value is 0, at 10s the value is 20.
If we set:
 Link Time = 5s
 Local Time = 2s
 Duration = 4s
then from 2s to 6s and from 6s to 10s, etc., the resulting value is the value of "Link" from 5s to 9s, as follows:
Then the resulting values will be:
 0s > "Link" value at 7s = 14
 1s > "Link" value at 8s = 16
 2s > "Link" value at 5s = 10 (at "Link Time" = 2s, result is the value of "Link" at "Link Time" = 5s = 10)
 3s > "Link" value at 6s = 12
 4s > "Link" value at 7s = 14
 5s > "Link" value at 8s = 16
 6s > "Link" value at 5s = 10 ("Duration" = 4s later, the value is the same as at 2s)
 7s > "Link" value at 6s = 12
If "Duration" is zero, the resulting value is whatever the value of the "Link" parameter is at time "Link Time".
If "Duration" is negative, the resulting value at "Local Time" still matches the value of "Link" at "Link Time", but the animation goes in the opposite direction. For example:
If we set:
 Link Time = 5s
 Local Time = 2s
 Duration = 4s
then from 2s to 6s and from 6s to 10s, etc., the resulting value is the value of "Link" from 5s to 1s, as follows:
Then the resulting values will be:
 0s > "Link" value at 3s = 6
 1s > "Link" value at 2s = 4
 2s > "Link" value at 5s = 10 (at "Link Time" = 2s, result is the value of "Link" at "Link Time" = 5s = 10)
 3s > "Link" value at 4s = 8
 4s > "Link" value at 3s = 6
 5s > "Link" value at 2s = 4
 6s > "Link" value at 5s = 10 (4s later, the value is the same as at "Link Time" = 2s)
 7s > "Link" value at 4s = 8
This conversion can be used on all value types.
Time String
Converting a string parameter to "Time String" adds one subparameter called "Time", of type time:
 time "Time"
The result is a string containing the given "Time".
Timed Swap
Converting a parameter to "Timed Swap" adds four subparameters:
"Before" and "After" are the same type as the parameter being converted.
This conversion type linearly switches from "Before" to "After", taking "Lenght" seconds to do so, and completing the swap at "Time".
Note that this doesn't give us anything that we can't achieve using the "Linear" conversion type and a few waypoints.
"Timed Swap" can be used on angles, colors, integers, reals, times, and vectors.
The resulting value is:
if "current time" > "swap Time" then "After" else if "current time" < ("swap Time"  "Lenght") then "Before" else interpolate between "Before" and "After"
See Slideshow Tutorial for an example.
TwoTone
Converting a gradient to "TwoTone" adds two colorvalued subparameters:
 color "Color1"
 color "Color2"
The resulting gradient has two Color Stop, one at each end, starting with "Color1" and ending with "Color2".
These color parameters can be animated, giving us the ability to have the gradient change color over time. It used to be used as a workaround for this bug.
Vector Angle
Converting an angle to "Vector Angle" adds a vector subparameter:
 vector "Vector"
The resulting value is the angle between the "Vector" and the X axis.
Vector Length
Converting a real to "Vector Length" adds a vector subparameter:
 vector "Vector"
The resulting value is the length of the "Vector".
Vector X
Converting a real to "Vector X" adds a vector subparameter:
 vector "Vector"
The resulting value is the X component of the "Vector".
Vector Y
Converting a real to "Vector Y" adds a vector subparameter:
 vector "Vector"
The resulting value is the Y component of the "Vector".
Which Value Types can use which Convert Types?
There are 13 different types of value in Synfig. Each of these types has a different set of convert types available to it, as follows:
Angle
Angle parameters can be converted to Add, aTan2, Spline Tangent, Dot Product, Linear, Random, Range, Scale, Step, Subtract, Switch, Time Loop, Timed Swap, Vector Angle, and Reference types.
Bool
Bool parameters can only be converted to the And, Greyed, Or, Not, Compare Random, Switch, Time Loop,and Reference types.
Canvas
Canvas parameters can be converted to the Switch, Time Loop, and Reference type.
Color
Color parameters can be converted to Add, Composite, Gradient Color, Linear, Radial Composite, Random, Scale, Step, Subtract, Switch, Time Loop, Timed Swap, and Reference types.
Gradient
Gradient parameters can be converted to Add, Gradient Rotate, Repeat Gradient, Stripes, Subtract, Switch, Time Loop, TwoTone, and Reference types.
Integer
Integer parameters can be converted to Add, Linear, Random, Range, Scale, Step, Subtract, Switch, Time Loop, Timed Swap, and Reference types.
List
List parameters can be converted to Spline, Dynamic List, Switch, Time Loop, and Reference types.
Real
Real parameters can be converted to Add, Spline Width, Cos, Dot Product, Exponential, Linear, Logarithm, Power, Random, Range, Reciprocal, Scale, Sine, Step, Subtract, Switch, Time Loop, Timed Swap, Vector Length, Vector X, Vector Y, and Reference types.
Segment
Segment parameters can be converted to the Composite, Switch, Time Loop, and Reference types.
Spline Point
Spline Point parameters can be converted to Composite, Reverse Tangent, Switch, Time Loop, and Reference types.
String
String parameters can be converted to the Angle String, Int String, Joined List, Real String, Switch, Time Loop, Time String, and Reference types.
Time
Time parameters can be converted to the Add, Linear, Random, Range, Scale, Step, Subtract, Switch, Time Loop, Timed Swap, and Reference types.
Vector
Vector parameters can be converted to Add, Spline Tangent, Spline Vertex, Composite, Linear, Radial Composite, Random, Scale, Segment Tangent, Segment Vertex, Step, Subtract, Switch, Time Loop, Timed Swap, and Reference types.
Compatibility
When a new ValueNode type is added to Synfig, the .sif file format is extended to include a way of writing the new type. This extension won't be able to be read by any older version of Synfig. Here's a list of the ValueNode types that have been added, along with the subversion revision number in which they first appeared:
Version Revision Convert
(1.0.2) 15/08/09 pull#199 Reverse (1.0) 15/04/27 pull#105 Dynamic (0.63.06) ? BLine Width renamed Spline Width ? BLine Vertex renamed Spline Vertex ? BLine Tangent renamed Spline Tangent
(0.61.09) 2034 Logarithm 2010 Int String 2010 Angle String 2007 Joined List 2003 Real String 2000 Time String 1891 Dot Product 1885 Gradient Color 1882 Vector X 1882 Vector Y 1881 Vector Length 1880 Vector Angle
(0.61.08) 1839 1694 BLine Width 1690 Random (for bools) 1691 Step 1354 Subtract (for gradients) 1354 Add (for gradients) 1267 From Integer 1267 Duplicate 1238 Reciprocal 1226 Time Loop 1162 Reverse Tangent 1132 aTan2 1111 Cos 923 Switch 907 Random
(0.61.07) 878 776 Range 744 Spline Vertex 744 Spline Tangent 742 Add 739 Exponential 666 Repeat Gradient 610 Timed Swap
(0.61.06) 536