View Full Version : Envelop format/syntax

08-05-2011, 03:35 PM
hey all,

I'm trying to get a grasp on how the Envelope value fields all. I'm "assuming" its motion, rotation, scale each with their own value but i'm not sure thats right. I don't see anything related to frame # or anything else that would define time.. and with that there are values in motions that aren't .x which doesn't make a lot of sense. This is for morphmixer.. here's the envelop i'm using.. its very very simple intentionally.

{ KeyedMorph
{ Envelope
Key 0 0 3 0 0 0 0 0.9995835068721366 0
Key 1 0.66666666666666663 3 0 0 0 -0.5 -0.5 0
Key -1 1.3333333333333333 3 0 0 0 -0.5 -0.5 0
Key 0 2 3 0 0 0 0.9995835068721366 0 0
Behaviors 1 1

Anyways, is there any detailed documentation on how that is formatted and syntax? I've kinda dug through the documentation but its not very clear in this example.


08-06-2011, 02:46 AM
Format is:

Key [value] [time in seconds] [Key Type] [T value] [C value] [B value] [Dunno] [Dunno] [Dunno]

The last three I assume are to do with the other spline types (Hermite or Bezier) but I have no clue what they represent. The lscript docs have this to say:

getKeyHermite(<key>) returns the four Hermite Spline coefficients that are currently in use for the specified keyframe. If get KeyCurve() does not return CHAN_HERMITE, then you probably do not want to call this method.

So I assume they have something to do with those values.

08-15-2011, 03:30 PM
I don't know if this will help or if the information is still accurate, but in the docs for the SDK there is an example for the file formats.

Look at the lwo2.html file located in the following folder under the LW SDK folder. .../html/filefmts

There is a section that describes Envelopes as well as others.


08-15-2011, 08:40 PM
Well, heck, I sort of screwed up in my post above.

The file that I wanted you to see is actually lwo2ex.html. You can get to it from the "Object File Examples" link in the file (lwo2.html) that I referred to in my first post.

Sorry if I caused any confusion.


08-15-2011, 10:33 PM
Look at the scene file documentation (lwsdk/html/filefmts/lwsc.html). It has the envelope format described, including Dodgy's [Dunno] parameters.