diff --git a/characters/alpha/manifest.json b/characters/alpha/manifest.json index f6c7c6c7..03e0d111 100644 --- a/characters/alpha/manifest.json +++ b/characters/alpha/manifest.json @@ -21,5 +21,6 @@ "button": "P", "move": "rush_palm" } - ] + ], + "sprite_scale": 1.5 } \ No newline at end of file diff --git a/characters/beta/manifest.json b/characters/beta/manifest.json index 8daa3519..e6168859 100644 --- a/characters/beta/manifest.json +++ b/characters/beta/manifest.json @@ -21,5 +21,6 @@ "button": "P", "move": "rush_palm" } - ] + ], + "sprite_scale": 1.5 } \ No newline at end of file diff --git a/characters/trainer/manifest.json b/characters/trainer/manifest.json new file mode 100644 index 00000000..55b4a392 --- /dev/null +++ b/characters/trainer/manifest.json @@ -0,0 +1,15 @@ +{ + "id": "trainer", + "name": "TRAINER", + "health": 1000, + "walk_speed": 3.2, + "back_speed": 2.6, + "jump_velocity": -13.5, + "color": "#b48fd0", + "normals": { + "P": "jab", + "K": "kick" + }, + "command_moves": [], + "sprite_scale": 1.25 +} \ No newline at end of file diff --git a/characters/trainer/moves/hit/data.json b/characters/trainer/moves/hit/data.json new file mode 100644 index 00000000..5afe7a1b --- /dev/null +++ b/characters/trainer/moves/hit/data.json @@ -0,0 +1,639 @@ +{ + "name": "hit", + "total": 36, + "loop": false, + "startup": 10, + "active": [ + 11, + 14 + ], + "damage": 50, + "hitstun": 16, + "blockstun": 10, + "pushback": 10, + "hurtboxes": { + "default": [ + [ + -47, + -331, + 116, + 79 + ], + [ + -58, + -252, + 129, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "frames": { + "0-0": [ + [ + -18, + -337, + 68, + 80 + ], + [ + -31, + -257, + 84, + 121 + ], + [ + -58, + -136, + 149, + 136 + ] + ], + "1-1": [ + [ + -18, + -337, + 68, + 80 + ], + [ + -31, + -257, + 84, + 121 + ], + [ + -58, + -136, + 149, + 136 + ] + ], + "2-2": [ + [ + -18, + -337, + 68, + 80 + ], + [ + -31, + -257, + 84, + 121 + ], + [ + -58, + -136, + 149, + 136 + ] + ], + "3-3": [ + [ + -18, + -337, + 69, + 80 + ], + [ + -31, + -257, + 84, + 121 + ], + [ + -58, + -136, + 149, + 136 + ] + ], + "4-4": [ + [ + -18, + -336, + 69, + 80 + ], + [ + -31, + -256, + 85, + 121 + ], + [ + -58, + -135, + 149, + 135 + ] + ], + "5-5": [ + [ + -20, + -336, + 71, + 80 + ], + [ + -33, + -256, + 92, + 121 + ], + [ + -58, + -135, + 147, + 135 + ] + ], + "6-6": [ + [ + -31, + -336, + 79, + 80 + ], + [ + -44, + -256, + 119, + 121 + ], + [ + -58, + -135, + 145, + 135 + ] + ], + "7-7": [ + [ + -38, + -335, + 79, + 80 + ], + [ + -49, + -255, + 131, + 121 + ], + [ + -59, + -134, + 145, + 134 + ] + ], + "8-8": [ + [ + -40, + -335, + 75, + 80 + ], + [ + -50, + -255, + 130, + 121 + ], + [ + -59, + -134, + 144, + 134 + ] + ], + "9-9": [ + [ + -42, + -334, + 74, + 80 + ], + [ + -51, + -254, + 128, + 120 + ], + [ + -59, + -134, + 144, + 134 + ] + ], + "10-10": [ + [ + -44, + -332, + 74, + 79 + ], + [ + -53, + -253, + 127, + 120 + ], + [ + -59, + -133, + 143, + 133 + ] + ], + "11-11": [ + [ + -45, + -331, + 74, + 79 + ], + [ + -55, + -252, + 127, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "12-12": [ + [ + -46, + -331, + 74, + 79 + ], + [ + -56, + -252, + 127, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "13-13": [ + [ + -47, + -331, + 75, + 79 + ], + [ + -57, + -252, + 128, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "14-14": [ + [ + -47, + -331, + 75, + 79 + ], + [ + -57, + -252, + 129, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "15-15": [ + [ + -47, + -331, + 97, + 79 + ], + [ + -58, + -252, + 128, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "16-16": [ + [ + -47, + -331, + 75, + 79 + ], + [ + -58, + -252, + 131, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "17-17": [ + [ + -47, + -331, + 76, + 79 + ], + [ + -58, + -252, + 132, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "18-18": [ + [ + -47, + -331, + 115, + 79 + ], + [ + -57, + -252, + 129, + 119 + ], + [ + -59, + -133, + 142, + 133 + ] + ], + "19-19": [ + [ + -46, + -331, + 113, + 79 + ], + [ + -57, + -252, + 125, + 119 + ], + [ + -60, + -133, + 143, + 133 + ] + ], + "20-20": [ + [ + -46, + -331, + 77, + 79 + ], + [ + -56, + -252, + 127, + 119 + ], + [ + -60, + -133, + 143, + 133 + ] + ], + "21-21": [ + [ + -45, + -331, + 76, + 79 + ], + [ + -56, + -252, + 130, + 119 + ], + [ + -60, + -133, + 142, + 133 + ] + ], + "22-22": [ + [ + -45, + -331, + 77, + 79 + ], + [ + -56, + -252, + 129, + 120 + ], + [ + -60, + -132, + 142, + 132 + ] + ], + "23-23": [ + [ + -45, + -331, + 78, + 79 + ], + [ + -55, + -252, + 128, + 120 + ], + [ + -60, + -132, + 142, + 132 + ] + ], + "24-24": [ + [ + -45, + -331, + 79, + 79 + ], + [ + -55, + -252, + 129, + 120 + ], + [ + -60, + -132, + 141, + 132 + ] + ], + "25-25": [ + [ + -44, + -331, + 79, + 79 + ], + [ + -54, + -252, + 130, + 120 + ], + [ + -60, + -132, + 141, + 132 + ] + ], + "26-26": [ + [ + -42, + -331, + 77, + 79 + ], + [ + -53, + -252, + 132, + 120 + ], + [ + -60, + -132, + 142, + 132 + ] + ], + "27-27": [ + [ + -41, + -332, + 77, + 80 + ], + [ + -51, + -252, + 130, + 120 + ], + [ + -60, + -132, + 142, + 132 + ] + ], + "28-28": [ + [ + -38, + -333, + 74, + 80 + ], + [ + -49, + -253, + 129, + 120 + ], + [ + -60, + -133, + 142, + 133 + ] + ], + "29-29": [ + [ + -35, + -334, + 71, + 80 + ], + [ + -47, + -254, + 126, + 120 + ], + [ + -59, + -134, + 142, + 134 + ] + ] + } + }, + "hitboxes": {} +} \ No newline at end of file diff --git a/characters/trainer/moves/hit/frames/0000.png b/characters/trainer/moves/hit/frames/0000.png new file mode 100644 index 00000000..2c2ef554 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0000.png differ diff --git a/characters/trainer/moves/hit/frames/0001.png b/characters/trainer/moves/hit/frames/0001.png new file mode 100644 index 00000000..e317ae22 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0001.png differ diff --git a/characters/trainer/moves/hit/frames/0002.png b/characters/trainer/moves/hit/frames/0002.png new file mode 100644 index 00000000..9b58c44c Binary files /dev/null and b/characters/trainer/moves/hit/frames/0002.png differ diff --git a/characters/trainer/moves/hit/frames/0003.png b/characters/trainer/moves/hit/frames/0003.png new file mode 100644 index 00000000..213a4676 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0003.png differ diff --git a/characters/trainer/moves/hit/frames/0004.png b/characters/trainer/moves/hit/frames/0004.png new file mode 100644 index 00000000..8a51a85e Binary files /dev/null and b/characters/trainer/moves/hit/frames/0004.png differ diff --git a/characters/trainer/moves/hit/frames/0005.png b/characters/trainer/moves/hit/frames/0005.png new file mode 100644 index 00000000..5d71b956 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0005.png differ diff --git a/characters/trainer/moves/hit/frames/0006.png b/characters/trainer/moves/hit/frames/0006.png new file mode 100644 index 00000000..36b6bcad Binary files /dev/null and b/characters/trainer/moves/hit/frames/0006.png differ diff --git a/characters/trainer/moves/hit/frames/0007.png b/characters/trainer/moves/hit/frames/0007.png new file mode 100644 index 00000000..3256efe6 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0007.png differ diff --git a/characters/trainer/moves/hit/frames/0008.png b/characters/trainer/moves/hit/frames/0008.png new file mode 100644 index 00000000..aca65c24 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0008.png differ diff --git a/characters/trainer/moves/hit/frames/0009.png b/characters/trainer/moves/hit/frames/0009.png new file mode 100644 index 00000000..6d1164bc Binary files /dev/null and b/characters/trainer/moves/hit/frames/0009.png differ diff --git a/characters/trainer/moves/hit/frames/0010.png b/characters/trainer/moves/hit/frames/0010.png new file mode 100644 index 00000000..6c80bea1 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0010.png differ diff --git a/characters/trainer/moves/hit/frames/0011.png b/characters/trainer/moves/hit/frames/0011.png new file mode 100644 index 00000000..ef62fa53 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0011.png differ diff --git a/characters/trainer/moves/hit/frames/0012.png b/characters/trainer/moves/hit/frames/0012.png new file mode 100644 index 00000000..c748d34d Binary files /dev/null and b/characters/trainer/moves/hit/frames/0012.png differ diff --git a/characters/trainer/moves/hit/frames/0013.png b/characters/trainer/moves/hit/frames/0013.png new file mode 100644 index 00000000..858e50e6 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0013.png differ diff --git a/characters/trainer/moves/hit/frames/0014.png b/characters/trainer/moves/hit/frames/0014.png new file mode 100644 index 00000000..f5c96fde Binary files /dev/null and b/characters/trainer/moves/hit/frames/0014.png differ diff --git a/characters/trainer/moves/hit/frames/0015.png b/characters/trainer/moves/hit/frames/0015.png new file mode 100644 index 00000000..f5740ebb Binary files /dev/null and b/characters/trainer/moves/hit/frames/0015.png differ diff --git a/characters/trainer/moves/hit/frames/0016.png b/characters/trainer/moves/hit/frames/0016.png new file mode 100644 index 00000000..dcf75b20 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0016.png differ diff --git a/characters/trainer/moves/hit/frames/0017.png b/characters/trainer/moves/hit/frames/0017.png new file mode 100644 index 00000000..57d8495b Binary files /dev/null and b/characters/trainer/moves/hit/frames/0017.png differ diff --git a/characters/trainer/moves/hit/frames/0018.png b/characters/trainer/moves/hit/frames/0018.png new file mode 100644 index 00000000..5f93503c Binary files /dev/null and b/characters/trainer/moves/hit/frames/0018.png differ diff --git a/characters/trainer/moves/hit/frames/0019.png b/characters/trainer/moves/hit/frames/0019.png new file mode 100644 index 00000000..6522dd46 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0019.png differ diff --git a/characters/trainer/moves/hit/frames/0020.png b/characters/trainer/moves/hit/frames/0020.png new file mode 100644 index 00000000..ac323bef Binary files /dev/null and b/characters/trainer/moves/hit/frames/0020.png differ diff --git a/characters/trainer/moves/hit/frames/0021.png b/characters/trainer/moves/hit/frames/0021.png new file mode 100644 index 00000000..df51db87 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0021.png differ diff --git a/characters/trainer/moves/hit/frames/0022.png b/characters/trainer/moves/hit/frames/0022.png new file mode 100644 index 00000000..5e2e6dcd Binary files /dev/null and b/characters/trainer/moves/hit/frames/0022.png differ diff --git a/characters/trainer/moves/hit/frames/0023.png b/characters/trainer/moves/hit/frames/0023.png new file mode 100644 index 00000000..3e9bddcf Binary files /dev/null and b/characters/trainer/moves/hit/frames/0023.png differ diff --git a/characters/trainer/moves/hit/frames/0024.png b/characters/trainer/moves/hit/frames/0024.png new file mode 100644 index 00000000..3e9f507b Binary files /dev/null and b/characters/trainer/moves/hit/frames/0024.png differ diff --git a/characters/trainer/moves/hit/frames/0025.png b/characters/trainer/moves/hit/frames/0025.png new file mode 100644 index 00000000..7d742b5e Binary files /dev/null and b/characters/trainer/moves/hit/frames/0025.png differ diff --git a/characters/trainer/moves/hit/frames/0026.png b/characters/trainer/moves/hit/frames/0026.png new file mode 100644 index 00000000..c3403ccb Binary files /dev/null and b/characters/trainer/moves/hit/frames/0026.png differ diff --git a/characters/trainer/moves/hit/frames/0027.png b/characters/trainer/moves/hit/frames/0027.png new file mode 100644 index 00000000..7bdf0a41 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0027.png differ diff --git a/characters/trainer/moves/hit/frames/0028.png b/characters/trainer/moves/hit/frames/0028.png new file mode 100644 index 00000000..272092cc Binary files /dev/null and b/characters/trainer/moves/hit/frames/0028.png differ diff --git a/characters/trainer/moves/hit/frames/0029.png b/characters/trainer/moves/hit/frames/0029.png new file mode 100644 index 00000000..ac0ef04a Binary files /dev/null and b/characters/trainer/moves/hit/frames/0029.png differ diff --git a/characters/trainer/moves/hit/frames/0030.png b/characters/trainer/moves/hit/frames/0030.png new file mode 100644 index 00000000..40b433c3 Binary files /dev/null and b/characters/trainer/moves/hit/frames/0030.png differ diff --git a/characters/trainer/moves/hit/frames/0031.png b/characters/trainer/moves/hit/frames/0031.png new file mode 100644 index 00000000..ce7bdfff Binary files /dev/null and b/characters/trainer/moves/hit/frames/0031.png differ diff --git a/characters/trainer/moves/idle/data.json b/characters/trainer/moves/idle/data.json new file mode 100644 index 00000000..2408df95 --- /dev/null +++ b/characters/trainer/moves/idle/data.json @@ -0,0 +1,619 @@ +{ + "name": "idle", + "total": 192, + "loop": true, + "startup": 10, + "active": [ + 11, + 14 + ], + "damage": 50, + "hitstun": 16, + "blockstun": 10, + "pushback": 10, + "hurtboxes": { + "default": [ + [ + -43, + -349, + 74, + 83 + ], + [ + -51, + -266, + 117, + 126 + ], + [ + -49, + -140, + 184, + 140 + ] + ], + "frames": { + "0-0": [ + [ + -42, + -348, + 72, + 83 + ], + [ + -49, + -265, + 115, + 125 + ], + [ + -50, + -140, + 186, + 140 + ] + ], + "1-1": [ + [ + -42, + -348, + 73, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -50, + -140, + 186, + 140 + ] + ], + "2-2": [ + [ + -42, + -348, + 73, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -50, + -140, + 186, + 140 + ] + ], + "3-3": [ + [ + -42, + -348, + 73, + 83 + ], + [ + -49, + -265, + 115, + 125 + ], + [ + -50, + -140, + 186, + 140 + ] + ], + "4-4": [ + [ + -42, + -348, + 73, + 83 + ], + [ + -49, + -265, + 115, + 125 + ], + [ + -50, + -140, + 186, + 140 + ] + ], + "5-5": [ + [ + -42, + -348, + 73, + 83 + ], + [ + -50, + -265, + 116, + 125 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "6-6": [ + [ + -42, + -348, + 73, + 83 + ], + [ + -50, + -265, + 116, + 125 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "7-7": [ + [ + -42, + -348, + 73, + 83 + ], + [ + -50, + -265, + 116, + 125 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "8-8": [ + [ + -43, + -348, + 74, + 83 + ], + [ + -50, + -265, + 116, + 125 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "9-9": [ + [ + -43, + -348, + 74, + 83 + ], + [ + -50, + -265, + 115, + 125 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "10-10": [ + [ + -43, + -349, + 74, + 83 + ], + [ + -50, + -266, + 115, + 126 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "11-11": [ + [ + -43, + -349, + 74, + 83 + ], + [ + -51, + -266, + 116, + 126 + ], + [ + -49, + -140, + 184, + 140 + ] + ], + "12-12": [ + [ + -43, + -349, + 74, + 83 + ], + [ + -51, + -266, + 116, + 126 + ], + [ + -49, + -140, + 184, + 140 + ] + ], + "13-13": [ + [ + -43, + -349, + 74, + 83 + ], + [ + -51, + -266, + 116, + 126 + ], + [ + -49, + -140, + 183, + 140 + ] + ], + "15-15": [ + [ + -42, + -349, + 73, + 83 + ], + [ + -50, + -266, + 116, + 126 + ], + [ + -49, + -140, + 184, + 140 + ] + ], + "16-16": [ + [ + -41, + -349, + 72, + 83 + ], + [ + -50, + -266, + 116, + 126 + ], + [ + -49, + -140, + 184, + 140 + ] + ], + "17-17": [ + [ + -40, + -349, + 71, + 83 + ], + [ + -50, + -266, + 116, + 126 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "18-18": [ + [ + -40, + -349, + 71, + 83 + ], + [ + -49, + -266, + 115, + 126 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "19-19": [ + [ + -40, + -349, + 71, + 83 + ], + [ + -49, + -266, + 115, + 126 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "20-20": [ + [ + -39, + -349, + 70, + 83 + ], + [ + -49, + -266, + 115, + 126 + ], + [ + -50, + -140, + 185, + 140 + ] + ], + "21-21": [ + [ + -39, + -349, + 70, + 83 + ], + [ + -48, + -266, + 114, + 126 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "22-22": [ + [ + -39, + -348, + 70, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "23-23": [ + [ + -39, + -348, + 70, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "24-24": [ + [ + -39, + -348, + 70, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "25-25": [ + [ + -39, + -348, + 70, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "26-26": [ + [ + -39, + -348, + 70, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "27-27": [ + [ + -39, + -348, + 70, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "28-28": [ + [ + -39, + -348, + 70, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ], + "29-29": [ + [ + -40, + -348, + 71, + 83 + ], + [ + -48, + -265, + 114, + 125 + ], + [ + -49, + -140, + 185, + 140 + ] + ] + } + }, + "hitboxes": {} +} \ No newline at end of file diff --git a/characters/trainer/moves/idle/frames/0000.png b/characters/trainer/moves/idle/frames/0000.png new file mode 100644 index 00000000..bfcc0e87 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0000.png differ diff --git a/characters/trainer/moves/idle/frames/0001.png b/characters/trainer/moves/idle/frames/0001.png new file mode 100644 index 00000000..f2d2ef5c Binary files /dev/null and b/characters/trainer/moves/idle/frames/0001.png differ diff --git a/characters/trainer/moves/idle/frames/0002.png b/characters/trainer/moves/idle/frames/0002.png new file mode 100644 index 00000000..cca374f1 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0002.png differ diff --git a/characters/trainer/moves/idle/frames/0003.png b/characters/trainer/moves/idle/frames/0003.png new file mode 100644 index 00000000..3a4fb7ba Binary files /dev/null and b/characters/trainer/moves/idle/frames/0003.png differ diff --git a/characters/trainer/moves/idle/frames/0004.png b/characters/trainer/moves/idle/frames/0004.png new file mode 100644 index 00000000..d5cd446b Binary files /dev/null and b/characters/trainer/moves/idle/frames/0004.png differ diff --git a/characters/trainer/moves/idle/frames/0005.png b/characters/trainer/moves/idle/frames/0005.png new file mode 100644 index 00000000..9b79f968 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0005.png differ diff --git a/characters/trainer/moves/idle/frames/0006.png b/characters/trainer/moves/idle/frames/0006.png new file mode 100644 index 00000000..e286a50e Binary files /dev/null and b/characters/trainer/moves/idle/frames/0006.png differ diff --git a/characters/trainer/moves/idle/frames/0007.png b/characters/trainer/moves/idle/frames/0007.png new file mode 100644 index 00000000..49eb9cde Binary files /dev/null and b/characters/trainer/moves/idle/frames/0007.png differ diff --git a/characters/trainer/moves/idle/frames/0008.png b/characters/trainer/moves/idle/frames/0008.png new file mode 100644 index 00000000..249a9eb4 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0008.png differ diff --git a/characters/trainer/moves/idle/frames/0009.png b/characters/trainer/moves/idle/frames/0009.png new file mode 100644 index 00000000..32222605 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0009.png differ diff --git a/characters/trainer/moves/idle/frames/0010.png b/characters/trainer/moves/idle/frames/0010.png new file mode 100644 index 00000000..1762c177 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0010.png differ diff --git a/characters/trainer/moves/idle/frames/0011.png b/characters/trainer/moves/idle/frames/0011.png new file mode 100644 index 00000000..4f649581 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0011.png differ diff --git a/characters/trainer/moves/idle/frames/0012.png b/characters/trainer/moves/idle/frames/0012.png new file mode 100644 index 00000000..0cb8f177 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0012.png differ diff --git a/characters/trainer/moves/idle/frames/0013.png b/characters/trainer/moves/idle/frames/0013.png new file mode 100644 index 00000000..1ac4f01e Binary files /dev/null and b/characters/trainer/moves/idle/frames/0013.png differ diff --git a/characters/trainer/moves/idle/frames/0014.png b/characters/trainer/moves/idle/frames/0014.png new file mode 100644 index 00000000..66d6a6c7 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0014.png differ diff --git a/characters/trainer/moves/idle/frames/0015.png b/characters/trainer/moves/idle/frames/0015.png new file mode 100644 index 00000000..6374091a Binary files /dev/null and b/characters/trainer/moves/idle/frames/0015.png differ diff --git a/characters/trainer/moves/idle/frames/0016.png b/characters/trainer/moves/idle/frames/0016.png new file mode 100644 index 00000000..37ca1eb9 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0016.png differ diff --git a/characters/trainer/moves/idle/frames/0017.png b/characters/trainer/moves/idle/frames/0017.png new file mode 100644 index 00000000..0f24f0ea Binary files /dev/null and b/characters/trainer/moves/idle/frames/0017.png differ diff --git a/characters/trainer/moves/idle/frames/0018.png b/characters/trainer/moves/idle/frames/0018.png new file mode 100644 index 00000000..8fa2f037 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0018.png differ diff --git a/characters/trainer/moves/idle/frames/0019.png b/characters/trainer/moves/idle/frames/0019.png new file mode 100644 index 00000000..338563b0 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0019.png differ diff --git a/characters/trainer/moves/idle/frames/0020.png b/characters/trainer/moves/idle/frames/0020.png new file mode 100644 index 00000000..ca5328e6 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0020.png differ diff --git a/characters/trainer/moves/idle/frames/0021.png b/characters/trainer/moves/idle/frames/0021.png new file mode 100644 index 00000000..97a36f52 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0021.png differ diff --git a/characters/trainer/moves/idle/frames/0022.png b/characters/trainer/moves/idle/frames/0022.png new file mode 100644 index 00000000..4fa1ccb8 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0022.png differ diff --git a/characters/trainer/moves/idle/frames/0023.png b/characters/trainer/moves/idle/frames/0023.png new file mode 100644 index 00000000..a8d718d7 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0023.png differ diff --git a/characters/trainer/moves/idle/frames/0024.png b/characters/trainer/moves/idle/frames/0024.png new file mode 100644 index 00000000..b78419b9 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0024.png differ diff --git a/characters/trainer/moves/idle/frames/0025.png b/characters/trainer/moves/idle/frames/0025.png new file mode 100644 index 00000000..6368978e Binary files /dev/null and b/characters/trainer/moves/idle/frames/0025.png differ diff --git a/characters/trainer/moves/idle/frames/0026.png b/characters/trainer/moves/idle/frames/0026.png new file mode 100644 index 00000000..549a6b38 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0026.png differ diff --git a/characters/trainer/moves/idle/frames/0027.png b/characters/trainer/moves/idle/frames/0027.png new file mode 100644 index 00000000..df5d5931 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0027.png differ diff --git a/characters/trainer/moves/idle/frames/0028.png b/characters/trainer/moves/idle/frames/0028.png new file mode 100644 index 00000000..e4d54c15 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0028.png differ diff --git a/characters/trainer/moves/idle/frames/0029.png b/characters/trainer/moves/idle/frames/0029.png new file mode 100644 index 00000000..a0c7a7c4 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0029.png differ diff --git a/characters/trainer/moves/idle/frames/0030.png b/characters/trainer/moves/idle/frames/0030.png new file mode 100644 index 00000000..9a1483f0 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0030.png differ diff --git a/characters/trainer/moves/idle/frames/0031.png b/characters/trainer/moves/idle/frames/0031.png new file mode 100644 index 00000000..b9b36c30 Binary files /dev/null and b/characters/trainer/moves/idle/frames/0031.png differ diff --git a/characters/trainer/moves/jab/data.json b/characters/trainer/moves/jab/data.json new file mode 100644 index 00000000..d5b08034 --- /dev/null +++ b/characters/trainer/moves/jab/data.json @@ -0,0 +1,648 @@ +{ + "name": "jab", + "total": 64, + "loop": false, + "startup": 18, + "active": [ + 20, + 26 + ], + "damage": 45, + "hitstun": 16, + "blockstun": 9, + "pushback": 9, + "hurtboxes": { + "default": [ + [ + -53, + -353, + 87, + 85 + ], + [ + -49, + -268, + 89, + 128 + ], + [ + -50, + -140, + 127, + 140 + ] + ], + "frames": { + "0-0": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "1-1": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "2-2": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "3-3": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "4-4": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "5-5": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "6-6": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "7-7": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "8-8": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -40, + -267, + 80, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "9-9": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -39, + -267, + 79, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "10-10": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -39, + -267, + 79, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "11-11": [ + [ + -35, + -352, + 68, + 85 + ], + [ + -43, + -267, + 84, + 128 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "12-12": [ + [ + -38, + -351, + 72, + 85 + ], + [ + -50, + -266, + 91, + 127 + ], + [ + -50, + -139, + 128, + 139 + ] + ], + "13-13": [ + [ + -42, + -352, + 75, + 85 + ], + [ + -53, + -267, + 94, + 128 + ], + [ + -50, + -139, + 127, + 139 + ] + ], + "14-14": [ + [ + -48, + -353, + 81, + 85 + ], + [ + -53, + -268, + 94, + 128 + ], + [ + -50, + -140, + 127, + 140 + ] + ], + "15-15": [ + [ + -50, + -354, + 83, + 85 + ], + [ + -30, + -269, + 70, + 129 + ], + [ + -50, + -140, + 127, + 140 + ] + ], + "16-16": [ + [ + -46, + -353, + 81, + 85 + ], + [ + -30, + -268, + 70, + 128 + ], + [ + -50, + -140, + 127, + 140 + ] + ], + "17-17": [ + [ + -43, + -353, + 78, + 85 + ], + [ + -30, + -268, + 70, + 128 + ], + [ + -50, + -140, + 128, + 140 + ] + ], + "18-18": [ + [ + -41, + -353, + 76, + 85 + ], + [ + -30, + -268, + 71, + 128 + ], + [ + -50, + -140, + 127, + 140 + ] + ], + "19-19": [ + [ + -40, + -353, + 75, + 85 + ], + [ + -30, + -268, + 71, + 128 + ], + [ + -51, + -140, + 128, + 140 + ] + ], + "20-20": [ + [ + -41, + -353, + 76, + 85 + ], + [ + -30, + -268, + 71, + 128 + ], + [ + -51, + -140, + 128, + 140 + ] + ], + "21-21": [ + [ + -41, + -353, + 77, + 85 + ], + [ + -30, + -268, + 71, + 128 + ], + [ + -51, + -140, + 128, + 140 + ] + ], + "22-22": [ + [ + -41, + -353, + 77, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 128, + 140 + ] + ], + "23-23": [ + [ + -41, + -353, + 77, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 128, + 140 + ] + ], + "24-24": [ + [ + -42, + -353, + 78, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 128, + 140 + ] + ], + "25-25": [ + [ + -42, + -353, + 78, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 127, + 140 + ] + ], + "26-26": [ + [ + -42, + -353, + 78, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 127, + 140 + ] + ], + "27-27": [ + [ + -43, + -353, + 79, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 127, + 140 + ] + ], + "28-28": [ + [ + -44, + -353, + 80, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 127, + 140 + ] + ], + "29-29": [ + [ + -44, + -353, + 80, + 85 + ], + [ + -29, + -268, + 70, + 128 + ], + [ + -51, + -140, + 127, + 140 + ] + ] + } + }, + "hitboxes": { + "20-26": [ + [ + 30, + -290, + 80, + 40 + ] + ] + } +} \ No newline at end of file diff --git a/characters/trainer/moves/jab/frames/0000.png b/characters/trainer/moves/jab/frames/0000.png new file mode 100644 index 00000000..2a989a00 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0000.png differ diff --git a/characters/trainer/moves/jab/frames/0001.png b/characters/trainer/moves/jab/frames/0001.png new file mode 100644 index 00000000..aba85ad3 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0001.png differ diff --git a/characters/trainer/moves/jab/frames/0002.png b/characters/trainer/moves/jab/frames/0002.png new file mode 100644 index 00000000..eea33057 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0002.png differ diff --git a/characters/trainer/moves/jab/frames/0003.png b/characters/trainer/moves/jab/frames/0003.png new file mode 100644 index 00000000..d320709f Binary files /dev/null and b/characters/trainer/moves/jab/frames/0003.png differ diff --git a/characters/trainer/moves/jab/frames/0004.png b/characters/trainer/moves/jab/frames/0004.png new file mode 100644 index 00000000..1eaed639 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0004.png differ diff --git a/characters/trainer/moves/jab/frames/0005.png b/characters/trainer/moves/jab/frames/0005.png new file mode 100644 index 00000000..21d59747 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0005.png differ diff --git a/characters/trainer/moves/jab/frames/0006.png b/characters/trainer/moves/jab/frames/0006.png new file mode 100644 index 00000000..d9579b79 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0006.png differ diff --git a/characters/trainer/moves/jab/frames/0007.png b/characters/trainer/moves/jab/frames/0007.png new file mode 100644 index 00000000..9d39017c Binary files /dev/null and b/characters/trainer/moves/jab/frames/0007.png differ diff --git a/characters/trainer/moves/jab/frames/0008.png b/characters/trainer/moves/jab/frames/0008.png new file mode 100644 index 00000000..e485b38d Binary files /dev/null and b/characters/trainer/moves/jab/frames/0008.png differ diff --git a/characters/trainer/moves/jab/frames/0009.png b/characters/trainer/moves/jab/frames/0009.png new file mode 100644 index 00000000..082140b0 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0009.png differ diff --git a/characters/trainer/moves/jab/frames/0010.png b/characters/trainer/moves/jab/frames/0010.png new file mode 100644 index 00000000..b8384ddd Binary files /dev/null and b/characters/trainer/moves/jab/frames/0010.png differ diff --git a/characters/trainer/moves/jab/frames/0011.png b/characters/trainer/moves/jab/frames/0011.png new file mode 100644 index 00000000..f771bbba Binary files /dev/null and b/characters/trainer/moves/jab/frames/0011.png differ diff --git a/characters/trainer/moves/jab/frames/0012.png b/characters/trainer/moves/jab/frames/0012.png new file mode 100644 index 00000000..3dff8eef Binary files /dev/null and b/characters/trainer/moves/jab/frames/0012.png differ diff --git a/characters/trainer/moves/jab/frames/0013.png b/characters/trainer/moves/jab/frames/0013.png new file mode 100644 index 00000000..08c3194c Binary files /dev/null and b/characters/trainer/moves/jab/frames/0013.png differ diff --git a/characters/trainer/moves/jab/frames/0014.png b/characters/trainer/moves/jab/frames/0014.png new file mode 100644 index 00000000..54e174fe Binary files /dev/null and b/characters/trainer/moves/jab/frames/0014.png differ diff --git a/characters/trainer/moves/jab/frames/0015.png b/characters/trainer/moves/jab/frames/0015.png new file mode 100644 index 00000000..81c5378c Binary files /dev/null and b/characters/trainer/moves/jab/frames/0015.png differ diff --git a/characters/trainer/moves/jab/frames/0016.png b/characters/trainer/moves/jab/frames/0016.png new file mode 100644 index 00000000..12317011 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0016.png differ diff --git a/characters/trainer/moves/jab/frames/0017.png b/characters/trainer/moves/jab/frames/0017.png new file mode 100644 index 00000000..5b9b18a0 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0017.png differ diff --git a/characters/trainer/moves/jab/frames/0018.png b/characters/trainer/moves/jab/frames/0018.png new file mode 100644 index 00000000..d7aa869f Binary files /dev/null and b/characters/trainer/moves/jab/frames/0018.png differ diff --git a/characters/trainer/moves/jab/frames/0019.png b/characters/trainer/moves/jab/frames/0019.png new file mode 100644 index 00000000..9258065c Binary files /dev/null and b/characters/trainer/moves/jab/frames/0019.png differ diff --git a/characters/trainer/moves/jab/frames/0020.png b/characters/trainer/moves/jab/frames/0020.png new file mode 100644 index 00000000..c54ad420 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0020.png differ diff --git a/characters/trainer/moves/jab/frames/0021.png b/characters/trainer/moves/jab/frames/0021.png new file mode 100644 index 00000000..f1464ffe Binary files /dev/null and b/characters/trainer/moves/jab/frames/0021.png differ diff --git a/characters/trainer/moves/jab/frames/0022.png b/characters/trainer/moves/jab/frames/0022.png new file mode 100644 index 00000000..0bca30af Binary files /dev/null and b/characters/trainer/moves/jab/frames/0022.png differ diff --git a/characters/trainer/moves/jab/frames/0023.png b/characters/trainer/moves/jab/frames/0023.png new file mode 100644 index 00000000..50eeec03 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0023.png differ diff --git a/characters/trainer/moves/jab/frames/0024.png b/characters/trainer/moves/jab/frames/0024.png new file mode 100644 index 00000000..b9ae3544 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0024.png differ diff --git a/characters/trainer/moves/jab/frames/0025.png b/characters/trainer/moves/jab/frames/0025.png new file mode 100644 index 00000000..dba14f74 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0025.png differ diff --git a/characters/trainer/moves/jab/frames/0026.png b/characters/trainer/moves/jab/frames/0026.png new file mode 100644 index 00000000..09068a11 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0026.png differ diff --git a/characters/trainer/moves/jab/frames/0027.png b/characters/trainer/moves/jab/frames/0027.png new file mode 100644 index 00000000..9d91dcbd Binary files /dev/null and b/characters/trainer/moves/jab/frames/0027.png differ diff --git a/characters/trainer/moves/jab/frames/0028.png b/characters/trainer/moves/jab/frames/0028.png new file mode 100644 index 00000000..3e6c9edc Binary files /dev/null and b/characters/trainer/moves/jab/frames/0028.png differ diff --git a/characters/trainer/moves/jab/frames/0029.png b/characters/trainer/moves/jab/frames/0029.png new file mode 100644 index 00000000..7b92751f Binary files /dev/null and b/characters/trainer/moves/jab/frames/0029.png differ diff --git a/characters/trainer/moves/jab/frames/0030.png b/characters/trainer/moves/jab/frames/0030.png new file mode 100644 index 00000000..309bbb14 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0030.png differ diff --git a/characters/trainer/moves/jab/frames/0031.png b/characters/trainer/moves/jab/frames/0031.png new file mode 100644 index 00000000..f6b0b061 Binary files /dev/null and b/characters/trainer/moves/jab/frames/0031.png differ diff --git a/engine/core/character_data.gd b/engine/core/character_data.gd index c6add59b..65c79d1c 100644 --- a/engine/core/character_data.gd +++ b/engine/core/character_data.gd @@ -10,6 +10,7 @@ var walk_speed := 3.0 var back_speed := 2.5 var jump_velocity := -13.5 var color := Color.WHITE +var sprite_scale := 1.0 # draw scale; also scales all box coords var normals := {} # "P" -> move name, "6P" -> forward+P, "K" -> ... var command_moves: Array = [] # [{motion:[2,3,6], button:"P", move:"rush_palm"}] var moves := {} # name -> MoveData @@ -30,6 +31,7 @@ static func load_dir(dir_path: String) -> CharacterData: c.back_speed = float(d.get("back_speed", 2.5)) c.jump_velocity = float(d.get("jump_velocity", -13.5)) c.color = Color(d.get("color", "#ffffff")) + c.sprite_scale = float(d.get("sprite_scale", 1.0)) c.normals = d.get("normals", {}) c.command_moves = d.get("command_moves", []) diff --git a/engine/core/fighter.gd b/engine/core/fighter.gd index a324dff1..1073ef0d 100644 --- a/engine/core/fighter.gd +++ b/engine/core/fighter.gd @@ -202,10 +202,12 @@ func _set_state(s: int) -> void: ## ---------------------------------------------------------------- boxes -## Local rect (right-facing) -> world rect, honouring facing. +## Local rect (right-facing) -> world rect, honouring facing and sprite scale. func to_world(r: Rect2) -> Rect2: - var x := pos_x + r.position.x if facing == 1 else pos_x - r.position.x - r.size.x - return Rect2(x, CFG.GROUND_Y + pos_y + r.position.y, r.size.x, r.size.y) + var k := data.sprite_scale + var rs := Rect2(r.position * k, r.size * k) + var x := pos_x + rs.position.x if facing == 1 else pos_x - rs.position.x - rs.size.x + return Rect2(x, CFG.GROUND_Y + pos_y + rs.position.y, rs.size.x, rs.size.y) func world_hurtboxes() -> Array: @@ -237,5 +239,7 @@ func _apply_render() -> void: return _sprite.texture = tex _sprite.flip_h = facing == -1 - var s: Vector2 = tex.get_size() + var k := data.sprite_scale + _sprite.scale = Vector2(k, k) + var s: Vector2 = tex.get_size() * k _sprite.position = Vector2(-s.x / 2.0, -s.y) diff --git a/engine/core/match_engine.gd b/engine/core/match_engine.gd index 9fa5c0a7..e189cbe0 100644 --- a/engine/core/match_engine.gd +++ b/engine/core/match_engine.gd @@ -51,8 +51,21 @@ func _load_fighters() -> void: if roster.size() < 1: push_error("No characters found under characters/") return - var d1 := CharacterData.load_dir(roster[0]) - var d2 := CharacterData.load_dir(roster[mini(1, roster.size() - 1)]) + # optional roster picks: godot --path . -- --p1=trainer --p2=alpha + var want := {"p1": "", "p2": ""} + for arg in OS.get_cmdline_user_args(): + for k in want: + if arg.begins_with("--%s=" % k): + want[k] = arg.trim_prefix("--%s=" % k) + var path1: String = roster[0] + var path2: String = roster[mini(1, roster.size() - 1)] + for r in roster: + if want.p1 != "" and r.get_file() == want.p1: + path1 = r + if want.p2 != "" and r.get_file() == want.p2: + path2 = r + var d1 := CharacterData.load_dir(path1) + var d2 := CharacterData.load_dir(path2) # fighters live in stage space; the stage node centres it on screen var stage := Node2D.new() stage.position = Vector2(640, 0) diff --git a/pipeline/README.md b/pipeline/README.md index 5da81967..24223c75 100644 --- a/pipeline/README.md +++ b/pipeline/README.md @@ -9,9 +9,14 @@ Steps 1–3 run as MODELBEAST jobs (queue on m3ultra `:8777` — see the fleet s 2. MESH Hunyuan3D-2.1 / TRELLIS → textured 3D mesh (GLB) from portrait 3. RIG+MOVES auto-rig → retarget the SHARED move library (~30 clips) onto the rig (character-specific specials are extra clips, added per character) -4. RENDER fixed orthographic side camera → 60fps PNG frames per move - (+ optional normal-map pass for lit 2.5D sprites later) +4. RENDER render_moves.py (Blender headless, tested on Blender 5.1): + handles Mixamo namespace remap, axis fix, height normalisation, + first-frame pivot centring, transparent ortho side camera → renders///####.png + /Applications/Blender.app/Contents/MacOS/Blender -b \ + --python pipeline/render_moves.py -- \ + --char --clips --out renders/ \ + --rotz 155 --step 2 5. HITBOX autohitbox.py — DWPose over rendered frames → hurtbox rects per move 6. PACK pack_character.py — assemble characters// per CHARACTER_SPEC.md ``` diff --git a/pipeline/render_moves.py b/pipeline/render_moves.py new file mode 100644 index 00000000..bfcef95c --- /dev/null +++ b/pipeline/render_moves.py @@ -0,0 +1,234 @@ +# Blender headless: render a rigged character + Mixamo anim clips to sprite frames. +# +# Usage: +# /Applications/Blender.app/Contents/MacOS/Blender -b --python pipeline/render_moves.py -- \ +# --char ~/Documents/foitin_assets/woman_athleisure_01.fbx \ +# --clips "clipdir_or_file1.fbx,file2.fbx" \ +# --out renders/hero [--size 512] [--rotz 90] [--samples 16] [--step 1] +# +# One output folder per clip: renders///####.png +# (that layout feeds straight into pipeline/pack_character.py). +# +# Frames render with transparent background, fixed orthographic side camera, +# ground plane at z=0 mapped to a consistent pixel row -> stable ground pivot +# across every move (the BKB .geo lesson: bake a consistent pivot). +import argparse +import math +import sys +from pathlib import Path + +import bpy + +GROUND_ROW_FRAC = 0.96 # ground line at 96% of image height (bottom margin) + + +def parse_args(): + argv = sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else [] + ap = argparse.ArgumentParser() + ap.add_argument("--char", required=True) + ap.add_argument("--clips", required=True, help="dir or comma-separated fbx list") + ap.add_argument("--out", required=True) + ap.add_argument("--size", type=int, default=512) + ap.add_argument("--rotz", type=float, default=90.0, + help="extra Z rotation (deg) so the character faces screen-right") + ap.add_argument("--height", type=float, default=1.75, + help="normalised character height in metres") + ap.add_argument("--cam-height", type=float, default=2.6, + help="world metres covered by the image height") + ap.add_argument("--samples", type=int, default=16) + ap.add_argument("--step", type=int, default=1, help="render every Nth frame") + ap.add_argument("--max-frames", type=int, default=0, help="cap source frames per clip (0 = all)") + return ap.parse_args(argv) + + +def import_character(path: str): + before = set(bpy.data.objects) + if path.lower().endswith((".glb", ".gltf")): + bpy.ops.import_scene.gltf(filepath=path) + else: + bpy.ops.import_scene.fbx(filepath=path) + new = [o for o in bpy.data.objects if o not in before] + arms = [o for o in new if o.type == "ARMATURE"] + if not arms: + raise RuntimeError("no armature in " + path) + return arms[0], new + + +def world_bbox(objs): + import mathutils + pts = [] + for o in objs: + if o.type == "MESH": + for c in o.bound_box: + pts.append(o.matrix_world @ mathutils.Vector(c)) + lo = [min(p[i] for p in pts) for i in range(3)] + hi = [max(p[i] for p in pts) for i in range(3)] + return lo, hi + + +## Mixamo FBX often lands at centimetre scale (100x). Normalise the rig to +## target height with feet on the ground at the origin. +def normalize_character(arm, objs, target_h: float): + bpy.context.view_layer.update() + lo, hi = world_bbox(objs) + h = hi[2] - lo[2] + if h <= 0: + return + s = target_h / h + arm.scale = (arm.scale[0] * s, arm.scale[1] * s, arm.scale[2] * s) + bpy.context.view_layer.update() + lo, hi = world_bbox(objs) + arm.location.x -= (lo[0] + hi[0]) / 2 + arm.location.y -= (lo[1] + hi[1]) / 2 + arm.location.z -= lo[2] + bpy.context.view_layer.update() + + +## Blender 4.4+ uses layered/slotted actions; older versions expose .fcurves. +def action_fcurves(act): + if hasattr(act, "fcurves"): + return list(act.fcurves) + out = [] + for layer in act.layers: + for strip in layer.strips: + for cb in strip.channelbags: + out.extend(cb.fcurves) + return out + + +def assign_action(arm, act): + if arm.animation_data is None: + arm.animation_data_create() + arm.animation_data.action = act + if hasattr(act, "slots") and len(act.slots): + arm.animation_data.action_slot = act.slots[0] + + +def import_clip_action(path: str, target_arm): + """Import an anim-only FBX, steal its action, delete its skeleton. + Mixamo namespaces bones per download (mixamorig:, mixamorig6:, ...); + remap the action's fcurve paths onto the target rig's namespace.""" + before_obj = set(bpy.data.objects) + before_act = set(bpy.data.actions) + bpy.ops.import_scene.fbx(filepath=path, use_anim=True) + new_obj = [o for o in bpy.data.objects if o not in before_obj] + new_act = [a for a in bpy.data.actions if a not in before_act] + for o in new_obj: + bpy.data.objects.remove(o, do_unlink=True) + if not new_act: + raise RuntimeError("no action in " + path) + act = new_act[0] + + target_ns = "" + for b in target_arm.data.bones: + if ":" in b.name: + target_ns = b.name.split(":")[0] + ":" + break + for fc in action_fcurves(act): + if '"' not in fc.data_path: + continue + bone = fc.data_path.split('"')[1] + base = bone.split(":")[-1] + new_bone = target_ns + base + if new_bone != bone and target_arm.data.bones.get(new_bone): + fc.data_path = fc.data_path.replace('"%s"' % bone, '"%s"' % new_bone) + return act + + +def setup_scene(size: int, samples: int): + sc = bpy.context.scene + try: + sc.render.engine = "BLENDER_EEVEE_NEXT" # Blender 4.2+ + except TypeError: + sc.render.engine = "BLENDER_EEVEE" + try: + sc.eevee.taa_render_samples = samples + except AttributeError: + pass + sc.render.film_transparent = True + sc.render.resolution_x = size + sc.render.resolution_y = size + sc.render.image_settings.file_format = "PNG" + sc.render.image_settings.color_mode = "RGBA" + + # key + fill + rim, angled like a simple studio setup + for name, rot, energy in ( + ("key", (math.radians(60), 0, math.radians(35)), 3.0), + ("fill", (math.radians(70), 0, math.radians(-50)), 1.2), + ("rim", (math.radians(-60), 0, math.radians(180)), 1.5), + ): + light_data = bpy.data.lights.new(name, type="SUN") + light_data.energy = energy + light = bpy.data.objects.new(name, light_data) + light.rotation_euler = rot + sc.collection.objects.link(light) + + +def setup_camera(cam_height: float, size: int): + cam_data = bpy.data.cameras.new("cam") + cam_data.type = "ORTHO" + cam_data.ortho_scale = cam_height # vertical extent (square image) + cam = bpy.data.objects.new("cam", cam_data) + bpy.context.scene.collection.objects.link(cam) + bpy.context.scene.camera = cam + # side view: camera on +X axis looking toward -X, up = +Z + cam.location = (8.0, 0.0, 0.0) + cam.rotation_euler = (math.radians(90), 0, math.radians(90)) + # place ground (z=0) at a fixed pixel row: centre the camera so that + # z spans [c - h/2, c + h/2]; ground at row frac r -> c = h*(r - 0.5) + cam.location.z = cam_height * (GROUND_ROW_FRAC - 0.5) + return cam + + +def main(): + args = parse_args() + bpy.ops.wm.read_factory_settings(use_empty=True) + setup_scene(args.size, args.samples) + setup_camera(args.cam_height, args.size) + + arm, objs = import_character(str(Path(args.char).expanduser())) + # rotate about WORLD Z (local axes are already tilted by the FBX importer) + import mathutils + arm.matrix_world = mathutils.Matrix.Rotation(math.radians(args.rotz), 4, "Z") @ arm.matrix_world + normalize_character(arm, objs, args.height) + + clips_arg = str(Path(args.clips).expanduser()) + p = Path(clips_arg) + if p.is_dir(): + clip_paths = sorted(p.glob("*.fbx")) + else: + clip_paths = [Path(c).expanduser() for c in args.clips.split(",")] + + out_root = Path(args.out).expanduser() + sc = bpy.context.scene + for clip in clip_paths: + action = import_clip_action(str(clip), arm) + assign_action(arm, action) + f0, f1 = (int(action.frame_range[0]), int(action.frame_range[1])) + if args.max_frames > 0: + f1 = min(f1, f0 + args.max_frames - 1) + # centre the first frame's hips over the origin so every clip shares + # the same ground pivot (static pose offsets vary per Mixamo clip) + sc.frame_set(f0) + bpy.context.view_layer.update() + hips = next((pb for pb in arm.pose.bones if pb.name.endswith("Hips")), None) + if hips is not None: + hw = arm.matrix_world @ hips.head + arm.location.x -= hw.x + arm.location.y -= hw.y + bpy.context.view_layer.update() + move = clip.stem.lower() + move_dir = out_root / move + move_dir.mkdir(parents=True, exist_ok=True) + n = 0 + for f in range(f0, f1 + 1, args.step): + sc.frame_set(f) + sc.render.filepath = str(move_dir / f"{n:04d}.png") + bpy.ops.render.render(write_still=True) + n += 1 + print(f"RENDERED {move}: {n} frames ({f0}-{f1})") + + print("DONE") + + +main()