2010-05-03, 01:06 AM
It turned out the last leg of the soft animation data was a lot trickier than I'd expected, but I was able to finally sort it out.
I was also able to hand edit the BOX1.MDL file to make it work like a soft animation treasure chest. One prob that gave me a lot of trouble was the BOX1.MDL file did not have a corresponding .cp file. So Som would crash. So maybe .cp is required for animated mdl files. I think the wooden chest .cp works pretty much as a dummy .cp file. I just copied that. I still don't think the .cp files effect animation though they might define the control points also, so one is needed maybe to at least be clear there are no control points (which apparently aren't considered for inanimate files)
Moving along.... one potential chink in Som's armor is there may not be a way to setup a non-cyclical soft animation. There are still some flags I do not yet fully understand however I can't think of a single model in Som's repertoire that needs a non-cyclical soft animation so it may not be implemented, and at the least if it is, finding an example of how to do it might be impossible. The only objects that use non-cyclical animations are treasure chests and doors and basically anything that acts like that.
The basic problem is the hypothetical chest opens, then when the closing animation starts it must revert back to it's original pose before the closing animation starts. Hopefully there is a pose flag that basically jumps straight to an animation frame, but the normal behavior is to interpolate (blend) into the first frame and so on which just isn't good enough. It's possible some NPCs/monsters idle in an animation not based on their original "bind" pose. If so that would necessitate such a pose flag.
You can remove the closing frame and the chest will just stay open indefinitely. It might close if you reload the map but probably not. If you really needed a soft door/chest to open/close you could still use two different objects and flip them to the correct effect.
A soft animation door/chest anyway would be pretty freaky. More Shadow Tower's style perhaps.
Last major hurdle are the .cp files. They look pretty simple thankfully.
EDITED: Another soft animation limitation -- again, flags may exist -- is I don't see a way to animate the lighting normals. So like if your model had a hand palm down with a shadow on the palm (because a light is above) and the animation flipped the hand over, the shadow would still be on the palm even though it's now facing the light.
I was also able to hand edit the BOX1.MDL file to make it work like a soft animation treasure chest. One prob that gave me a lot of trouble was the BOX1.MDL file did not have a corresponding .cp file. So Som would crash. So maybe .cp is required for animated mdl files. I think the wooden chest .cp works pretty much as a dummy .cp file. I just copied that. I still don't think the .cp files effect animation though they might define the control points also, so one is needed maybe to at least be clear there are no control points (which apparently aren't considered for inanimate files)
Moving along.... one potential chink in Som's armor is there may not be a way to setup a non-cyclical soft animation. There are still some flags I do not yet fully understand however I can't think of a single model in Som's repertoire that needs a non-cyclical soft animation so it may not be implemented, and at the least if it is, finding an example of how to do it might be impossible. The only objects that use non-cyclical animations are treasure chests and doors and basically anything that acts like that.
The basic problem is the hypothetical chest opens, then when the closing animation starts it must revert back to it's original pose before the closing animation starts. Hopefully there is a pose flag that basically jumps straight to an animation frame, but the normal behavior is to interpolate (blend) into the first frame and so on which just isn't good enough. It's possible some NPCs/monsters idle in an animation not based on their original "bind" pose. If so that would necessitate such a pose flag.
You can remove the closing frame and the chest will just stay open indefinitely. It might close if you reload the map but probably not. If you really needed a soft door/chest to open/close you could still use two different objects and flip them to the correct effect.
A soft animation door/chest anyway would be pretty freaky. More Shadow Tower's style perhaps.
Last major hurdle are the .cp files. They look pretty simple thankfully.
EDITED: Another soft animation limitation -- again, flags may exist -- is I don't see a way to animate the lighting normals. So like if your model had a hand palm down with a shadow on the palm (because a light is above) and the animation flipped the hand over, the shadow would still be on the palm even though it's now facing the light.