Sceda: Sceda File Formats

Sceda: Sceda File Formats

Sceda File Formats

This is a short discussion of the file formats that sceda uses, and how it differs from that used by sced.

Sceda can load scene files from either sced or sceda; sced, however, will cough up a bunch of errors when it attempts to read sceda scene files. This is because sceda adds three new file directives:

(Yeah, I know, the names suck, so what's your point?) The first one is the separator between multiple scenes in a single file. I need it, and it doesn't cause any real problems, so I won't be talking about it anymore.

The second two of these are to support interpolation rotations and scales across keyframes. Normal sced stores an object's rotation and scale in a 3x3 transformation matrix. The problem is that I need access to the exact values of the rotation and scale, in order to be able to interpolate properly. A 3x3 matrix is, essentially, a system of three equations containing 6 variables: x, y, and z rotation, x, y, and z scaling. I don't know much math, but what I do know tells me that it would be exceedingly difficult to solve a 3 equation system for 6 variables. If you know differently, please let me know...

So I don't: instead I added code to track an object's rotation and scale, and stuff these values into the file when it's saved.

When sceda loads a file, if it finds Ani_Rotation and Ani_Scale values, it uses them. If it doesn't, it puts in defaults of 0 and 1, for rotation and scaling respectively.

The upshot of all this is that loading a sced scene into sceda will cause problems. The problems occur if the sced scene has instanced objects which have been rotated or scaled from their base object parents: I have no way of knowing how they've been scaled or rotated, and when an animation is done and I start interpolating the objects based on bogus rotation and scale values, things don't look right.

A symptom of this is loading a scene file and seeing that everything looks fine, but when you try to animate the scene the objects suddenly get much larger or smaller, and rotate.

The fix for this is to load the sced scene into sceda, erase all instanced objects, and recreate the scene fresh. By recreating the scene in sceda, sceda will be able to keep track of the correct rotation and scaling values, and when the scene is saved, correct values will be saved.


Steve Chenney and I have talked a bit about how to make sced a little more forgiving of sceda scene files, and this may help to ease this problem. Until then, only the base objects in a sced scene file will be of use in a sceda scene.

Last modified October 23, 1995
Denis McLaughlin < >