19,596
edits
m (cat.d) |
m (Iritscen moved page AE:Authoring custom camera animations to Authoring custom camera animations without leaving a redirect: modding tutorials are all in the main namespace except for this and one other) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
Anyway. Look for "cm_interpolate" in the original scripts if you want to see how it's done. What we are going to do now is create a new OBAN from scratch. Make an OBANshpadoinkle.xml file looking like this: | Anyway. Look for "cm_interpolate" in the original scripts if you want to see how it's done. What we are going to do now is create a new OBAN from scratch. Make an OBANshpadoinkle.xml file looking like this: | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni Version="0.9. | <Oni Version="0.9.96.0"> | ||
<Instance id="0" type="OBAN" name="shpadoinkle"> | <Instance id="0" type="OBAN" name="shpadoinkle"> | ||
<Flags></Flags> | <Flags></Flags> | ||
Line 25: | Line 25: | ||
<Rotation>0 0 0 1</Rotation> | <Rotation>0 0 0 1</Rotation> | ||
<Translation>0 0 0</Translation> | <Translation>0 0 0</Translation> | ||
<Time>0</Time> | |||
</OBANKeyFrame> | </OBANKeyFrame> | ||
</KeyFrames> | </KeyFrames> | ||
Line 35: | Line 35: | ||
00000000 1F 27 DC 33 DF BC 03 00 32 33 52 56 40 00 14 00 .'Ü3ß¼..23RV@... | 00000000 1F 27 DC 33 DF BC 03 00 32 33 52 56 40 00 14 00 .'Ü3ß¼..23RV@... | ||
00000010 10 00 08 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000010 10 00 08 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
00000020 | 00000020 80 00 00 00 A0 00 00 00 60 00 00 00 10 00 00 00 €... ...`....... | ||
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
00000040 4E 41 42 4F 08 00 00 00 00 00 00 00 A0 00 00 00 NABO........ ... | 00000040 4E 41 42 4F 08 00 00 00 00 00 00 00 A0 00 00 00 NABO........ ... | ||
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
00000060 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000060 4F 42 41 4E 73 68 70 61 64 6F 69 6E 6B 6C 65 00 OBANshpadoinkle. | ||
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |||
00000080 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |||
00000090 00 00 00 00 00 00 00 00 '''00 00 80 3F 00 00 00 00''' ........'''..€?....''' | |||
000000A0 '''00 00 00 00 00 00 00 00 00 00 80 3F 00 00 00 00 ..........€?....''' | |||
000000B0 '''00 00 00 00 00 00 00 00 00 00 80 3F 00 00 00 00 ..........€?....''' | |||
000000C0 '''00 00 00 00 00 00 00 00''' '''''00 00 80 3F 00 00 00 00 ..........€?....''''' | |||
000000D0 '''''00 00 00 00 00 00 00 00 00 00 80 3F 00 00 00 00 ..........€?....''''' | |||
000000E0 '''''00 00 00 00 00 00 00 00 00 00 80 3F 00 00 00 00 ..........€?....''''' | |||
000000F0 '''''00 00 00 00 00 00 00 00''''' 01 00 01 00 00 00 01 00 '''''........'''''........ | |||
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F ..............€? | |||
Emphasized in '''bold''' and '''''bold italics''''' respectively are the 2 matrices. The first starts at byte | 00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
Emphasized in '''bold''' and '''''bold italics''''' respectively are the 2 matrices. The first starts at byte 0x98, the second at byte 0xC8. Both are 0x30=48 bytes long. Actually, as you've noticed, they're both exactly the same, and we'll just keep it that way to avoid confusion. | |||
Now comes the actual authoring part. Grab [[AE:Plugins#Camera|THIS]] [[AE:Plugins|plugin]] (PC-only, because [[make_corpse]] is missing on the Mac) and put it in your [[GameDataFolder]]. Run Oni, enable the dev mode and shapeshift to the camera character. This character can only turn, not move, so you can just as well set '''chr_pin_character=1''' or '''chr_nocollision 0 1''', to allow the camera to float in the air at the desired location. Go to the location of your choice with the manual camera, then teleport the camera character there with the End hotkey. Now set the orientation by aiming around. | Now comes the actual authoring part. Grab [[AE:Plugins#Camera|THIS]] [[AE:Plugins|plugin]] (PC-only, because [[make_corpse]] is missing on the Mac) and put it in your [[GameDataFolder]]. Run Oni, enable the dev mode and shapeshift to the camera character. This character can only turn, not move, so you can just as well set '''chr_pin_character=1''' or '''chr_nocollision 0 1''', to allow the camera to float in the air at the desired location. Go to the location of your choice with the manual camera, then teleport the camera character there with the End hotkey. Now set the orientation by aiming around. | ||
Line 61: | Line 63: | ||
Also note that the character's vertical aiming is unrestricted, so if you want to aim the camera extra-high or extra-low, the player camera won't be reflecting the actual elevation of the camera's "body": in that case, you may be better off going into manual camera mode 1 again, so as to look at the character a bit from the side, or roughly along the desired axis. | Also note that the character's vertical aiming is unrestricted, so if you want to aim the camera extra-high or extra-low, the player camera won't be reflecting the actual elevation of the camera's "body": in that case, you may be better off going into manual camera mode 1 again, so as to look at the character a bit from the side, or roughly along the desired axis. | ||
Once the orientation is correct, enter '''make_corpse shpadoinkle'''. This will create a file in the Oni folder called | Using the current settings above is not possible to capture a camera that is looking 90º above or below the character (perpendicular camera view to the ground/sky). You can actually achieve these types of cameras using the following commands: | ||
''Top-Ground camera:'' | |||
cm_canter_unarmed=1.0 | |||
cm_canter_weapon=1.0 | |||
''Ground-Top camera'' | |||
cm_canter_unarmed=-1.0 | |||
cm_canter_weapon=-1.0 | |||
Once the orientation is correct, enter '''make_corpse shpadoinkle'''. This will create a file in the Oni folder called lvl_#_shpadoinkle_corpse.dat, that looks a bit like this (and a bit like [[CRSA]], not surprisingly): | |||
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F | Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F | ||
Line 132: | Line 144: | ||
00000420 02 00 F6 44 28 87 B3 C0 CC 0B 5C C4 ..öD(‡³ÀÌ.\Ä | 00000420 02 00 F6 44 28 87 B3 C0 CC 0B 5C C4 ..öD(‡³ÀÌ.\Ä | ||
The 48 bytes emphasized in bold, starting at 0x84, correspond to the transform matrix of the "pelvis" of our camera character. We want this matrix to replace both of the matrices in our OBANshpadoinkle.oni, making it look like this: | The 48 bytes emphasized in bold, starting at 0x84, correspond to the transform matrix of the "pelvis" of our camera character. We want this matrix to replace both of the matrices in our OBANshpadoinkle.oni, making it look like this: | ||
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F | Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F | ||
00000000 1F 27 DC 33 DF BC 03 00 32 33 52 56 40 00 14 00 .'Ü3ß¼..23RV@... | 00000000 1F 27 DC 33 DF BC 03 00 32 33 52 56 40 00 14 00 .'Ü3ß¼..23RV@... | ||
00000010 10 00 08 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000010 10 00 08 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
00000020 | 00000020 80 00 00 00 A0 00 00 00 60 00 00 00 10 00 00 00 €... ...`....... | ||
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
00000040 4E 41 42 4F 08 00 00 00 00 00 00 00 | 00000040 4E 41 42 4F 08 00 00 00 00 00 00 00 A0 00 00 00 NABO........ ... | ||
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
00000060 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 00000060 4F 42 41 4E 73 68 70 61 64 6F 69 6E 6B 6C 65 00 OBANshpadoinkle. | ||
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |||
00000080 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |||
00000090 00 00 00 00 00 00 00 00 '''69 BE 40 BF 00 00 00 00''' ........'''i¾@¿....''' | |||
000000A0 '''1F 7B 28 BF 3F 9C 0D 3E D6 48 7A 3F E9 00 22 BE .{(¿?œ.>ÖHz?é."¾''' | |||
000000B0 '''2B B8 24 3F D3 2B 57 BE C9 70 3C BF 02 C0 F5 44 +¸$?Ó+W¾Ép<¿.ÀõD''' | |||
000000C0 '''84 4B A5 C1 CC 8B 5C C4''' '''''69 BE 40 BF 00 00 00 00 „K¥ÁÌ‹\Äi¾@¿....''''' | |||
000000D0 '''''1F 7B 28 BF 3F 9C 0D 3E D6 48 7A 3F E9 00 22 BE .{(¿?œ.>ÖHz?é."¾''''' | |||
000000E0 '''''2B B8 24 3F D3 2B 57 BE C9 70 3C BF 02 C0 F5 44 +¸$?Ó+W¾Ép<¿.ÀõD''''' | |||
000000F0 '''''84 4B A5 C1 CC 8B 5C C4''''' 01 00 01 00 00 00 01 00 '''''„K¥ÁÌ‹\Ä'''''........ | |||
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F ..............€? | |||
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |||
Now import OBANshpadoinkle.oni in a level, say, level3 and enjoy your new "shpadoinkle" animation. In order to enjoy it you type this: | Now import OBANshpadoinkle.oni in a level, say, level3 and enjoy your new "shpadoinkle" animation. In order to enjoy it you type this: | ||
cm_interpolate shpadoinkle 0 | cm_interpolate shpadoinkle 0 | ||
Line 179: | Line 192: | ||
dmsg "that other point being halfway between shpadoinkle and where we started" | dmsg "that other point being halfway between shpadoinkle and where we started" | ||
That should get you started. A mini example featuring the DeLorean will be provided Soon Enough. | That should get you started. A mini example featuring the DeLorean will be provided Soon Enough. | ||
[[Category: | [[Category:Modding tutorials]] |