Saving and Loading Function Curves
 
 
 

The fcurves you create in the fcurve editor can be saved as .fraw2 files and subsequently applied to other parameters. You can also import and export SOFTIMAGE|3D fcurves as .fraw files.

The .fraw format of the SOFTIMAGE|3D raw fcurve file is an ASCII file with a minimal description of fcurves as follows:

<number of keys> <interpolation mode: 0 = CONSTANT, 1 = LINEAR, 2 = SPLINE>

The .fraw2 format is a simple ASCII file that can be used to import and export fcurves to and from Softimage. It is an augmented version of the .fraw format that can describe any fcurve in Softimage. The file can contain several fcurves, each of which is described following this format:

Start_FCurve
<curve name> <number of keys> <curve type> <extrapolation method> <value when no keys> <min clamping value> <max clamping value> <first segment kind> <unused field (for padding)>

Because this file format is ASCII, it's simple to write a converter for other software packages. It also makes it easy for you to save fcurve presets.

For more details on the .fraw2 format, see .fraw2 File Format.

Saving Fcurves

To save an fcurve preset in an .fraw2 file

  1. Select the fcurve you want to save.

    If you select multiple fcurves, the fcurves are saved in the .fraw2 file, but only the first one is loaded. This is because the file contains only raw data — there is no mapping information.

  2. Choose File Save from the fcurve editor toolbar or press Ctrl+S (with the mouse pointer within the fcurve editor) to save the fcurve in an .fraw2 file for use in Softimage.

To save an fcurve for exporting to SOFTIMAGE|3D in a .fraw file

  1. Select the fcurve you want to save.

  2. Choose File Export (.fraw) to export the fcurve for use in SOFTIMAGE|3D.

  3. In the browser, navigate to the folder where you want to save your curve, give it a name, and click OK.

    Your curve is now saved as an fcurve file, indicated by its .fraw2 (Softimage) or .fraw (SOFTIMAGE|3D) extension.

Loading Fcurves into the Fcurve Editor

  1. In the fcurve editor, select the fcurve you want to replace.

  2. Do one of the following:

    Choose File Open from the fcurve editor toolbar or press Ctrl+O to load an .fraw2 fcurve.

    or

    Choose File Import (.fraw) to import an .fraw fcurve from SOFTIMAGE|3D.

The loaded fcurve replaces the currently selected curve.

.fraw2 File Format

The .fraw2 file format is a simple ASCII file that can be used to export and import fcurves to and from Softimage. It is a revamped version of the old .fraw format from SOFTIMAGE|3D. The file can contain several fcurves, each fcurve being described following this format:

Start_FCurve <curve name>
<number of key> <curve type> <extrapolation method> <value when no keys> <min clamping value> <max clamping value> <first segment kind> <unused field (for padding)>

Each following line provides information on a key. Their first argument is an integer referring to the template ID of the key. The template IDs are as follows:

0

The key is continuous (ONE value) and has a tangent (ONE tangent) => it's a continuous standard key.

1

The key is continuous (ONE value) and has no tangent (NONE) => it's a continuous raw key.

2

The key is discontinous (TWO values) and has a tangent (ONE tangent) => it's a discontinuous standard key.

3

The key is discontinous (TWO values) and has no tangent(NONE) => it's a Boolean, integer, or discontinous raw key.

For the template ID 0, the line is written/read as follows:

0 <key - time> <right value> <right slope time> <right slope value> <left slope time> <left slope value> <constraints> <right segment kind>

For the template ID 1, the line is written/read as follows:

1 <key - time> <right value> <constraints>

For the template ID 2, the line is written/read as follows:

2 <key - time> <right value> <left value> <right slope time> <right slope value> <left slope time> <left slope value> <constraints> <right segment kind>

For the template ID 3, the line is written/read as follows:

3 <key - time> <right value> <left value> <constraints>
End_FCurve 

The bit fields and enums used are the following:

Curve-specific Attributes

Curve type: Used to define the curve type

0

Undefined type

10

Boolean fcurve: keys have 2 values (0 or 1)

15

Integer fcurve: keys have 2 values (integer)

20

Standard Fcurve: keys have 2 values (real) and 2 tangents. Interpolation can be set to linear, constant, or Bézier

30

Raw fcurve: keys have 2 values (real) but no tangents

Extrapolation: Used to set the extrapolation of the curve (same one before the first key and after the last one)

1

Constant extrapolation (horizontal lines at the values of the first and last keys)

2

Linear extrapolation (based on the first and last keys tangents).

3

Cyclic extrapolation: the animation between the first and last key is cycled infinitely.

4

Continuous cyclic extrapolation: same as above but the repetitions are offset to ensure the curve continuity.

Key specific attributes

Segment kind: Used to define the kind of segment on the right side of a key (also known as key interpolation).

0

Default interpolation; that is, interpolation of the previous key.

1

Constant interpolation: staircase curve

2

Linear interpolation

3

Bézier (spline) interpolation

Constraints: Used for the constraints field

1

Key parameter is locked.

2

Key values are locked.

4

Key tangent is continuous (unified).

8

Tangent orientation is locked.

16

Tangent length is locked.

32

Key parameter/values/tangents are locked.

64

Tangent has a horizontal slope (zero).

128

Tangent has a horizontal slope when key is an extremum (plateau).

256

Tangent is recomputed when the neighboring keys are moved (automatic).

These constraints are additive. In the example, 260 = 256 + 4 = Tangent is continuous and automatic.

Example:

Start_FCurve posy 

(description of curve posy is starting)

6 20 1 6.19792 -1.79769E+308 1.79769E+308 3 0 

(6 keys, standard curve, constant extrapolation, 6.19 is the value when no keys are on the curve, min value bound, max value bound, first segment kind is standard Bézier)

0 0.033367 6.197923 0.100100 0.000000 0.000000 0.000000 260 3 

(Continuous key with 1 tangent, time, value, right tangent x, right tangent y, left tgte x, left tgte y, constraints (bit field), Bézier segment)

0 0.333667 6.157524 0.133467 -0.327045 -0.100100 0.245284 260 3
0 0.734067 5.029417 0.094326 -0.083477 -0.142822 0.126396 260 3
0 0.934267 5.500409 0.124774 0.174916 -0.085164 -0.119389 260 3
0 1.267933 5.617429 0.139058 -0.261066 -0.135670 0.254705 260 3
0 1.601600 4.553986 0.000000 0.000000 -0.111222 0.000000 260 3

End_FCurve 

(description of the curve is finished)