19,584
edits
m (link fix) |
m (wording) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{OBD_File_Header | type=OBAN | prev=Mtrl | next=OBDC | name=Object Animation | family= | {{OBD_File_Header | type=OBAN | prev=Mtrl | next=OBDC | name=Object Animation | family=General | desc='''OBAN'''s are arrays for storing keyframes in an object or camera animation, as well as basic info like whether the animation loops, and how it does so. | align=center}} | ||
[[ | [[Image:oban_a.gif]] | ||
Line 10: | Line 10: | ||
{{OBDtr|0x04|lev_id|FFFF00|01 00 00 '''06'''|3 |level 3}} | {{OBDtr|0x04|lev_id|FFFF00|01 00 00 '''06'''|3 |level 3}} | ||
{{OBDtr|0x08|char[12]|00FF00|00 00 00 00 |0 |padding }} | {{OBDtr|0x08|char[12]|00FF00|00 00 00 00 |0 |padding }} | ||
{{OBDtr|0x14| | {{OBDtr|0x14|uint32 |00FF00|00 00 00 00 |0 |flags; used values: | ||
:0x'''01''' 00 00 00 - loop animation normally | :0x'''01''' 00 00 00 - loop animation normally | ||
:0x'''02''' 00 00 00 - loop animation back to back | :0x'''02''' 00 00 00 - loop animation back to back | ||
Line 63: | Line 63: | ||
|} | |} | ||
| ALIGN=LEFT | fixed transform matrix | | ALIGN=LEFT | fixed transform matrix | ||
{{OBDtr|0x78| | {{OBDtr|0x78|uint16|B0C3D4|50 00|80 | ticks per frame; does not work}} | ||
{{OBDtr|0x7A| | {{OBDtr|0x7A|uint16|E7CEA5|F5 01|501 | animation length in frames}} | ||
{{OBDtr|0x7C| | {{OBDtr|0x7C|uint16|FFDDDD|00 00|0 | stop frame for the first "half" of the animation; used by door animations to distinguish between open and close sequences }} | ||
{{OBDtr|0x7E| | {{OBDtr|0x7E|uint16|64AAAA|65 00|101 | number of keyframes}} | ||
{{OBDtrBK|First keyframe (black outline)}} | {{OBDtrBK|First keyframe (black outline)}} | ||
|- ALIGN=CENTER VALIGN=TOP | |- ALIGN=CENTER VALIGN=TOP | ||
Line 72: | Line 72: | ||
{|border=1 cellspacing=0 style="white-space:nowrap" | {|border=1 cellspacing=0 style="white-space:nowrap" | ||
|-BGCOLOR="#EBEBEB" | |-BGCOLOR="#EBEBEB" | ||
| F4 04 35 BF||6A 19 C4 B3||CE 3C 03 B4||F3 04 35 BF | | F4 04 35 BF | ||
|-BGCOLOR="#EBEBEB" | |||
| 6A 19 C4 B3 | |||
|-BGCOLOR="#EBEBEB" | |||
| CE 3C 03 B4 | |||
|-BGCOLOR="#EBEBEB" | |||
| F3 04 35 BF | |||
|} | |} | ||
| | | | ||
{|border=1 cellspacing=0 style="white-space:nowrap" | {|border=1 cellspacing=0 style="white-space:nowrap" | ||
| -0.7071068|| -9.131584e-8|| -1.222244e-7|| -0.7071067 | | -0.7071068 | ||
|- | |||
| -9.131584e-8 | |||
|- | |||
| -1.222244e-7 | |||
|- | |||
| -0.7071067 | |||
|} | |} | ||
|ALIGN=LEFT|object rotation | |ALIGN=LEFT|object rotation | ||
Line 90: | Line 102: | ||
|} | |} | ||
|ALIGN=LEFT|object position | |ALIGN=LEFT|object position | ||
{{OBDtr|0x1C| | {{OBDtr|0x1C|uint32|FF00C8|00 00 00 00 |0 |current frame}} | ||
|} | |} | ||
Characters can have an object animation applied to them by using chr_envanim | Object animations are used for [[OBD:OBOA|moving objects]] (doors included), [[OBD:TRIG|triggers]], the camera, and characters. These animations change the rotation and position of the object and do not involve changes to the model geometry. Object animations may be referenced from OBOA but they can also be set using [[env_setanim]] script command. Camera animations are never referenced from data; they're started from scripts using [[cm_anim]] or [[cm_interpolate]]. Because of this the only way to tell if an animation is intended for the camera or for an object is to look at the level scripts. | ||
Characters can have an object animation applied to them by using [[chr_envanim]]. The object animation controls the movement of the character and it's normally used together with a [[TRAM]] that has the 'real world' flag set. This can be used to make the character appear attached to another animated object, for example Konoko riding her motorcycle in the opening of Chapter 3. | |||
;Transform matrices | ;Transform matrices | ||
Line 123: | Line 136: | ||
---- | ---- | ||
---- | ---- | ||
{{OBD_File_Footer | type=OBAN | prev=Mtrl | next=OBDC | name=Object Animation | family= | {{OBD_File_Footer | type=OBAN | prev=Mtrl | next=OBDC | name=Object Animation | family=General | align=center}} | ||
{{OBD}} | {{OBD}} |