Grass Cutters Together: the project as of moon-sweepers f3666f0
A clean start for the shared repository: the Unity project (Assets, Packages, ProjectSettings), ArtSource, Docs and Tools as they stood at f3666f0 in the old local repository, with its generated prefabs and scene brought up to date. Images, audio, models and binaries go through Git LFS (.gitattributes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
BIN
Tools/Nunito-Variable.ttf
(Stored with Git LFS)
Normal file
BIN
Tools/Nunito-Variable.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
115
Tools/Steam/achievements.py
Normal file
115
Tools/Steam/achievements.py
Normal file
@ -0,0 +1,115 @@
|
||||
"""
|
||||
The 33 awards of Assets/Scripts/Core/Achievements.cs as Steam wants them: a table and two 256 px icons each, earned and locked.
|
||||
py -I achievements.py writes Docs/Steam/achievements
|
||||
"""
|
||||
import csv
|
||||
import math
|
||||
import os
|
||||
|
||||
from PIL import Image, ImageDraw, ImageEnhance, ImageFont
|
||||
|
||||
PROJECT = r"D:\PROJECTS\LOCAL\GrassCutter"
|
||||
OUT = os.path.join(PROJECT, r"Docs\Steam\achievements")
|
||||
FONT = os.path.join(PROJECT, r"Assets\Fonts\LilitaOne-Regular.ttf")
|
||||
S = 512
|
||||
GOLD, GREEN, BLUE, RUST, CLAY, DUSK, RED = (222, 164, 36), (70, 150, 52), (46, 118, 178), (168, 84, 44), (150, 112, 70), (92, 74, 150), (178, 48, 44)
|
||||
|
||||
# id, name, description, plate, word, big, top tier
|
||||
A = []
|
||||
|
||||
|
||||
def add(id, name, desc, colour, word, big, top=False):
|
||||
A.append((id, name, desc, colour, word, big, top))
|
||||
|
||||
|
||||
add("SHIP_1", "First Delivery", "Ship 1 kg of grass", GREEN, "SHIPPED", "1 KG")
|
||||
add("SHIP_100", "100 kg for Earth", "Ship 100 kg of grass", GREEN, "SHIPPED", "100 KG")
|
||||
add("SHIP_1000", "1,000 kg for Earth", "Ship 1,000 kg of grass", GREEN, "SHIPPED", "1 T")
|
||||
add("SHIP_10000", "10,000 kg for Earth", "Ship 10,000 kg of grass", GREEN, "SHIPPED", "10 T")
|
||||
add("SHIP_100000", "100,000 kg for Earth", "Ship 100,000 kg of grass", GREEN, "SHIPPED", "100 T", True)
|
||||
add("CASH_1000", "$1,000 in the Bank", "Have $1,000 in the crew wallet", GOLD, "BANK", "$1K")
|
||||
add("CASH_10000", "$10,000 in the Bank", "Have $10,000 in the crew wallet", GOLD, "BANK", "$10K")
|
||||
add("CASH_100000", "$100K in the Bank", "Have $100K in the crew wallet", GOLD, "BANK", "$100K")
|
||||
add("CASH_1000000", "$1M in the Bank", "Have $1M in the crew wallet", GOLD, "BANK", "$1M", True)
|
||||
add("SECTOR_1", "Clean Sweep", "Mow 1 sector clean", BLUE, "SECTORS", "1")
|
||||
add("SECTOR_10", "10 Sectors", "Mow 10 sectors clean", BLUE, "SECTORS", "10")
|
||||
add("SECTOR_100", "100 Sectors", "Mow 100 sectors clean", BLUE, "SECTORS", "100")
|
||||
add("SECTOR_1000", "1,000 Sectors", "Mow 1,000 sectors clean", BLUE, "SECTORS", "1K")
|
||||
add("SECTOR_10000", "10,000 Sectors", "Mow 10,000 sectors clean", BLUE, "SECTORS", "10K", True)
|
||||
add("PLANET_1", "0.01% of Herbaria-7", "Mow 0.01% of the planet", RUST, "PLANET", "0.01%")
|
||||
add("PLANET_10", "0.1% of Herbaria-7", "Mow 0.1% of the planet", RUST, "PLANET", "0.1%")
|
||||
add("PLANET_100", "1% of Herbaria-7", "Mow 1% of the planet", RUST, "PLANET", "1%")
|
||||
add("PLANET_1000", "10% of Herbaria-7", "Mow 10% of the planet", RUST, "PLANET", "10%")
|
||||
add("PLANET_5000", "50% of Herbaria-7", "Mow 50% of the planet", RUST, "PLANET", "50%")
|
||||
add("PLANET_10000", "Herbaria Mown", "Mow 100% of the planet", RUST, "PLANET", "100%", True)
|
||||
add("STAKE_1", "Untangled", "Sort out a survey stake", CLAY, "STAKES", "1")
|
||||
add("STAKE_50", "Fifty Stakes", "Sort out 50 survey stakes", CLAY, "STAKES", "50")
|
||||
add("STAKE_ALL", "Every Last Stake", "Sort out all 195 survey stakes", CLAY, "STAKES", "195", True)
|
||||
add("POINT_1", "Surveyor", "Read a survey point", CLAY, "SURVEY", "1")
|
||||
add("POINT_ALL", "The Whole Map", "Read all 26 survey points", CLAY, "SURVEY", "26", True)
|
||||
add("STATION_1", "Not Alone Out Here", "Find a far station", DUSK, "STATIONS", "1")
|
||||
add("STATION_5", "Well Travelled", "Find 5 far stations", DUSK, "STATIONS", "5")
|
||||
add("STATION_ALL", "All Twelve", "Find every station", DUSK, "STATIONS", "12", True)
|
||||
add("TOOL_SCYTHE", "A Proper Scythe", "Own the Scythe", GREEN, "TOOLS", "SCYTHE")
|
||||
add("TOOL_ALL", "Full Tool Belt", "Own every blade on the wall", GREEN, "TOOLS", "ALL", True)
|
||||
add("ROBOT_1", "Let the Robot Do It", "Build a robot dock", BLUE, "ROBOTS", "1")
|
||||
add("ROBOT_10", "Robot Crew", "Have 10 robots at work", BLUE, "ROBOTS", "10", True)
|
||||
add("REAPER", "Fear the Reaper", "Set a Reaper loose", RED, "ROBOTS", "REAPER", True)
|
||||
|
||||
|
||||
def hexagon(cx, cy, r):
|
||||
return [(cx + r * math.cos(math.radians(60 * i + 30)), cy + r * math.sin(math.radians(60 * i + 30))) for i in range(6)]
|
||||
|
||||
|
||||
def text(d, cx, cy, s, size, fill=(255, 255, 255), edge=(22, 58, 24)):
|
||||
while True:
|
||||
font = ImageFont.truetype(FONT, size)
|
||||
stroke = max(4, size // 10)
|
||||
box = d.textbbox((0, 0), s, font=font, stroke_width=stroke)
|
||||
if box[2] - box[0] <= S * 0.6 or size < 40:
|
||||
break
|
||||
size -= 6
|
||||
d.text((cx - (box[0] + box[2]) / 2, cy - (box[1] + box[3]) / 2), s, font=font, fill=fill, stroke_width=stroke, stroke_fill=edge)
|
||||
|
||||
|
||||
def tuft(d, cx, y, w, h, colour):
|
||||
n = 7
|
||||
for i in range(n):
|
||||
x = cx - w / 2 + w * (i + 0.5) / n
|
||||
lean = (i - n / 2) * 7
|
||||
t = h * (0.7 + 0.3 * ((i * 5) % 3) / 2)
|
||||
d.polygon([(x - w / n * 0.8, y), (x + lean, y - t), (x + w / n * 0.8, y)], fill=colour, outline=(22, 58, 24))
|
||||
|
||||
|
||||
def icon(colour, word, big, top):
|
||||
im = Image.new("RGB", (S, S), (24, 38, 28))
|
||||
d = ImageDraw.Draw(im)
|
||||
for y in range(S):
|
||||
k = y / S
|
||||
d.line([(0, y), (S, y)], fill=(int(30 - k * 12), int(62 - k * 28), int(38 - k * 16)))
|
||||
d.polygon(hexagon(S / 2, S / 2 + 12, 226), fill=(22, 58, 24))
|
||||
d.polygon(hexagon(S / 2, S / 2 + 12, 212), fill=(255, 255, 255))
|
||||
d.polygon(hexagon(S / 2, S / 2 + 12, 196), fill=colour)
|
||||
dark = tuple(int(c * 0.82) for c in colour)
|
||||
d.polygon(hexagon(S / 2, S / 2 + 12, 150), fill=dark)
|
||||
tuft(d, S / 2, 104, 190, 70, (110, 214, 60) if not top else (255, 214, 72))
|
||||
text(d, S / 2, 160, word, 54)
|
||||
text(d, S / 2, 292, big, 124)
|
||||
return im.resize((256, 256), Image.LANCZOS)
|
||||
|
||||
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
with open(os.path.join(OUT, "achievements.csv"), "w", newline="", encoding="utf-8") as f:
|
||||
w = csv.writer(f)
|
||||
w.writerow(["api_name", "display_name", "description"])
|
||||
for id, name, desc, colour, word, big, top in A:
|
||||
w.writerow([id, name, desc])
|
||||
on = icon(colour, word, big, top)
|
||||
on.save(os.path.join(OUT, id + ".png"), optimize=True)
|
||||
off = ImageEnhance.Brightness(ImageEnhance.Color(on).enhance(0.0)).enhance(0.55)
|
||||
off.save(os.path.join(OUT, id + "_locked.png"), optimize=True)
|
||||
print(len(A), "awards")
|
||||
sheet = Image.new("RGB", (11 * 130, 3 * 130), (27, 40, 56))
|
||||
for i, a in enumerate(A):
|
||||
sheet.paste(Image.open(os.path.join(OUT, a[0] + ".png")).resize((126, 126)), ((i % 11) * 130 + 2, (i // 11) * 130 + 2))
|
||||
sheet.save(os.path.join(OUT, "_sheet.jpg"), quality=88)
|
||||
176
Tools/Steam/achievements_loc.py
Normal file
176
Tools/Steam/achievements_loc.py
Normal file
@ -0,0 +1,176 @@
|
||||
"""
|
||||
The 33 awards' names and descriptions in every language the store page speaks, for the Steamworks achievement editor.
|
||||
py -I achievements_loc.py writes Docs/Steam/achievements/achievements_loc.json
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
|
||||
OUT = r"D:\PROJECTS\LOCAL\GrassCutter\Docs\Steam\achievements\achievements_loc.json"
|
||||
|
||||
# how each language writes 1000 and 0.01
|
||||
NUM = dict(english=(",", "."), russian=("\u00a0", ","), french=("\u00a0", ","), italian=(".", ","), german=(".", ","), spanish=(".", ","),
|
||||
schinese=(",", "."), koreana=(",", "."), polish=("\u00a0", ","), brazilian=(".", ","), turkish=(".", ","), japanese=(",", "."))
|
||||
|
||||
L = {
|
||||
"english": dict(
|
||||
first="First Delivery", kg="{n} kg for Earth", kg_d="Ship {n} kg of grass", bank="{v} in the Bank", bank_d="Have {v} in the crew wallet",
|
||||
sweep="Clean Sweep", sweep_d="Mow 1 sector clean", sec="{n} Sectors", sec_d="Mow {n} sectors clean",
|
||||
pl="{p}% of Herbaria-7", pl_d="Mow {p}% of the planet", mown="Herbaria Mown",
|
||||
st1="Untangled", st1_d="Sort out a survey stake", st50="Fifty Stakes", st50_d="Sort out 50 survey stakes", stall="Every Last Stake", stall_d="Sort out all 195 survey stakes",
|
||||
pt1="Surveyor", pt1_d="Read a survey point", ptall="The Whole Map", ptall_d="Read all 26 survey points",
|
||||
sn1="Not Alone Out Here", sn1_d="Find a far station", sn5="Well Travelled", sn5_d="Find 5 far stations", snall="All Twelve", snall_d="Find every station",
|
||||
scy="A Proper Scythe", scy_d="Own the Scythe", tools="Full Tool Belt", tools_d="Own every blade on the wall",
|
||||
rb1="Let the Robot Do It", rb1_d="Build a robot dock", rb10="Robot Crew", rb10_d="Have 10 robots at work", reap="Fear the Reaper", reap_d="Set a Reaper loose"),
|
||||
"russian": dict(
|
||||
first="Первая поставка", kg="{n} кг для Земли", kg_d="Отправьте {n} кг травы", bank="{v} в банке", bank_d="Накопите {v} в общем кошельке",
|
||||
sweep="Под ноль", sweep_d="Выкосите начисто один сектор", sec="{n} секторов", sec_d="Выкосите начисто {n} секторов",
|
||||
pl="{p}% Herbaria-7", pl_d="Выкосите {p}% планеты", mown="Herbaria выкошена",
|
||||
st1="Распутано", st1_d="Распутайте вешку", st50="Полсотни вешек", st50_d="Распутайте 50 вешек", stall="Все до единой", stall_d="Распутайте все 195 вешек",
|
||||
pt1="Геодезист", pt1_d="Снимите показания с точки исследования", ptall="Вся карта", ptall_d="Снимите показания со всех 26 точек",
|
||||
sn1="Мы здесь не одни", sn1_d="Найдите дальнюю станцию", sn5="Бывалый путник", sn5_d="Найдите 5 дальних станций", snall="Все двенадцать", snall_d="Найдите все станции",
|
||||
scy="Настоящая коса", scy_d="Купите косу", tools="Полный пояс", tools_d="Купите все лезвия со стены",
|
||||
rb1="Пусть робот косит", rb1_d="Постройте док робота", rb10="Бригада роботов", rb10_d="Запустите в работу 10 роботов", reap="Бойтесь Жнеца", reap_d="Выпустите Жнеца"),
|
||||
"french": dict(
|
||||
first="Première livraison", kg="{n} kg pour la Terre", kg_d="Livrez {n} kg d'herbe", bank="{v} à la banque", bank_d="Ayez {v} dans la caisse de l'équipe",
|
||||
sweep="Table rase", sweep_d="Tondez entièrement 1 secteur", sec="{n} secteurs", sec_d="Tondez entièrement {n} secteurs",
|
||||
pl="{p} % d'Herbaria-7", pl_d="Tondez {p} % de la planète", mown="Herbaria tondue",
|
||||
st1="Démêlé", st1_d="Démêlez un piquet de relevé", st50="Cinquante piquets", st50_d="Démêlez 50 piquets de relevé", stall="Jusqu'au dernier piquet", stall_d="Démêlez les 195 piquets de relevé",
|
||||
pt1="Géomètre", pt1_d="Relevez un point de relevé", ptall="La carte complète", ptall_d="Relevez les 26 points de relevé",
|
||||
sn1="Pas seuls ici", sn1_d="Trouvez une station lointaine", sn5="Grand voyageur", sn5_d="Trouvez 5 stations lointaines", snall="Les douze", snall_d="Trouvez toutes les stations",
|
||||
scy="Une vraie faux", scy_d="Possédez la Faux", tools="Ceinture complète", tools_d="Possédez toutes les lames du mur",
|
||||
rb1="Laissez faire le robot", rb1_d="Construisez un dock de robot", rb10="Équipe de robots", rb10_d="Ayez 10 robots au travail", reap="Craignez la Faucheuse", reap_d="Lâchez une Faucheuse"),
|
||||
"italian": dict(
|
||||
first="Prima consegna", kg="{n} kg per la Terra", kg_d="Consegna {n} kg d'erba", bank="{v} in banca", bank_d="Abbi {v} nella cassa della squadra",
|
||||
sweep="Tabula rasa", sweep_d="Taglia completamente 1 settore", sec="{n} settori", sec_d="Taglia completamente {n} settori",
|
||||
pl="{p}% di Herbaria-7", pl_d="Taglia il {p}% del pianeta", mown="Herbaria tagliata",
|
||||
st1="Districato", st1_d="Sistema un picchetto di rilevamento", st50="Cinquanta picchetti", st50_d="Sistema 50 picchetti di rilevamento", stall="Fino all'ultimo picchetto", stall_d="Sistema tutti i 195 picchetti di rilevamento",
|
||||
pt1="Topografo", pt1_d="Leggi un punto di rilevamento", ptall="La mappa completa", ptall_d="Leggi tutti i 26 punti di rilevamento",
|
||||
sn1="Non siamo soli", sn1_d="Trova una stazione lontana", sn5="Grande viaggiatore", sn5_d="Trova 5 stazioni lontane", snall="Tutte e dodici", snall_d="Trova tutte le stazioni",
|
||||
scy="Una vera falce", scy_d="Possiedi la Falce", tools="Cintura completa", tools_d="Possiedi tutte le lame della parete",
|
||||
rb1="Lascia fare al robot", rb1_d="Costruisci un dock per robot", rb10="Squadra di robot", rb10_d="Fai lavorare 10 robot", reap="Temete il Mietitore", reap_d="Libera un Mietitore"),
|
||||
"german": dict(
|
||||
first="Erste Lieferung", kg="{n} kg für die Erde", kg_d="Liefere {n} kg Gras", bank="{v} auf der Bank", bank_d="Habe {v} in der Mannschaftskasse",
|
||||
sweep="Kahlschlag", sweep_d="Mähe 1 Sektor komplett", sec="{n} Sektoren", sec_d="Mähe {n} Sektoren komplett",
|
||||
pl="{p} % von Herbaria-7", pl_d="Mähe {p} % des Planeten", mown="Herbaria gemäht",
|
||||
st1="Entwirrt", st1_d="Bringe einen Vermessungspflock in Ordnung", st50="Fünfzig Pflöcke", st50_d="Bringe 50 Vermessungspflöcke in Ordnung", stall="Bis zum letzten Pflock", stall_d="Bringe alle 195 Vermessungspflöcke in Ordnung",
|
||||
pt1="Vermesser", pt1_d="Lies einen Vermessungspunkt ab", ptall="Die ganze Karte", ptall_d="Lies alle 26 Vermessungspunkte ab",
|
||||
sn1="Nicht allein hier draußen", sn1_d="Finde eine ferne Station", sn5="Weit gereist", sn5_d="Finde 5 ferne Stationen", snall="Alle zwölf", snall_d="Finde alle Stationen",
|
||||
scy="Eine richtige Sense", scy_d="Besitze die Sense", tools="Voller Werkzeuggürtel", tools_d="Besitze jede Klinge an der Wand",
|
||||
rb1="Lass den Roboter machen", rb1_d="Baue ein Roboterdock", rb10="Roboterteam", rb10_d="Lass 10 Roboter arbeiten", reap="Fürchtet den Schnitter", reap_d="Lass einen Schnitter los"),
|
||||
"spanish": dict(
|
||||
first="Primera entrega", kg="{n} kg para la Tierra", kg_d="Entrega {n} kg de hierba", bank="{v} en el banco", bank_d="Ten {v} en la caja del equipo",
|
||||
sweep="Borrón y cuenta nueva", sweep_d="Siega por completo 1 sector", sec="{n} sectores", sec_d="Siega por completo {n} sectores",
|
||||
pl="{p} % de Herbaria-7", pl_d="Siega el {p} % del planeta", mown="Herbaria segada",
|
||||
st1="Desenredado", st1_d="Arregla una estaca topográfica", st50="Cincuenta estacas", st50_d="Arregla 50 estacas topográficas", stall="Hasta la última estaca", stall_d="Arregla las 195 estacas topográficas",
|
||||
pt1="Topógrafo", pt1_d="Lee un punto topográfico", ptall="El mapa completo", ptall_d="Lee los 26 puntos topográficos",
|
||||
sn1="No estamos solos", sn1_d="Encuentra una estación lejana", sn5="Trotamundos", sn5_d="Encuentra 5 estaciones lejanas", snall="Las doce", snall_d="Encuentra todas las estaciones",
|
||||
scy="Una guadaña de verdad", scy_d="Consigue la Guadaña", tools="Cinturón completo", tools_d="Consigue todas las cuchillas de la pared",
|
||||
rb1="Que lo haga el robot", rb1_d="Construye un muelle de robot", rb10="Equipo de robots", rb10_d="Ten 10 robots trabajando", reap="Teme a la Parca", reap_d="Suelta una Parca"),
|
||||
"schinese": dict(
|
||||
first="首次交付", kg="为地球送去 {n} 公斤", kg_d="交付 {n} 公斤草", bank="银行存款 {v}", bank_d="团队钱包中拥有 {v}",
|
||||
sweep="一扫而光", sweep_d="将 1 个区块完全割净", sec="{n} 个区块", sec_d="将 {n} 个区块完全割净",
|
||||
pl="Herbaria-7 的 {p}%", pl_d="割完星球的 {p}%", mown="Herbaria 割完了",
|
||||
st1="理顺了", st1_d="整理一根测量桩", st50="五十根测量桩", st50_d="整理 50 根测量桩", stall="一根不剩", stall_d="整理全部 195 根测量桩",
|
||||
pt1="测绘员", pt1_d="读取一个测量点", ptall="完整地图", ptall_d="读取全部 26 个测量点",
|
||||
sn1="这里并不孤单", sn1_d="发现一座远方站点", sn5="见多识广", sn5_d="发现 5 座远方站点", snall="十二座全齐", snall_d="发现所有站点",
|
||||
scy="像样的长柄镰", scy_d="拥有长柄镰", tools="工具带满了", tools_d="拥有墙上的所有刀具",
|
||||
rb1="交给机器人吧", rb1_d="建造一座机器人基座", rb10="机器人队伍", rb10_d="让 10 个机器人同时工作", reap="敬畏收割者", reap_d="放出一台收割者"),
|
||||
"koreana": dict(
|
||||
first="첫 납품", kg="지구를 위한 {n}kg", kg_d="풀 {n}kg 납품하기", bank="은행 잔고 {v}", bank_d="팀 지갑에 {v} 모으기",
|
||||
sweep="말끔하게", sweep_d="구역 1개를 완전히 베기", sec="구역 {n}개", sec_d="구역 {n}개를 완전히 베기",
|
||||
pl="Herbaria-7의 {p}%", pl_d="행성의 {p}% 베기", mown="Herbaria 완전 정복",
|
||||
st1="풀었다", st1_d="측량 말뚝 하나 정리하기", st50="말뚝 50개", st50_d="측량 말뚝 50개 정리하기", stall="마지막 말뚝까지", stall_d="측량 말뚝 195개 모두 정리하기",
|
||||
pt1="측량사", pt1_d="측량 지점 하나 판독하기", ptall="완성된 지도", ptall_d="측량 지점 26개 모두 판독하기",
|
||||
sn1="여기 우리만 있는 게 아니야", sn1_d="먼 기지 하나 발견하기", sn5="여행 좀 해 봤지", sn5_d="먼 기지 5곳 발견하기", snall="열두 곳 전부", snall_d="모든 기지 발견하기",
|
||||
scy="제대로 된 큰 낫", scy_d="큰 낫 보유하기", tools="꽉 찬 공구 벨트", tools_d="벽에 걸린 모든 날 보유하기",
|
||||
rb1="로봇에게 맡겨", rb1_d="로봇 도크 건설하기", rb10="로봇 일꾼단", rb10_d="로봇 10대 가동하기", reap="사신을 두려워하라", reap_d="사신 풀어놓기"),
|
||||
"polish": dict(
|
||||
first="Pierwsza dostawa", kg="{n} kg dla Ziemi", kg_d="Dostarcz {n} kg trawy", bank="{v} w banku", bank_d="Miej {v} we wspólnym portfelu",
|
||||
sweep="Do zera", sweep_d="Wykoś do czysta 1 sektor", sec="{n} sektorów", sec_d="Wykoś do czysta {n} sektorów",
|
||||
pl="{p}% Herbarii-7", pl_d="Wykoś {p}% planety", mown="Herbaria wykoszona",
|
||||
st1="Rozplątane", st1_d="Uporządkuj palik pomiarowy", st50="Pięćdziesiąt palików", st50_d="Uporządkuj 50 palików pomiarowych", stall="Co do jednego", stall_d="Uporządkuj wszystkie 195 palików pomiarowych",
|
||||
pt1="Geodeta", pt1_d="Odczytaj punkt pomiarowy", ptall="Cała mapa", ptall_d="Odczytaj wszystkie 26 punktów pomiarowych",
|
||||
sn1="Nie jesteśmy tu sami", sn1_d="Znajdź odległą stację", sn5="Obieżyświat", sn5_d="Znajdź 5 odległych stacji", snall="Wszystkie dwanaście", snall_d="Znajdź wszystkie stacje",
|
||||
scy="Porządna kosa", scy_d="Zdobądź Kosę", tools="Pełny pas", tools_d="Zdobądź każde ostrze ze ściany",
|
||||
rb1="Niech robot to zrobi", rb1_d="Zbuduj dok robota", rb10="Robotyczna ekipa", rb10_d="Miej 10 robotów przy pracy", reap="Strzeżcie się Żniwiarza", reap_d="Wypuść Żniwiarza"),
|
||||
"brazilian": dict(
|
||||
first="Primeira entrega", kg="{n} kg para a Terra", kg_d="Entregue {n} kg de grama", bank="{v} no banco", bank_d="Tenha {v} no caixa da equipe",
|
||||
sweep="Terra arrasada", sweep_d="Corte 1 setor por completo", sec="{n} setores", sec_d="Corte {n} setores por completo",
|
||||
pl="{p}% de Herbaria-7", pl_d="Corte {p}% do planeta", mown="Herbaria cortada",
|
||||
st1="Desenrolado", st1_d="Arrume uma estaca de medição", st50="Cinquenta estacas", st50_d="Arrume 50 estacas de medição", stall="Até a última estaca", stall_d="Arrume todas as 195 estacas de medição",
|
||||
pt1="Agrimensor", pt1_d="Leia um ponto de medição", ptall="O mapa inteiro", ptall_d="Leia todos os 26 pontos de medição",
|
||||
sn1="Não estamos sozinhos", sn1_d="Encontre uma estação distante", sn5="Viajado", sn5_d="Encontre 5 estações distantes", snall="Todas as doze", snall_d="Encontre todas as estações",
|
||||
scy="Uma gadanha de verdade", scy_d="Tenha a Gadanha", tools="Cinto completo", tools_d="Tenha todas as lâminas da parede",
|
||||
rb1="Deixa o robô fazer", rb1_d="Construa uma doca de robô", rb10="Equipe de robôs", rb10_d="Tenha 10 robôs trabalhando", reap="Tema o Ceifador", reap_d="Solte um Ceifador"),
|
||||
"turkish": dict(
|
||||
first="İlk Teslimat", kg="Dünya için {n} kg", kg_d="{n} kg çim teslim et", bank="Bankada {v}", bank_d="Ekip kasasında {v} biriktir",
|
||||
sweep="Tertemiz", sweep_d="1 sektörü tamamen biç", sec="{n} Sektör", sec_d="{n} sektörü tamamen biç",
|
||||
pl="Herbaria-7: %{p}", pl_d="Gezegenin %{p} kadarını biç", mown="Herbaria Biçildi",
|
||||
st1="Çözüldü", st1_d="Bir ölçüm kazığını düzelt", st50="Elli Kazık", st50_d="50 ölçüm kazığını düzelt", stall="Son Kazığına Kadar", stall_d="195 ölçüm kazığının hepsini düzelt",
|
||||
pt1="Haritacı", pt1_d="Bir ölçüm noktasını oku", ptall="Tüm Harita", ptall_d="26 ölçüm noktasının hepsini oku",
|
||||
sn1="Burada Yalnız Değiliz", sn1_d="Uzak bir istasyon bul", sn5="Gezgin", sn5_d="5 uzak istasyon bul", snall="On İkisi de", snall_d="Tüm istasyonları bul",
|
||||
scy="Gerçek Bir Tırpan", scy_d="Tırpana sahip ol", tools="Dolu Alet Kemeri", tools_d="Duvardaki tüm bıçaklara sahip ol",
|
||||
rb1="Bırak Robot Yapsın", rb1_d="Bir robot istasyonu kur", rb10="Robot Ekibi", rb10_d="10 robotu çalıştır", reap="Azrail'den Kork", reap_d="Bir Azrail sal"),
|
||||
"japanese": dict(
|
||||
first="初納品", kg="地球へ{n}kg", kg_d="草を{n}kg納品する", bank="銀行に{v}", bank_d="チームの財布に{v}貯める",
|
||||
sweep="きれいさっぱり", sweep_d="1セクターを刈り尽くす", sec="{n}セクター", sec_d="{n}セクターを刈り尽くす",
|
||||
pl="Herbaria-7の{p}%", pl_d="惑星の{p}%を刈る", mown="Herbaria制覇",
|
||||
st1="ほどけた", st1_d="測量杭を1本直す", st50="杭50本", st50_d="測量杭を50本直す", stall="最後の1本まで", stall_d="測量杭195本をすべて直す",
|
||||
pt1="測量士", pt1_d="測量ポイントを1つ読み取る", ptall="地図完成", ptall_d="測量ポイント26か所をすべて読み取る",
|
||||
sn1="ここにいるのは僕らだけじゃない", sn1_d="遠方ステーションを1つ見つける", sn5="旅慣れた", sn5_d="遠方ステーションを5つ見つける", snall="12か所制覇", snall_d="すべてのステーションを見つける",
|
||||
scy="本物の大鎌", scy_d="大鎌を手に入れる", tools="道具ベルト完備", tools_d="壁の刃物をすべて手に入れる",
|
||||
rb1="ロボットにお任せ", rb1_d="ロボットドックを建てる", rb10="ロボット部隊", rb10_d="ロボットを10台稼働させる", reap="リーパーを恐れよ", reap_d="リーパーを解き放つ"),
|
||||
}
|
||||
|
||||
|
||||
def num(lang, n):
|
||||
sep = NUM[lang][0]
|
||||
return f"{n:,}".replace(",", sep)
|
||||
|
||||
|
||||
def pct(lang, p):
|
||||
return p.replace(".", NUM[lang][1])
|
||||
|
||||
|
||||
ROWS = []
|
||||
|
||||
|
||||
def add(id, key, kd, **kw):
|
||||
ROWS.append((id, key, kd, kw))
|
||||
|
||||
|
||||
add("SHIP_1", "first", "kg_d", n=1)
|
||||
for n in (100, 1000, 10000, 100000):
|
||||
add(f"SHIP_{n}", "kg", "kg_d", n=n)
|
||||
for n, v in ((1000, "$1,000"), (10000, "$10,000"), (100000, "$100K"), (1000000, "$1M")):
|
||||
add(f"CASH_{n}", "bank", "bank_d", v=v)
|
||||
add("SECTOR_1", "sweep", "sweep_d")
|
||||
for n in (10, 100, 1000, 10000):
|
||||
add(f"SECTOR_{n}", "sec", "sec_d", n=n)
|
||||
for k, p in ((1, "0.01"), (10, "0.1"), (100, "1"), (1000, "10"), (5000, "50")):
|
||||
add(f"PLANET_{k}", "pl", "pl_d", p=p)
|
||||
add("PLANET_10000", "mown", "pl_d", p="100")
|
||||
for id, k in (("STAKE_1", "st1"), ("STAKE_50", "st50"), ("STAKE_ALL", "stall"), ("POINT_1", "pt1"), ("POINT_ALL", "ptall"),
|
||||
("STATION_1", "sn1"), ("STATION_5", "sn5"), ("STATION_ALL", "snall"), ("TOOL_SCYTHE", "scy"), ("TOOL_ALL", "tools"),
|
||||
("ROBOT_1", "rb1"), ("ROBOT_10", "rb10"), ("REAPER", "reap")):
|
||||
add(id, k, k + "_d")
|
||||
|
||||
|
||||
def fill(lang, s, kw):
|
||||
a = {}
|
||||
if "n" in kw:
|
||||
a["n"] = num(lang, kw["n"])
|
||||
if "v" in kw:
|
||||
a["v"] = kw["v"] if lang in ("english", "schinese", "koreana", "japanese") else kw["v"].replace(",", NUM[lang][0])
|
||||
if "p" in kw:
|
||||
a["p"] = pct(lang, kw["p"])
|
||||
return s.format(**a)
|
||||
|
||||
|
||||
out = []
|
||||
for id, key, kd, kw in ROWS:
|
||||
out.append(dict(id=id, name={l: fill(l, t[key], kw) for l, t in L.items()}, desc={l: fill(l, t[kd], kw) for l, t in L.items()}))
|
||||
assert len(out) == 33
|
||||
with open(OUT, "w", encoding="utf-8") as f:
|
||||
json.dump(out, f, ensure_ascii=False, indent=1)
|
||||
print(len(out), "awards in", len(L), "languages")
|
||||
228
Tools/Steam/showcase.py
Normal file
228
Tools/Steam/showcase.py
Normal file
@ -0,0 +1,228 @@
|
||||
"""
|
||||
The store page's showcase: slanted animated panels cut from the trailer's rolls, as WEBM with alpha for Steam's 780 px column.
|
||||
py -I showcase.py [name ...] all of them, or only the named ones. Writes to Docs/Steam/showcase
|
||||
Steam takes up to 12 seconds of WEBM in the description, and VP9 with alpha is what keeps the corners clear.
|
||||
"""
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
PROJECT = r"D:\PROJECTS\LOCAL\GrassCutter"
|
||||
ROLLS = os.path.join(PROJECT, r"Builds\Trailer\rolls")
|
||||
OUT = os.path.join(PROJECT, r"Docs\Steam\showcase")
|
||||
FONT = os.path.join(PROJECT, r"Assets\Fonts\LilitaOne-Regular.ttf")
|
||||
LOGO = os.path.join(PROJECT, r"Assets\Art\UI\logo_grasscutter.png")
|
||||
WHITE, EDGE = (255, 255, 255), (22, 58, 24)
|
||||
# the store page behind the description: what shows through wherever Steam drops the alpha on the way
|
||||
PAGE = np.array([27, 40, 56], np.float32)
|
||||
WIDTH = 780
|
||||
SS = 3 # masks are drawn this much bigger, then shrunk
|
||||
|
||||
|
||||
def frames_of(take, start, seconds, fps, rate=60):
|
||||
folder = os.path.join(ROLLS, take)
|
||||
files = sorted(f for f in os.listdir(folder) if f.endswith(".jpg"))
|
||||
return [os.path.join(folder, files[min(len(files) - 1, int((start + i / fps) * rate))]) for i in range(int(seconds * fps))]
|
||||
|
||||
|
||||
def look(img, sat=1.1, contrast=1.06):
|
||||
f = img.astype(np.float32) / 255
|
||||
lum = f.mean(axis=2, keepdims=True)
|
||||
f = lum + (f - lum) * sat
|
||||
f = 0.5 + (f - 0.5) * contrast
|
||||
return (np.clip(f, 0, 1) * 255).astype(np.uint8)
|
||||
|
||||
|
||||
def shot(path, w, h, focus=(0.5, 0.5), zoom=1.0):
|
||||
"""The frame cropped to w:h around focus, zoom times tighter than the widest crop that fits. RGB float."""
|
||||
img = cv2.imread(path, cv2.IMREAD_COLOR)
|
||||
H, W = img.shape[:2]
|
||||
cw = min(W, H * w / h) / zoom
|
||||
ch = cw * h / w
|
||||
x = int(np.clip(focus[0] * W - cw / 2, 0, W - cw))
|
||||
y = int(np.clip(focus[1] * H - ch / 2, 0, H - ch))
|
||||
img = cv2.resize(img[y:int(y + ch), x:int(x + cw)], (w, h), interpolation=cv2.INTER_AREA)
|
||||
return look(img)[..., ::-1].astype(np.float32)
|
||||
|
||||
|
||||
def slant(w, h, lean, m=8):
|
||||
"""The panel's outline, top edge pushed right, inset by a margin for the frame."""
|
||||
return [(m + lean, m), (w - m, m), (w - m - lean, h - m), (m, h - m)]
|
||||
|
||||
|
||||
def plate(w, h, lean):
|
||||
"""Mask of the picture, and the frame drawn over it as RGBA."""
|
||||
pts = [(x * SS, y * SS) for x, y in slant(w, h, lean)]
|
||||
size = (w * SS, h * SS)
|
||||
outer = Image.new("L", size, 0)
|
||||
d = ImageDraw.Draw(outer)
|
||||
d.polygon(pts, fill=255)
|
||||
d.line(pts + pts[:2], fill=255, width=8 * SS, joint="curve")
|
||||
frame = Image.new("RGBA", size, (0, 0, 0, 0))
|
||||
d = ImageDraw.Draw(frame)
|
||||
d.line(pts + pts[:2], fill=EDGE + (255,), width=8 * SS, joint="curve")
|
||||
d.line(pts + pts[:2], fill=WHITE + (255,), width=4 * SS, joint="curve")
|
||||
mask = np.asarray(outer.resize((w, h), Image.LANCZOS), np.float32) / 255
|
||||
return mask, np.asarray(frame.resize((w, h), Image.LANCZOS), np.float32)
|
||||
|
||||
|
||||
def caption(text, size, w, h):
|
||||
"""Text on a clear layer, white on a dark green edge."""
|
||||
font = ImageFont.truetype(FONT, size * SS)
|
||||
im = Image.new("RGBA", (w * SS, h * SS), (0, 0, 0, 0))
|
||||
d = ImageDraw.Draw(im)
|
||||
stroke = max(2, size // 9) * SS
|
||||
box = d.textbbox((0, 0), text, font=font, stroke_width=stroke)
|
||||
x, y = (w * SS - box[2] - box[0]) // 2, (h * SS - box[3] - box[1]) // 2
|
||||
d.text((x, y + 2 * SS), text, font=font, fill=(0, 0, 0, 150), stroke_width=stroke, stroke_fill=(0, 0, 0, 150))
|
||||
d.text((x, y), text, font=font, fill=WHITE + (255,), stroke_width=stroke, stroke_fill=EDGE + (255,))
|
||||
return np.asarray(im.resize((w, h), Image.LANCZOS), np.float32)
|
||||
|
||||
|
||||
def over(rgb, lay, x=0, y=0):
|
||||
h, w = lay.shape[:2]
|
||||
a = lay[..., 3:] / 255
|
||||
part = rgb[y:y + h, x:x + w]
|
||||
part[...] = part * (1 - a) + lay[..., :3] * a
|
||||
|
||||
|
||||
def encode(frames, alpha, name, fps, crf=40):
|
||||
"""frames are float RGB, alpha 0..1 is one array or one per frame."""
|
||||
h, w = frames[0].shape[:2]
|
||||
path = os.path.join(OUT, name + "_english.webm")
|
||||
cmd = ["ffmpeg", "-y", "-v", "error", "-f", "rawvideo", "-pix_fmt", "rgba", "-s", f"{w}x{h}", "-r", str(fps), "-i", "-", "-an",
|
||||
"-c:v", "libvpx-vp9", "-pix_fmt", "yuva420p", "-crf", str(crf), "-b:v", "0", "-deadline", "good", "-cpu-used", "1", "-row-mt", "1",
|
||||
"-auto-alt-ref", "0", "-g", "240", path]
|
||||
pipe = subprocess.Popen(cmd, stdin=subprocess.PIPE)
|
||||
for i, f in enumerate(frames):
|
||||
a = alpha[i] if isinstance(alpha, list) else alpha
|
||||
rgb = np.clip(f, 0, 255) * a[..., None] + PAGE * (1 - a[..., None])
|
||||
rgba = np.dstack((rgb, a * 255)).astype(np.uint8)
|
||||
pipe.stdin.write(rgba.tobytes())
|
||||
pipe.stdin.close()
|
||||
pipe.wait()
|
||||
print(os.path.basename(path), f"{w}x{h}", len(frames), "frames", f"{os.path.getsize(path) / 1024:.0f} KB", flush=True)
|
||||
|
||||
|
||||
# ───────────────────────── the wide panels ─────────────────────────
|
||||
|
||||
def wide(name, take, start, seconds, text, fps=24, rate=60, focus=(0.5, 0.5), zoom=1.0, h=316, hold=0, crf=40):
|
||||
w, lean = WIDTH, 33
|
||||
mask, frame = plate(w, h, lean)
|
||||
cap = caption(text, 44, w, 70)
|
||||
files = frames_of(take, start, seconds, fps, rate)
|
||||
files += [files[-1]] * hold
|
||||
rows = []
|
||||
for p in files:
|
||||
f = shot(p, w, h, focus, zoom)
|
||||
over(f, frame)
|
||||
over(f, cap, 0, h - 80)
|
||||
rows.append(f)
|
||||
encode(rows, mask, name, fps, crf)
|
||||
|
||||
|
||||
def row(name, cells, fps=24, seconds=2.6, crf=40):
|
||||
"""Three small panels side by side, each with its word under it."""
|
||||
w, cw, ch, lean, gap = WIDTH, 252, 150, 15, 12
|
||||
h = ch + 44
|
||||
mask, frame = plate(cw, ch, lean)
|
||||
alpha = np.zeros((h, w), np.float32)
|
||||
caps = np.zeros((h, w, 4), np.float32)
|
||||
for k, cell in enumerate(cells):
|
||||
x = k * (cw + gap)
|
||||
alpha[0:ch, x:x + cw] = np.maximum(alpha[0:ch, x:x + cw], mask)
|
||||
lay = caption(cell[0], 27, cw, 42)
|
||||
part = caps[ch:ch + 42, x:x + cw]
|
||||
part[...] = np.maximum(part, lay)
|
||||
alpha = np.maximum(alpha, caps[..., 3] / 255)
|
||||
rolls = [frames_of(c[1], c[2], seconds, fps, c[3] if len(c) > 3 else 60) for c in cells]
|
||||
rows = []
|
||||
for i in range(int(seconds * fps)):
|
||||
canvas = np.zeros((h, w, 3), np.float32)
|
||||
for k, cell in enumerate(cells):
|
||||
x = k * (cw + gap)
|
||||
pic = shot(rolls[k][i], cw, ch, *(cell[4:6] if len(cell) > 4 else ((0.5, 0.5), 1.0)))
|
||||
over(pic, frame)
|
||||
a = mask[..., None]
|
||||
canvas[0:ch, x:x + cw] = canvas[0:ch, x:x + cw] * (1 - a) + pic * a
|
||||
over(canvas, caps)
|
||||
rows.append(canvas)
|
||||
encode(rows, alpha, name, fps, crf)
|
||||
|
||||
|
||||
def logo(name="logo"):
|
||||
"""The logo with its grass in the wind."""
|
||||
src = cv2.imread(LOGO, cv2.IMREAD_UNCHANGED)
|
||||
x, y, bw, bh = cv2.boundingRect((src[..., 3] > 8).astype(np.uint8))
|
||||
src = src[y:y + bh, x:x + bw]
|
||||
w = 600
|
||||
h = int(bh * w / bw) // 2 * 2
|
||||
base = cv2.resize(src, (w, h), interpolation=cv2.INTER_AREA).astype(np.float32)
|
||||
# premultiplied, so the warp doesn't drag black in at the rims
|
||||
base[..., :3] *= base[..., 3:] / 255
|
||||
pad = 8
|
||||
canvas_w, canvas_h = WIDTH, h + pad * 2
|
||||
gy, gx = np.mgrid[0:h, 0:w].astype(np.float32)
|
||||
# the tufts sit in the top quarter; only they sway, more towards their tips
|
||||
reach = np.clip(1 - gy / (h * 0.26), 0, 1) ** 1.6
|
||||
fps, n = 24, 48
|
||||
rows, alphas = [], []
|
||||
x0 = (canvas_w - w) // 2
|
||||
for i in range(n):
|
||||
t = i / n * 2 * np.pi
|
||||
dx = reach * (6.0 * np.sin(t + gx / 46) + 2.0 * np.sin(2 * t + gx / 19))
|
||||
pic = cv2.remap(base, gx + dx, gy, cv2.INTER_LINEAR, borderMode=cv2.BORDER_CONSTANT, borderValue=(0, 0, 0, 0))
|
||||
rgb = np.zeros((canvas_h, canvas_w, 3), np.float32)
|
||||
a = np.zeros((canvas_h, canvas_w), np.float32)
|
||||
al = pic[..., 3] / 255
|
||||
a[pad:pad + h, x0:x0 + w] = al
|
||||
rgb[pad:pad + h, x0:x0 + w] = pic[..., 2::-1] / np.maximum(al[..., None], 1e-3)
|
||||
rows.append(rgb)
|
||||
alphas.append(a)
|
||||
encode(rows, alphas, name, fps, 34)
|
||||
|
||||
|
||||
def banner(name, text, size=50, h=88):
|
||||
"""A static plate that opens a section of the text."""
|
||||
w, lean = WIDTH, 20
|
||||
im = Image.new("RGBA", (w * SS, h * SS), (0, 0, 0, 0))
|
||||
pts = [(x * SS, y * SS) for x, y in slant(w, h, lean)]
|
||||
d = ImageDraw.Draw(im)
|
||||
d.polygon(pts, fill=(38, 92, 40, 255))
|
||||
d.line(pts + pts[:2], fill=EDGE + (255,), width=8 * SS, joint="curve")
|
||||
d.line(pts + pts[:2], fill=WHITE + (255,), width=4 * SS, joint="curve")
|
||||
cap = Image.fromarray(caption(text, size, w, h).astype(np.uint8), "RGBA").resize((w * SS, h * SS), Image.LANCZOS)
|
||||
im.alpha_composite(cap)
|
||||
im = im.resize((w, h), Image.LANCZOS)
|
||||
# full RGBA, not a palette: Steam turned the palette's clear corners black. Under the alpha sits the page's own colour.
|
||||
page = Image.new("RGBA", (w, h), tuple(int(c) for c in PAGE) + (255,))
|
||||
page.alpha_composite(im)
|
||||
page.putalpha(im.getchannel("A"))
|
||||
path = os.path.join(OUT, name + "_english.png")
|
||||
page.save(path, optimize=True)
|
||||
print(os.path.basename(path), f"{os.path.getsize(path) / 1024:.0f} KB", flush=True)
|
||||
|
||||
|
||||
JOBS = {
|
||||
"logo": logo,
|
||||
"planet": lambda: wide("planet", "e_cut_k", 1.2, 6.8, "MOW THE WHOLE PLANET", fps=24, h=390, hold=24),
|
||||
"crew": lambda: wide("crew", "c_line", 0.8, 3.0, "UP TO 16 PLAYERS"),
|
||||
"robots": lambda: wide("robots", "k_robots", 1.0, 3.2, "THEN LET THE ROBOTS DO IT"),
|
||||
"fleet": lambda: wide("fleet", "f_side", 0.3, 3.0, "BRING THE WHOLE FLEET"),
|
||||
"row_jobs": lambda: row("row_jobs", [("MOW", "c_swing_s", 1.3, 120, (0.42, 0.55), 1.2), ("DRIVE", "c_rider_side", 0.2, 60), ("BUILD", "k_hammer", 0.4, 60, (0.55, 0.56), 1.55)]),
|
||||
"row_life": lambda: row("row_life", [("NIGHT SHIFT", "n_tractor", 0.8, 60), ("PHONE BREAK", "v_phone", 0.8, 60, (0.42, 0.45), 1.3), ("BELTS", "k_belt", 0.3, 60)]),
|
||||
"h_mow": lambda: banner("h_mow", "START WITH NAIL SCISSORS"),
|
||||
"h_build": lambda: banner("h_build", "BUILD THE FACTORY"),
|
||||
"h_planet": lambda: banner("h_planet", "EVERY CUT STAYS CUT"),
|
||||
"h_together": lambda: banner("h_together", "BETTER TOGETHER"),
|
||||
"h_features": lambda: banner("h_features", "WHAT YOU GET"),
|
||||
}
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
for name in sys.argv[1:] or JOBS:
|
||||
JOBS[name]()
|
||||
163
Tools/Steam/store_text.py
Normal file
163
Tools/Steam/store_text.py
Normal file
@ -0,0 +1,163 @@
|
||||
"""
|
||||
The store page's words in every language the game ships in, poured into the same layout of panels.
|
||||
py -I store_text.py writes Docs/Steam/store_text/<language>.txt and short_<language>.txt
|
||||
"""
|
||||
import os
|
||||
|
||||
OUT = r"D:\PROJECTS\LOCAL\GrassCutter\Docs\Steam\store_text"
|
||||
BROWSER = "Microsoft Edge / Google Chrome"
|
||||
|
||||
T = {
|
||||
"english": dict(
|
||||
short="Earth has run out of grass. This planet has too much. Land with a pair of nail scissors and up to 15 friends, then mow, build and automate your way across the whole globe until not a single blade is left.",
|
||||
intro="Grass Cutters Together is an online co-op mowing game for 1 to 16 players. Earth has run out of grass, and a whole planet of it is waiting. You land with a pair of nail scissors.",
|
||||
wish="WISHLIST NOW",
|
||||
mow="Every blade you cut goes into your tool, and every kilo you hand in pays out. Trade the scissors for shears, a sickle and a line of scythes, then work up to a push mower, a rider, a tractor and a combine.",
|
||||
build="Lay belts up to 6 metres high, split, merge and sort them, and bale the harvest. Run it all on solar panels, poles and batteries. Then send out robots to mow whole neighbourhoods while you get on with the next job.",
|
||||
planet="Herbaria-7 is a true sphere, 2.8 km in radius, split into more than 160,000 sectors. Grass never grows back, so your progress is written across the globe. The sun circles the planet every 30 minutes: somewhere, it is always night.",
|
||||
together="Money is shared, so one player runs the belts, another mows the far side of the world and someone else drives the pickup. Play alone or bring up to 15 friends.",
|
||||
features=["Online co-op for 1-16 players, private or public lobbies", "7 tools, from nail scissors to the Two-Handed Scythe and the Build Hammer", "5 machines to buy and tune", "Belts, splitters, mergers, sorters and binders", "Solar power, batteries and windmills", "Robots that mow on their own, and a Reaper that roams the planet", "11 far stations with fast travel between them", "Eight characters to choose from, cosmetic only", f"An in-game phone with the real internet on it: keep a video playing while you mow (needs {BROWSER})"],
|
||||
),
|
||||
"russian": dict(
|
||||
short="На Земле кончилась трава. А на этой планете её слишком много. Высаживайтесь с маникюрными ножницами и 15 друзьями, а потом косите, стройте и автоматизируйте, пока на всём шаре не останется ни травинки.",
|
||||
intro="Grass Cutters Together это онлайн-кооператив про покос для 1-16 игроков. На Земле кончилась трава, а где-то ждёт целая планета, заросшая ей. Вы высаживаетесь с маникюрными ножницами.",
|
||||
wish="ДОБАВЛЯЙТЕ В ЖЕЛАЕМОЕ",
|
||||
mow="Всё срезанное падает в инструмент, а каждый сданный килограмм приносит деньги. Смените ножницы на садовые, серп и линейку кос, а потом дойдите до ручной косилки, райдера, трактора и комбайна.",
|
||||
build="Прокладывайте конвейеры на высоте до 6 метров, разделяйте, объединяйте и сортируйте их, вяжите урожай в вязанки. Питайте всё солнечными панелями, столбами и аккумуляторами. А потом выпустите роботов косить целые районы, пока сами заняты следующим делом.",
|
||||
planet="Herbaria-7 это настоящий шар радиусом 2,8 км, разбитый на более чем 160 000 секторов. Трава не отрастает, так что весь ваш прогресс виден на глобусе. Солнце обходит планету за 30 минут: где-то всегда ночь.",
|
||||
together="Деньги общие: один настраивает конвейеры, другой косит на другом конце света, третий гоняет на пикапе. Играйте один или зовите до 15 друзей.",
|
||||
features=["Онлайн-кооператив на 1-16 игроков, закрытые и открытые лобби", "7 инструментов, от маникюрных ножниц до двуручной косы и строительного молотка", "5 машин, которые можно купить и настроить", "Конвейеры, разветвители, объединители, сортировщики и вязальщики", "Солнечная энергия, аккумуляторы и мельницы", "Роботы, которые косят сами, и Жнец, который ходит по всей планете", "11 дальних станций с быстрым перемещением между ними", "Восемь персонажей на выбор, только внешность", f"Телефон в игре с настоящим интернетом: видео играет, пока косишь (нужен {BROWSER})"],
|
||||
),
|
||||
"french": dict(
|
||||
short="La Terre n'a plus d'herbe. Cette planète en a beaucoup trop. Débarquez avec une paire de ciseaux à ongles et jusqu'à 15 amis, puis tondez, construisez et automatisez jusqu'au dernier brin de tout le globe.",
|
||||
intro="Grass Cutters Together est un jeu de tonte en coopération en ligne pour 1 à 16 joueurs. La Terre n'a plus d'herbe, et toute une planète en regorge. Vous débarquez avec une paire de ciseaux à ongles.",
|
||||
wish="AJOUTEZ-LE À VOTRE LISTE DE SOUHAITS",
|
||||
mow="Chaque brin coupé va dans votre outil, et chaque kilo livré rapporte de l'argent. Échangez les ciseaux contre une cisaille, une faucille et toute une gamme de faux, puis passez à la tondeuse, au tracteur tondeuse, au tracteur et à la moissonneuse-batteuse.",
|
||||
build="Installez des convoyeurs jusqu'à 6 mètres de haut, divisez-les, fusionnez-les, triez-les et mettez la récolte en bottes. Alimentez le tout avec des panneaux solaires, des pylônes et des batteries. Puis lâchez des robots sur des quartiers entiers pendant que vous passez au chantier suivant.",
|
||||
planet="Herbaria-7 est une véritable sphère de 2,8 km de rayon, divisée en plus de 160 000 secteurs. L'herbe ne repousse jamais : vos progrès restent inscrits sur le globe. Le soleil fait le tour de la planète en 30 minutes : quelque part, il fait toujours nuit.",
|
||||
together="L'argent est commun : l'un gère les convoyeurs, l'autre tond à l'autre bout du monde et un troisième conduit le pick-up. Jouez seul ou avec jusqu'à 15 amis.",
|
||||
features=["Coopération en ligne de 1 à 16 joueurs, salons privés ou publics", "7 outils, des ciseaux à ongles à la faux à deux mains et au marteau de construction", "5 machines à acheter et à améliorer", "Convoyeurs, répartiteurs, fusionneurs, trieurs et botteleuses", "Énergie solaire, batteries et moulins à vent", "Des robots qui tondent seuls et une Faucheuse qui parcourt la planète", "11 stations lointaines reliées par voyage rapide", "Huit personnages au choix, purement esthétiques", f"Un téléphone en jeu avec le vrai Internet : gardez une vidéo en lecture pendant que vous tondez ({BROWSER} requis)"],
|
||||
),
|
||||
"italian": dict(
|
||||
short="La Terra è rimasta senza erba. Questo pianeta ne ha troppa. Sbarca con un paio di forbicine e fino a 15 amici, poi taglia, costruisci e automatizza finché sull'intero globo non resterà un solo filo d'erba.",
|
||||
intro="Grass Cutters Together è un gioco cooperativo online sul taglio dell'erba per 1-16 giocatori. La Terra è rimasta senza erba e un intero pianeta ne è pieno. Sbarchi con un paio di forbicine da unghie.",
|
||||
wish="AGGIUNGILO ALLA LISTA DEI DESIDERI",
|
||||
mow="Ogni filo tagliato finisce nel tuo attrezzo e ogni chilo consegnato ti fa guadagnare. Sostituisci le forbicine con cesoie, un falcetto e una serie di falci, poi passa al tosaerba a spinta, al trattorino, al trattore e alla mietitrebbia.",
|
||||
build="Stendi nastri trasportatori fino a 6 metri di altezza, dividili, uniscili, smistali e imballa il raccolto. Alimenta tutto con pannelli solari, pali e batterie. Poi manda i robot a tagliare interi quartieri mentre pensi al lavoro successivo.",
|
||||
planet="Herbaria-7 è una vera sfera con un raggio di 2,8 km, divisa in oltre 160.000 settori. L'erba non ricresce mai, quindi i tuoi progressi restano scritti sul globo. Il sole gira attorno al pianeta in 30 minuti: da qualche parte è sempre notte.",
|
||||
together="I soldi sono in comune: uno gestisce i nastri, un altro taglia dall'altra parte del mondo e qualcun altro guida il pickup. Gioca da solo o con un massimo di 15 amici.",
|
||||
features=["Cooperativa online per 1-16 giocatori, lobby private o pubbliche", "7 attrezzi, dalle forbicine alla falce a due mani e al martello da costruzione", "5 macchine da acquistare e potenziare", "Nastri, divisori, unificatori, smistatori e imballatrici", "Energia solare, batterie e mulini a vento", "Robot che tagliano da soli e un Mietitore che percorre il pianeta", "11 stazioni lontane con viaggio rapido", "Otto personaggi tra cui scegliere, solo estetici", f"Un telefono nel gioco con la vera Internet: guarda un video mentre tagli (richiede {BROWSER})"],
|
||||
),
|
||||
"german": dict(
|
||||
short="Der Erde ist das Gras ausgegangen. Dieser Planet hat viel zu viel davon. Lande mit einer Nagelschere und bis zu 15 Freunden, dann mähe, baue und automatisiere, bis auf dem ganzen Globus kein Halm mehr steht.",
|
||||
intro="Grass Cutters Together ist ein Online-Koop-Mähspiel für 1 bis 16 Spieler. Der Erde ist das Gras ausgegangen, und ein ganzer Planet steht davon voll. Du landest mit einer Nagelschere.",
|
||||
wish="JETZT AUF DIE WUNSCHLISTE",
|
||||
mow="Jeder Halm landet in deinem Werkzeug, und jedes abgelieferte Kilo bringt Geld. Tausche die Schere gegen eine Heckenschere, eine Sichel und eine Reihe von Sensen, und arbeite dich zu Handmäher, Aufsitzmäher, Traktor und Mähdrescher hoch.",
|
||||
build="Verlege Förderbänder bis zu 6 Meter hoch, teile, vereine und sortiere sie und binde die Ernte zu Ballen. Betreibe alles mit Solarmodulen, Masten und Batterien. Dann schick Roboter los, die ganze Viertel mähen, während du dich um den nächsten Auftrag kümmerst.",
|
||||
planet="Herbaria-7 ist eine echte Kugel mit 2,8 km Radius, aufgeteilt in mehr als 160.000 Sektoren. Gras wächst nie nach, also bleibt dein Fortschritt auf dem Globus sichtbar. Die Sonne umrundet den Planeten alle 30 Minuten: Irgendwo ist immer Nacht.",
|
||||
together="Das Geld gehört allen: Einer kümmert sich um die Bänder, eine andere mäht am anderen Ende der Welt, und jemand fährt den Pick-up. Spiele allein oder mit bis zu 15 Freunden.",
|
||||
features=["Online-Koop für 1-16 Spieler, private oder öffentliche Lobbys", "7 Werkzeuge, von der Nagelschere bis zur Zweihandsense und zum Bauhammer", "5 Maschinen zum Kaufen und Aufrüsten", "Förderbänder, Verteiler, Zusammenführer, Sortierer und Ballenbinder", "Solarstrom, Batterien und Windmühlen", "Roboter, die selbstständig mähen, und ein Schnitter, der den Planeten durchstreift", "11 ferne Stationen mit Schnellreise", "Acht Charaktere zur Auswahl, rein kosmetisch", f"Ein Handy im Spiel mit echtem Internet: Lass beim Mähen ein Video laufen (benötigt {BROWSER})"],
|
||||
),
|
||||
"spanish": dict(
|
||||
short="A la Tierra se le ha acabado la hierba. Este planeta tiene de sobra. Aterriza con unas tijeras de uñas y hasta 15 amigos, y siega, construye y automatiza hasta que no quede ni una brizna en todo el globo.",
|
||||
intro="Grass Cutters Together es un juego cooperativo en línea de segar para 1 a 16 jugadores. A la Tierra se le ha acabado la hierba y hay todo un planeta lleno. Aterrizas con unas tijeras de uñas.",
|
||||
wish="AÑÁDELO A TU LISTA DE DESEADOS",
|
||||
mow="Cada brizna que cortas va a tu herramienta y cada kilo que entregas te da dinero. Cambia las tijeras por una cizalla, una hoz y una serie de guadañas, y sube hasta el cortacésped, el tractor cortacésped, el tractor y la cosechadora.",
|
||||
build="Tiende cintas transportadoras de hasta 6 metros de altura, divídelas, únelas, clasifica la carga y empaca la cosecha. Aliméntalo todo con paneles solares, postes y baterías. Luego envía robots a segar barrios enteros mientras te ocupas del siguiente trabajo.",
|
||||
planet="Herbaria-7 es una esfera de verdad de 2,8 km de radio, dividida en más de 160.000 sectores. La hierba nunca vuelve a crecer, así que tu progreso queda escrito en el globo. El sol rodea el planeta cada 30 minutos: en algún lugar siempre es de noche.",
|
||||
together="El dinero es común: uno lleva las cintas, otro siega al otro lado del mundo y alguien más conduce la camioneta. Juega solo o con hasta 15 amigos.",
|
||||
features=["Cooperativo en línea para 1-16 jugadores, salas privadas o públicas", "7 herramientas, desde las tijeras de uñas hasta la guadaña a dos manos y el martillo de construcción", "5 máquinas que comprar y mejorar", "Cintas, divisores, unificadores, clasificadores y empacadoras", "Energía solar, baterías y molinos de viento", "Robots que siegan solos y una Parca que recorre el planeta", "11 estaciones lejanas con viaje rápido", "Ocho personajes a elegir, solo estéticos", f"Un teléfono en el juego con Internet de verdad: deja un vídeo puesto mientras siegas (requiere {BROWSER})"],
|
||||
),
|
||||
"schinese": dict(
|
||||
short="地球上的草用完了,而这颗星球上的草多得离谱。带上一把指甲剪和最多 15 位好友登陆,割草、建造、实现自动化,直到整个星球寸草不留。",
|
||||
intro="Grass Cutters Together 是一款支持 1 至 16 人的线上合作割草游戏。地球上的草用完了,而一整颗星球正长满了草等着你。你登陆时只带着一把指甲剪。",
|
||||
wish="立即加入愿望单",
|
||||
mow="割下的每片草都会进入你的工具,每交付一公斤都能换钱。把指甲剪换成园艺剪、镰刀和各种长柄镰,再一路升级到手推式割草机、骑乘式割草机、拖拉机和联合收割机。",
|
||||
build="铺设最高 6 米的传送带,进行分流、合流和分拣,并把收获打包成捆。用太阳能板、电线杆和蓄电池为一切供电。然后派出机器人去割完整片区域,你只管忙下一件事。",
|
||||
planet="Herbaria-7 是一颗真正的球体,半径 2.8 公里,划分为超过 160,000 个区块。草永远不会再长出来,你的进度会一直留在星球上。太阳每 30 分钟绕行星球一周:总有地方正处于黑夜。",
|
||||
together="资金由全队共享:有人管传送带,有人在世界另一头割草,还有人开皮卡。你可以单人游玩,也可以邀请最多 15 位好友。",
|
||||
features=["1-16 人线上合作,支持私人或公开大厅", "7 种工具,从指甲剪到双手镰刀和建造锤", "5 种可购买和升级的机械", "传送带、分流器、合流器、分拣器和打捆机", "太阳能、蓄电池和风车", "能自动割草的机器人,以及在星球上游走的收割者", "11 座远方站点,可快速旅行", "8 位角色可选,仅改变外观", f"游戏内手机可连接真实互联网:一边割草一边看视频(需要 {BROWSER})"],
|
||||
),
|
||||
"koreana": dict(
|
||||
short="지구에 풀이 동났습니다. 이 행성에는 풀이 너무 많습니다. 손톱깎이 가위와 최대 15명의 친구와 함께 착륙해 행성 전체에 풀 한 포기 남지 않을 때까지 베고, 짓고, 자동화하세요.",
|
||||
intro="Grass Cutters Together는 1~16인 온라인 협동 풀베기 게임입니다. 지구에 풀이 동났고, 행성 하나가 통째로 풀로 뒤덮여 있습니다. 당신은 손톱 가위 하나만 들고 착륙합니다.",
|
||||
wish="지금 찜하기",
|
||||
mow="벤 풀은 모두 도구에 담기고, 납품한 1kg마다 돈이 됩니다. 손톱 가위를 전정가위, 낫, 여러 종류의 큰 낫으로 바꾸고, 수동 잔디깎이, 승용 잔디깎이, 트랙터, 콤바인까지 올라가세요.",
|
||||
build="최대 6미터 높이로 컨베이어를 깔고, 나누고, 합치고, 분류하고, 수확물을 묶으세요. 태양광 패널, 전봇대, 배터리로 모든 것을 돌리세요. 그런 다음 로봇을 보내 구역 전체를 베게 하고 당신은 다음 일을 시작하세요.",
|
||||
planet="Herbaria-7은 반지름 2.8km의 진짜 구체이며 160,000개가 넘는 구역으로 나뉩니다. 풀은 다시 자라지 않으므로 진행 상황이 행성에 그대로 남습니다. 태양은 30분마다 행성을 한 바퀴 돕니다. 어딘가는 언제나 밤입니다.",
|
||||
together="돈은 공용입니다. 누군가는 컨베이어를 맡고, 누군가는 세계 반대편에서 풀을 베고, 또 누군가는 픽업트럭을 몹니다. 혼자 하거나 최대 15명의 친구와 함께하세요.",
|
||||
features=["1~16인 온라인 협동, 비공개 또는 공개 로비", "손톱 가위부터 양손 낫, 건설 망치까지 7가지 도구", "구매하고 강화할 수 있는 5가지 기계", "컨베이어, 분배기, 합류기, 분류기, 결속기", "태양광 발전, 배터리, 풍차", "스스로 풀을 베는 로봇과 행성을 누비는 사신", "빠른 이동이 가능한 11개의 먼 기지", "외형만 바뀌는 8명의 캐릭터", f"진짜 인터넷이 되는 게임 속 휴대폰: 풀을 베면서 영상 시청 ({BROWSER} 필요)"],
|
||||
),
|
||||
"polish": dict(
|
||||
short="Na Ziemi skończyła się trawa. Na tej planecie jest jej za dużo. Wyląduj z nożyczkami do paznokci i maksymalnie 15 znajomymi, a potem koś, buduj i automatyzuj, aż na całym globie nie zostanie ani jedno źdźbło.",
|
||||
intro="Grass Cutters Together to sieciowa kooperacja o koszeniu dla 1-16 graczy. Na Ziemi skończyła się trawa, a cała planeta tonie w zieleni. Lądujesz z nożyczkami do paznokci.",
|
||||
wish="DODAJ DO LISTY ŻYCZEŃ",
|
||||
mow="Każde ścięte źdźbło trafia do narzędzia, a każdy oddany kilogram to pieniądze. Zamień nożyczki na sekator, sierp i kolejne kosy, a potem dojdź do kosiarki ręcznej, traktorka, ciągnika i kombajnu.",
|
||||
build="Układaj taśmociągi do 6 metrów wysokości, rozdzielaj je, łącz, sortuj ładunek i wiąż plony w bele. Zasilaj wszystko panelami słonecznymi, słupami i akumulatorami. Potem wyślij roboty, by kosiły całe okolice, a sam zajmij się kolejnym zadaniem.",
|
||||
planet="Herbaria-7 to prawdziwa kula o promieniu 2,8 km, podzielona na ponad 160 000 sektorów. Trawa nigdy nie odrasta, więc twoje postępy zostają zapisane na globie. Słońce okrąża planetę co 30 minut: gdzieś zawsze jest noc.",
|
||||
together="Pieniądze są wspólne: jedna osoba pilnuje taśmociągów, druga kosi po drugiej stronie świata, a ktoś jeszcze prowadzi pick-upa. Graj sam lub z maksymalnie 15 znajomymi.",
|
||||
features=["Kooperacja sieciowa dla 1-16 graczy, lobby prywatne lub publiczne", "7 narzędzi, od nożyczek do paznokci po dwuręczną kosę i młot budowlany", "5 maszyn do kupienia i ulepszania", "Taśmociągi, rozdzielacze, łączniki, sortery i wiązałki", "Energia słoneczna, akumulatory i wiatraki", "Roboty koszące samodzielnie i Żniwiarz przemierzający planetę", "11 odległych stacji z szybką podróżą", "Osiem postaci do wyboru, tylko wygląd", f"Telefon w grze z prawdziwym internetem: oglądaj film podczas koszenia (wymaga {BROWSER})"],
|
||||
),
|
||||
"brazilian": dict(
|
||||
short="A Terra ficou sem grama. Este planeta tem grama demais. Pouse com uma tesourinha de unha e até 15 amigos, depois corte, construa e automatize até não sobrar uma única folha em todo o globo.",
|
||||
intro="Grass Cutters Together é um jogo cooperativo on-line de cortar grama para 1 a 16 jogadores. A Terra ficou sem grama, e um planeta inteiro está cheio dela. Você pousa com uma tesourinha de unha.",
|
||||
wish="ADICIONE À LISTA DE DESEJOS",
|
||||
mow="Cada folha cortada vai para a sua ferramenta, e cada quilo entregue vira dinheiro. Troque a tesourinha por uma tesoura de jardim, uma foice e uma linha de gadanhas, depois avance para o cortador manual, o cortador montado, o trator e a colheitadeira.",
|
||||
build="Instale esteiras de até 6 metros de altura, divida, junte e separe a carga, e enfarde a colheita. Alimente tudo com painéis solares, postes e baterias. Depois mande robôs cortarem bairros inteiros enquanto você cuida do próximo trabalho.",
|
||||
planet="Herbaria-7 é uma esfera de verdade, com 2,8 km de raio, dividida em mais de 160.000 setores. A grama nunca volta a crescer, então seu progresso fica marcado no globo. O sol dá a volta no planeta a cada 30 minutos: em algum lugar, é sempre noite.",
|
||||
together="O dinheiro é compartilhado: um cuida das esteiras, outro corta do outro lado do mundo e mais alguém dirige a picape. Jogue sozinho ou com até 15 amigos.",
|
||||
features=["Cooperativo on-line para 1-16 jogadores, salas privadas ou públicas", "7 ferramentas, da tesourinha de unha à gadanha de duas mãos e ao martelo de construção", "5 máquinas para comprar e melhorar", "Esteiras, divisores, unificadores, separadores e enfardadeiras", "Energia solar, baterias e moinhos de vento", "Robôs que cortam sozinhos e um Ceifador que percorre o planeta", "11 estações distantes com viagem rápida", "Oito personagens à escolha, apenas visuais", f"Um celular no jogo com internet de verdade: deixe um vídeo tocando enquanto corta (requer {BROWSER})"],
|
||||
),
|
||||
"turkish": dict(
|
||||
short="Dünya'da çim kalmadı. Bu gezegende ise fazlasıyla var. Bir tırnak makası ve en fazla 15 arkadaşınla in, sonra biç, inşa et ve otomatikleştir; tüm gezegende tek bir ot bile kalmayana kadar devam et.",
|
||||
intro="Grass Cutters Together, 1-16 oyuncu için çevrim içi kooperatif bir çim biçme oyunudur. Dünya'da çim kalmadı ve koca bir gezegen çimle dolu. Elinde bir tırnak makasıyla iniş yapıyorsun.",
|
||||
wish="HEMEN İSTEK LİSTENE EKLE",
|
||||
mow="Kestiğin her ot aletine gider, teslim ettiğin her kilo para kazandırır. Makası budama makasıyla, orakla ve bir dizi tırpanla değiştir; ardından çim biçme makinesine, binekli biçiciye, traktöre ve biçerdövere yüksel.",
|
||||
build="6 metre yüksekliğe kadar bantlar döşe; onları ayır, birleştir, yükü sırala ve ürünü balya yap. Her şeyi güneş panelleri, direkler ve bataryalarla çalıştır. Sonra robotları koca mahalleleri biçmeye gönder, sen de bir sonraki işe geç.",
|
||||
planet="Herbaria-7, 2,8 km yarıçaplı gerçek bir küredir ve 160.000'den fazla sektöre bölünmüştür. Çimler asla yeniden büyümez, bu yüzden ilerlemen gezegenin üzerinde kalır. Güneş gezegenin çevresini 30 dakikada dolaşır: bir yerlerde hep gecedir.",
|
||||
together="Para ortaktır: biri bantlarla ilgilenir, biri dünyanın öbür ucunda biçer, bir başkası kamyoneti sürer. Tek başına oyna ya da en fazla 15 arkadaşını getir.",
|
||||
features=["1-16 oyuncu için çevrim içi kooperatif, özel veya herkese açık lobiler", "Tırnak makasından çift elli tırpana ve inşaat çekicine 7 alet", "Satın alınıp geliştirilebilen 5 makine", "Bantlar, ayırıcılar, birleştiriciler, sıralayıcılar ve balya makineleri", "Güneş enerjisi, bataryalar ve yel değirmenleri", "Kendi kendine biçen robotlar ve gezegeni dolaşan bir Azrail", "Hızlı seyahatle bağlı 11 uzak istasyon", "Seçilebilen sekiz karakter, yalnızca görünüm", f"Gerçek internete bağlı oyun içi telefon: biçerken video izle ({BROWSER} gerekir)"],
|
||||
),
|
||||
"japanese": dict(
|
||||
short="地球の草が尽きた。この星には草がありすぎる。爪切りばさみと最大15人の仲間とともに降り立ち、刈って、作って、自動化して、星じゅうの草を一本残らず刈り尽くそう。",
|
||||
intro="Grass Cutters Together は、1~16人で遊べるオンライン協力の草刈りゲームです。地球の草が尽き、星ひとつ分の草が待っています。あなたは爪切りばさみひとつで降り立ちます。",
|
||||
wish="ウィッシュリストに追加",
|
||||
mow="刈った草はすべて道具に入り、納品した1キロごとにお金になります。はさみを剪定ばさみ、鎌、さまざまな大鎌に持ち替え、手押し芝刈り機、乗用芝刈り機、トラクター、コンバインへと進みましょう。",
|
||||
build="最大6メートルの高さにベルトを敷き、分岐、合流、仕分けをして、収穫物を束ねましょう。ソーラーパネル、電柱、バッテリーですべてを動かします。あとはロボットに地区ごと刈らせて、次の仕事に取りかかりましょう。",
|
||||
planet="Herbaria-7 は半径2.8kmの本物の球体で、16万以上のセクターに分かれています。草は二度と生えないので、進行状況は星の表面に残ります。太陽は30分で星を一周します。どこかは必ず夜です。",
|
||||
together="お金はみんなの共有です。ベルトを管理する人、世界の裏側で刈る人、ピックアップトラックを運転する人。ひとりでも、最大15人の仲間とでも遊べます。",
|
||||
features=["1~16人のオンライン協力、プライベートまたは公開ロビー", "爪切りばさみから両手鎌、建築ハンマーまで7種類の道具", "購入して強化できる5種類のマシン", "ベルト、分岐器、合流器、仕分け機、結束機", "太陽光発電、バッテリー、風車", "自動で草を刈るロボットと、星を巡るリーパー", "ファストトラベルできる11か所の遠方ステーション", "見た目だけが変わる8人のキャラクター", f"本物のインターネットが使えるゲーム内スマホ:草を刈りながら動画を再生({BROWSER} が必要)"],
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
def img(name):
|
||||
return "[img]{STEAM_APP_IMAGE}/extras/" + name + "[/img]"
|
||||
|
||||
|
||||
def about(t):
|
||||
return "\n\n".join([
|
||||
img("logo"),
|
||||
t["intro"] + "\n[b]" + t["wish"] + "[/b]",
|
||||
img("planet"), img("crew"), img("row_jobs"),
|
||||
img("h_mow") + "\n" + t["mow"],
|
||||
img("robots"),
|
||||
img("h_build") + "\n" + t["build"],
|
||||
img("row_life"),
|
||||
img("h_planet") + "\n" + t["planet"],
|
||||
img("fleet"),
|
||||
img("h_together") + "\n" + t["together"],
|
||||
img("h_features") + "\n[list]\n" + "\n".join("[*]" + f for f in t["features"]) + "\n[/list]",
|
||||
])
|
||||
|
||||
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
for name in os.listdir(OUT):
|
||||
if name.endswith(".txt"):
|
||||
os.remove(os.path.join(OUT, name))
|
||||
for lang, t in T.items():
|
||||
with open(os.path.join(OUT, lang + ".txt"), "w", encoding="utf-8", newline="\n") as f:
|
||||
f.write(about(t))
|
||||
with open(os.path.join(OUT, "short_" + lang + ".txt"), "w", encoding="utf-8", newline="\n") as f:
|
||||
f.write(t["short"])
|
||||
print(lang, len(t["short"]), len(about(t)))
|
||||
413
Tools/Trailer/cut.py
Normal file
413
Tools/Trailer/cut.py
Normal file
@ -0,0 +1,413 @@
|
||||
"""
|
||||
The edit. Everything is placed in TRACK time (seconds of the original song), so the shot list can be read against the words;
|
||||
`KEEP` says which stretches of the song survive and the rest follows.
|
||||
|
||||
py -I cut.py edl.py out.mp4 [from to] renders the whole film, or a stretch of it in track time
|
||||
|
||||
An edl may also set SIZE (w, h) for an upright film, TRACK for another song, and PUNCH, SHAKE and ABERRATE for how hard
|
||||
the picture answers the kick.
|
||||
"""
|
||||
import importlib.util
|
||||
import math
|
||||
import os
|
||||
import random
|
||||
import subprocess
|
||||
import sys
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
W, H, FPS = 1920, 1080, 60
|
||||
SR = 48000
|
||||
PROJECT = r"D:\PROJECTS\LOCAL\GrassCutter"
|
||||
TRACK = os.path.join(PROJECT, r"ArtSource\Trailer\mowin.mp3")
|
||||
FONT = os.path.join(PROJECT, r"Assets\Fonts\LilitaOne-Regular.ttf")
|
||||
|
||||
|
||||
# ───────────────────────── time ─────────────────────────
|
||||
|
||||
class Clock:
|
||||
"""Output seconds <-> track seconds, across the splices."""
|
||||
|
||||
def __init__(self, keep):
|
||||
self.keep = keep
|
||||
self.total = sum(b - a for a, b in keep)
|
||||
|
||||
def track(self, t):
|
||||
for a, b in self.keep:
|
||||
if t < b - a:
|
||||
return a + t
|
||||
t -= b - a
|
||||
return self.keep[-1][1]
|
||||
|
||||
def out(self, t):
|
||||
done = 0.0
|
||||
for a, b in self.keep:
|
||||
if t < a:
|
||||
return done
|
||||
if t <= b:
|
||||
return done + t - a
|
||||
done += b - a
|
||||
return done
|
||||
|
||||
|
||||
# ───────────────────────── sound ─────────────────────────
|
||||
|
||||
def decode(path):
|
||||
p = subprocess.run(["ffmpeg", "-v", "error", "-i", path, "-f", "f32le", "-ac", "2", "-ar", str(SR), "-"], capture_output=True, check=True)
|
||||
return np.frombuffer(p.stdout, np.float32).reshape(-1, 2).copy()
|
||||
|
||||
|
||||
def mix(song, clock, sfx, out_wav):
|
||||
n = int(clock.total * SR)
|
||||
bus = np.zeros((n + SR * 2, 2), np.float32)
|
||||
fade = int(0.012 * SR)
|
||||
at = 0
|
||||
for a, b in clock.keep:
|
||||
piece = song[int(a * SR):int(b * SR)].copy()
|
||||
piece[:fade] *= np.linspace(0, 1, fade)[:, None]
|
||||
piece[-fade:] *= np.linspace(1, 0, fade)[:, None]
|
||||
bus[at:at + len(piece)] += piece
|
||||
at += len(piece)
|
||||
cache = {}
|
||||
for item in sfx:
|
||||
# (track time, clip, gain) plays the clip through; a fourth number cuts it, or loops it, to that many seconds; a fifth
|
||||
# starts it that many seconds in (a line of dialogue out of a longer recording)
|
||||
t, path, gain = item[:3]
|
||||
clip = cache.setdefault(path, decode(path))
|
||||
if len(item) > 4 and item[4]:
|
||||
clip = clip[int(item[4] * SR):]
|
||||
if len(item) > 3 and item[3]:
|
||||
want = int(item[3] * SR)
|
||||
clip = np.tile(clip, (want // len(clip) + 1, 1))[:want].copy()
|
||||
ramp = min(int(0.15 * SR), want // 3)
|
||||
clip[:ramp] *= np.linspace(0, 1, ramp)[:, None]
|
||||
clip[-ramp:] *= np.linspace(1, 0, ramp)[:, None]
|
||||
i = int(clock.out(t) * SR)
|
||||
m = min(len(clip), len(bus) - i)
|
||||
if m > 0:
|
||||
bus[i:i + m] += clip[:m] * gain
|
||||
bus = bus[:n]
|
||||
tail = int(1.6 * SR)
|
||||
bus[-tail:] *= np.linspace(1, 0, tail)[:, None] ** 1.5
|
||||
peak = np.abs(bus).max()
|
||||
if peak > 0.98:
|
||||
bus *= 0.98 / peak
|
||||
raw = (bus * 32767).astype(np.int16)
|
||||
import wave
|
||||
with wave.open(out_wav, "wb") as f:
|
||||
f.setnchannels(2)
|
||||
f.setsampwidth(2)
|
||||
f.setframerate(SR)
|
||||
f.writeframes(raw.tobytes())
|
||||
|
||||
|
||||
def pulse(song):
|
||||
"""The kick: how hard the low end hits at each track second * FPS, 0..1, decaying."""
|
||||
mono = song.mean(axis=1)
|
||||
hop = SR // FPS
|
||||
frames = len(mono) // hop
|
||||
# a low band by way of a long running mean
|
||||
low = cv2.blur(mono.reshape(-1, 1), (1, 481)).ravel()
|
||||
energy = np.sqrt(np.add.reduce((low[:frames * hop] ** 2).reshape(frames, hop), axis=1) / hop)
|
||||
rise = np.maximum(0.0, np.diff(energy, prepend=0.0))
|
||||
rise /= np.percentile(rise, 99.5) + 1e-6
|
||||
out = np.zeros(frames, np.float32)
|
||||
v = 0.0
|
||||
for i in range(frames):
|
||||
v = max(v * 0.86, min(1.0, float(rise[i])))
|
||||
out[i] = v
|
||||
return out
|
||||
|
||||
|
||||
# ───────────────────────── pictures ─────────────────────────
|
||||
|
||||
class Roll:
|
||||
"""A folder of numbered frames."""
|
||||
|
||||
def __init__(self, folder):
|
||||
self.files = sorted(f for f in os.listdir(folder) if f.endswith(".jpg"))
|
||||
self.folder = folder
|
||||
if not self.files:
|
||||
raise SystemExit("empty take: " + folder)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.files)
|
||||
|
||||
def read(self, i):
|
||||
i = max(0, min(len(self.files) - 1, int(i)))
|
||||
return cv2.imread(os.path.join(self.folder, self.files[i]), cv2.IMREAD_COLOR)
|
||||
|
||||
|
||||
class Shot:
|
||||
def __init__(self, take, at, end, start=0.0, speed=1.0, rate=60, zoom=(1.0, 1.0), pan=(0.0, 0.0), ramp=None, grade=None, into=None, flip=False):
|
||||
self.take, self.at, self.end, self.start, self.speed, self.rate = take, at, end, start, speed, rate
|
||||
self.zoom, self.pan, self.ramp, self.grade, self.into, self.flip = zoom, pan, ramp, grade, into, flip
|
||||
self.after = None
|
||||
|
||||
def source(self, k, seconds):
|
||||
"""Seconds into the take at k (0..1) of the shot. A ramp is [(k, speed), ...]."""
|
||||
if not self.ramp:
|
||||
return self.start + k * seconds * self.speed
|
||||
pts = self.ramp
|
||||
pos, last_k, last_v = 0.0, pts[0][0], pts[0][1]
|
||||
for pk, pv in pts[1:]:
|
||||
if k <= pk:
|
||||
v = last_v + (pv - last_v) * (k - last_k) / max(1e-6, pk - last_k)
|
||||
return self.start + (pos + (k - last_k) * (last_v + v) * 0.5) * seconds
|
||||
pos += (pk - last_k) * (last_v + pv) * 0.5
|
||||
last_k, last_v = pk, pv
|
||||
return self.start + (pos + (k - last_k) * last_v) * seconds
|
||||
|
||||
|
||||
def vignette():
|
||||
y, x = np.mgrid[0:H, 0:W].astype(np.float32)
|
||||
r = np.sqrt(((x - W / 2) / (W / 2)) ** 2 + ((y - H / 2) / (H / 2)) ** 2)
|
||||
return (1.0 - 0.22 * np.clip((r - 0.7) / 0.8, 0, 1) ** 2)[..., None]
|
||||
|
||||
|
||||
def setup(w, h):
|
||||
"""The frame size, and what is made to it."""
|
||||
global W, H, GRAIN, VIG
|
||||
W, H = w, h
|
||||
GRAIN = np.random.default_rng(7).normal(0, 1, (H + 128, W + 128, 1)).astype(np.float32)
|
||||
VIG = vignette()
|
||||
|
||||
|
||||
setup(W, H)
|
||||
|
||||
|
||||
def fit(img, z, dx, dy, roll=0.0):
|
||||
h, w = img.shape[:2]
|
||||
# the take covers the frame: an upright film keeps the middle of a wide take
|
||||
s = max(W / w, H / h) * z
|
||||
c, si = math.cos(math.radians(roll)) * s, math.sin(math.radians(roll)) * s
|
||||
m = np.float32([[c, si, W / 2 - c * w / 2 - si * h / 2 + dx], [-si, c, H / 2 + si * w / 2 - c * h / 2 + dy]])
|
||||
return cv2.warpAffine(img, m, (W, H), flags=cv2.INTER_AREA if s < 1 else cv2.INTER_CUBIC, borderMode=cv2.BORDER_REFLECT)
|
||||
|
||||
|
||||
def aberrate(img, amount):
|
||||
"""Colour fringes that grow towards the edges."""
|
||||
if amount < 0.25:
|
||||
return img
|
||||
b, g, r = cv2.split(img)
|
||||
|
||||
def scaled(ch, k):
|
||||
s = 1 + k / W
|
||||
m = np.float32([[s, 0, W / 2 * (1 - s)], [0, s, H / 2 * (1 - s)]])
|
||||
return cv2.warpAffine(ch, m, (W, H), flags=cv2.INTER_LINEAR, borderMode=cv2.BORDER_REFLECT)
|
||||
|
||||
return cv2.merge((scaled(b, amount * 2), g, scaled(r, -amount * 2)))
|
||||
|
||||
|
||||
def bloom(img, amount):
|
||||
small = cv2.resize(img, (W // 4, H // 4), interpolation=cv2.INTER_AREA).astype(np.float32) / 255
|
||||
hot = np.clip(small - 0.8, 0, 1) * 2.4
|
||||
hot = cv2.GaussianBlur(hot, (0, 0), 14)
|
||||
return img.astype(np.float32) / 255 + cv2.resize(hot, (W, H), interpolation=cv2.INTER_LINEAR) * amount
|
||||
|
||||
|
||||
def finish(f, grade, grain_at):
|
||||
"""f is float BGR 0..1 and may run over."""
|
||||
g = grade or {}
|
||||
f = f * g.get("gain", 1.0)
|
||||
# filmic shoulder, a touch more contrast, teal shadows and warm lights
|
||||
f = f / (1 + np.maximum(f - 0.8, 0) * 1.1)
|
||||
lum = (f * [0.114, 0.587, 0.299]).sum(axis=2, keepdims=True)
|
||||
f = lum + (f - lum) * g.get("sat", 1.14)
|
||||
c = g.get("contrast", 1.1)
|
||||
f = np.clip(f, 0, 1.4)
|
||||
f = 0.5 + (f - 0.5) * c
|
||||
tint = g.get("tint", (0.018, 0.0, -0.014))
|
||||
f = f + (1 - np.clip(lum * 1.6, 0, 1)) * tint - np.clip(lum * 1.6 - 0.6, 0, 1) * tint
|
||||
f = f * VIG
|
||||
ox, oy = grain_at
|
||||
f = f + GRAIN[oy:oy + H, ox:ox + W] * 0.012
|
||||
return (np.clip(f, 0, 1) * 255 + 0.5).astype(np.uint8)
|
||||
|
||||
|
||||
# ───────────────────────── type ─────────────────────────
|
||||
|
||||
class Type:
|
||||
def __init__(self, text, at, end, size=150, x=0.5, y=0.5, how="slam", colour=(255, 255, 255), edge=(22, 58, 24)):
|
||||
self.text, self.at, self.end, self.size, self.x, self.y, self.how = text, at, end, size, x, y, how
|
||||
font = ImageFont.truetype(FONT, size)
|
||||
pad = size // 3
|
||||
box = font.getbbox(text, stroke_width=size // 14)
|
||||
w, h = box[2] - box[0] + pad * 2, box[3] - box[1] + pad * 2
|
||||
im = Image.new("RGBA", (w, h), (0, 0, 0, 0))
|
||||
d = ImageDraw.Draw(im)
|
||||
shadow = Image.new("RGBA", (w, h), (0, 0, 0, 0))
|
||||
ImageDraw.Draw(shadow).text((pad - box[0], pad - box[1] + size // 18), text, font=font, fill=(0, 0, 0, 170), stroke_width=size // 14, stroke_fill=(0, 0, 0, 170))
|
||||
im.alpha_composite(shadow)
|
||||
d.text((pad - box[0], pad - box[1]), text, font=font, fill=colour + (255,), stroke_width=size // 14, stroke_fill=edge + (255,))
|
||||
a = np.asarray(im, np.float32)
|
||||
a[..., 3] /= 255
|
||||
self.rgba = a[..., [2, 1, 0, 3]]
|
||||
|
||||
def draw(self, f, t, jolt):
|
||||
life = t - self.at
|
||||
left = self.end - t
|
||||
k = min(1.0, life / (0.1 if self.how == "slam" else 0.28))
|
||||
ease = 1 - (1 - k) ** 3
|
||||
if self.how == "slam":
|
||||
scale, alpha = 1.55 - 0.55 * ease, min(1.0, life / 0.03)
|
||||
elif self.how == "rise":
|
||||
scale, alpha = 1.0 + 0.04 * life, ease
|
||||
else:
|
||||
scale, alpha = 1.0, ease
|
||||
alpha *= min(1.0, left / 0.08)
|
||||
if alpha <= 0:
|
||||
return f
|
||||
h, w = self.rgba.shape[:2]
|
||||
nw, nh = max(2, int(w * scale)), max(2, int(h * scale))
|
||||
lay = cv2.resize(self.rgba, (nw, nh), interpolation=cv2.INTER_AREA if scale < 1 else cv2.INTER_LINEAR)
|
||||
cx = int(self.x * W + random.uniform(-1, 1) * jolt * 6)
|
||||
cy = int(self.y * H + random.uniform(-1, 1) * jolt * 6 + (0 if self.how != "rise" else (1 - ease) * 24))
|
||||
x0, y0 = cx - nw // 2, cy - nh // 2
|
||||
ax0, ay0, ax1, ay1 = max(0, x0), max(0, y0), min(W, x0 + nw), min(H, y0 + nh)
|
||||
if ax0 >= ax1 or ay0 >= ay1:
|
||||
return f
|
||||
part = lay[ay0 - y0:ay1 - y0, ax0 - x0:ax1 - x0]
|
||||
a = part[..., 3:] * alpha
|
||||
f[ay0:ay1, ax0:ax1] = f[ay0:ay1, ax0:ax1] * (1 - a) + part[..., :3] * a
|
||||
return f
|
||||
|
||||
|
||||
class Logo:
|
||||
def __init__(self, path, at, end, width=1100, y=0.42):
|
||||
im = cv2.imread(path, cv2.IMREAD_UNCHANGED).astype(np.float32)
|
||||
im[..., 3] /= 255
|
||||
s = width / im.shape[1]
|
||||
self.rgba = cv2.resize(im, (width, int(im.shape[0] * s)), interpolation=cv2.INTER_AREA)
|
||||
self.at, self.end, self.y = at, end, y
|
||||
|
||||
def draw(self, f, t, jolt):
|
||||
k = min(1.0, (t - self.at) / 0.14)
|
||||
ease = 1 - (1 - k) ** 3
|
||||
scale = 1.5 - 0.5 * ease
|
||||
h, w = self.rgba.shape[:2]
|
||||
nw, nh = int(w * scale), int(h * scale)
|
||||
lay = cv2.resize(self.rgba, (nw, nh), interpolation=cv2.INTER_AREA)
|
||||
x0, y0 = W // 2 - nw // 2, int(self.y * H) - nh // 2
|
||||
cut = lay[max(0, -y0):, max(0, -x0):]
|
||||
x0, y0 = max(0, x0), max(0, y0)
|
||||
cut = cut[:H - y0, :W - x0]
|
||||
a = cut[..., 3:] * min(1.0, (t - self.at) / 0.04)
|
||||
hh, ww = cut.shape[:2]
|
||||
f[y0:y0 + hh, x0:x0 + ww] = f[y0:y0 + hh, x0:x0 + ww] * (1 - a) + cut[..., :3] * a
|
||||
return f
|
||||
|
||||
|
||||
# ───────────────────────── the render ─────────────────────────
|
||||
|
||||
def render(edl, out, span=None):
|
||||
clock = Clock(edl.KEEP)
|
||||
song = decode(getattr(edl, "TRACK", TRACK)) * getattr(edl, "TRACK_GAIN", 1.0)
|
||||
kick = pulse(song)
|
||||
shots = sorted(edl.SHOTS, key=lambda s: s.at)
|
||||
for a, b in zip(shots, shots[1:]):
|
||||
b.after = a.into
|
||||
rolls = {}
|
||||
for s in shots:
|
||||
rolls.setdefault(s.take, Roll(os.path.join(edl.ROLLS, s.take)))
|
||||
wav = out + ".wav"
|
||||
mix(song, clock, getattr(edl, "SFX", []), wav)
|
||||
first, last = 0, int(clock.total * FPS)
|
||||
if span:
|
||||
first, last = int(clock.out(span[0]) * FPS), int(clock.out(span[1]) * FPS)
|
||||
cmd = ["ffmpeg", "-y", "-v", "error", "-f", "rawvideo", "-pix_fmt", "bgr24", "-s", f"{W}x{H}", "-r", str(FPS), "-i", "-",
|
||||
"-ss", f"{first / FPS:.3f}", "-t", f"{(last - first) / FPS:.3f}", "-i", wav,
|
||||
"-map", "0:v", "-map", "1:a", "-c:v", "h264_nvenc", "-preset", "p6", "-rc", "vbr", "-cq", "20", "-b:v", "16M", "-maxrate", "30M",
|
||||
"-pix_fmt", "yuv420p", "-c:a", "aac", "-b:a", "320k", "-shortest", out]
|
||||
pipe = subprocess.Popen(cmd, stdin=subprocess.PIPE)
|
||||
hits = getattr(edl, "FLASH", [])
|
||||
types = getattr(edl, "TYPE", [])
|
||||
pool = ThreadPoolExecutor(6)
|
||||
rng = random.Random(3)
|
||||
idx = 0
|
||||
|
||||
def active(tt):
|
||||
for s in reversed(shots):
|
||||
if s.at <= tt < s.end:
|
||||
return s
|
||||
return None
|
||||
|
||||
def frame_of(s, tt):
|
||||
len_track = clock.out(s.end) - clock.out(s.at)
|
||||
k = (clock.out(tt) - clock.out(s.at)) / max(1e-6, len_track)
|
||||
src = s.source(k, len_track)
|
||||
i = src * s.rate
|
||||
step = abs(s.speed if not s.ramp else max(v for _, v in s.ramp)) * s.rate / FPS
|
||||
roll = rolls[s.take]
|
||||
if step > 1.5:
|
||||
n = min(5, int(step))
|
||||
parts = list(pool.map(lambda j: roll.read(i + j * step / n).astype(np.float32), range(n)))
|
||||
img = (sum(parts) / n).astype(np.uint8)
|
||||
else:
|
||||
img = roll.read(i)
|
||||
z = s.zoom[0] + (s.zoom[1] - s.zoom[0]) * k
|
||||
px, py = s.pan if isinstance(s.pan[0], (int, float)) else (s.pan[0][0] + (s.pan[1][0] - s.pan[0][0]) * k, s.pan[0][1] + (s.pan[1][1] - s.pan[0][1]) * k)
|
||||
if s.flip:
|
||||
img = img[:, ::-1]
|
||||
return img, z, px, py, k
|
||||
|
||||
for n in range(first, last):
|
||||
t = n / FPS
|
||||
tt = clock.track(t)
|
||||
s = active(tt)
|
||||
if s is None:
|
||||
pipe.stdin.write(np.zeros((H, W, 3), np.uint8).tobytes())
|
||||
continue
|
||||
kick_v = float(kick[min(len(kick) - 1, int(tt * FPS))]) * getattr(edl, "REACT", lambda x: 1.0)(tt)
|
||||
img, z, px, py, k = frame_of(s, tt)
|
||||
z *= 1 + getattr(edl, "PUNCH", 0.028) * kick_v
|
||||
shake = getattr(edl, "SHAKE", 9) * kick_v ** 2
|
||||
dx = px + rng.uniform(-shake, shake)
|
||||
dy = py + rng.uniform(-shake, shake)
|
||||
pic = fit(img, z, dx, dy)
|
||||
# whip: the tail of a shot smears out and the head of the next smears in, sideways, off the beat grid's hit
|
||||
gap_out = clock.out(s.end) - t
|
||||
gap_in = t - clock.out(s.at)
|
||||
for how, left, way in ((s.into, gap_out, 1), (s.after, gap_in, -1)):
|
||||
if how == "whip" and left < 0.1:
|
||||
p = 1 - left / 0.1
|
||||
ks = int(4 + p * p * 240) | 1
|
||||
pic = cv2.blur(np.roll(pic, int(p * p * 460) * way, axis=1), (ks, 1))
|
||||
pic = aberrate(pic, getattr(edl, "ABERRATE", 3.2) * kick_v)
|
||||
f = bloom(pic, 0.5 + 0.35 * kick_v)
|
||||
flash = 0.0
|
||||
for at, power in hits:
|
||||
d = t - clock.out(at)
|
||||
if 0 <= d < 0.22:
|
||||
flash = max(flash, power * (1 - d / 0.22) ** 2)
|
||||
if flash:
|
||||
f = f + flash
|
||||
o = finish(f, s.grade, (rng.randrange(128), rng.randrange(128))).astype(np.float32)
|
||||
fade = getattr(edl, "BLACK", lambda x: 0.0)(tt)
|
||||
if fade:
|
||||
o *= 1 - fade
|
||||
for ty in types:
|
||||
if ty.at <= tt < ty.end:
|
||||
o = ty.draw(o, tt, kick_v)
|
||||
pipe.stdin.write(np.clip(o, 0, 255).astype(np.uint8).tobytes())
|
||||
idx += 1
|
||||
if idx % 300 == 0:
|
||||
print(f"{idx}/{last - first}", flush=True)
|
||||
pipe.stdin.close()
|
||||
pipe.wait()
|
||||
os.remove(wav)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# the cuts share looks.py and vertical.py from here, and -I leaves this folder off the path
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
spec = importlib.util.spec_from_file_location("edl", sys.argv[1])
|
||||
edl = importlib.util.module_from_spec(spec)
|
||||
sys.modules["edl"] = edl
|
||||
sys.modules["cut"] = sys.modules["__main__"]
|
||||
spec.loader.exec_module(edl)
|
||||
setup(*getattr(edl, "SIZE", (1920, 1080)))
|
||||
render(edl, sys.argv[2], (float(sys.argv[3]), float(sys.argv[4])) if len(sys.argv) > 4 else None)
|
||||
174
Tools/Trailer/edl.py
Normal file
174
Tools/Trailer/edl.py
Normal file
@ -0,0 +1,174 @@
|
||||
"""The trailer. Times are seconds of the song. The song still leads, but the picture is the game, not a dance: the crew
|
||||
work out of step, the kick only nudges the frame, and first-person takes show what playing it is like. The bridge is
|
||||
left out of the song: the last chorus comes straight after the second verse."""
|
||||
from cut import Logo, Shot, Type
|
||||
import os
|
||||
|
||||
from cut import PROJECT
|
||||
from looks import BAR, BARE, BEAT, DUSK, GOLD, HOT, LOGO, NIGHT, PLAY, clip, runner # noqa: F401
|
||||
|
||||
# shot again on the build of 5 November: the new crew, the deck, the house, drones, belts, vending machines, weather
|
||||
ROLLS = os.path.join(PROJECT, "Builds", "Trailer", "rolls_1105")
|
||||
|
||||
KEEP = [(2.2, 60.58), (75.1, 97.77), (116.1, 170.0)]
|
||||
PUNCH, SHAKE, ABERRATE = 0.012, 3.5, 1.4
|
||||
|
||||
S = Shot
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
|
||||
|
||||
# ───────────────────────── cold open ─────────────────────────
|
||||
run(2.2,
|
||||
(5.8, "o_space_k", {"speed": 1.5, "zoom": (1.0, 1.04), "grade": {"sat": 1.1, "contrast": 1.06, "tint": (0, 0, 0)}}),
|
||||
(5.4, "o_dive", {"speed": 0.84, "grade": GOLD, "into": "whip"}),
|
||||
(1.93, "o_skim", {"start": 2.2, "speed": 1.35, "grade": GOLD, "into": "whip"}),
|
||||
(BEAT * 4, "o_giant", {"start": 0.6, "speed": 0.7, "grade": GOLD}),
|
||||
)
|
||||
# the crew, one by one
|
||||
t = 15.33 + BEAT * 4
|
||||
for i in range(8):
|
||||
SHOTS.append(S(f"p_{i}", t, t + BEAT, start=0.8, speed=1.0, zoom=(1.0, 1.03), grade=HOT))
|
||||
t += BEAT
|
||||
run(t,
|
||||
(BEAT * 2, "c_swing", {"start": 0.5, "grade": HOT}),
|
||||
(0, "m_blade", {"rate": 120, "start": 0.4, "speed": 0.5, "grade": GOLD}),
|
||||
until=22.9)
|
||||
|
||||
# ───────────────────────── chorus: what you do here ─────────────────────────
|
||||
run(22.9,
|
||||
(2.1, "c_swing_s", {"rate": 120, "start": 1.2, "speed": 0.5, "grade": HOT}),
|
||||
(BAR, "g_scythe", {"start": 1.0, "grade": PLAY}),
|
||||
(BAR, "c_rider_side", {"start": 0.2, "grade": HOT, "zoom": (1.0, 1.04)}),
|
||||
(BAR, "c_combine_over", {"start": 1.34, "grade": HOT}),
|
||||
(BAR, "v_sixteen", {"start": 1.2, "grade": HOT}),
|
||||
(BAR, "c_top", {"start": 1.2, "grade": HOT}),
|
||||
(BAR, "c_tractor", {"start": 1.3, "grade": HOT}),
|
||||
(0, "c_rider", {"start": 0.2, "grade": HOT}),
|
||||
until=38.23)
|
||||
|
||||
# ───────────────────────── verse one: from nail scissors up ─────────────────────────
|
||||
run(38.23,
|
||||
(1.6, "v_around", {"start": 0.2, "speed": 1.6, "grade": HOT}),
|
||||
(1.5, "g_scissors", {"start": 1.0, "grade": PLAY}),
|
||||
(0.9, "v_scissors", {"start": 0.6, "grade": HOT}),
|
||||
(1.0, "g_shears", {"start": 1.0, "grade": PLAY}),
|
||||
(0.8, "v_snip", {"start": 0.6, "grade": HOT}),
|
||||
(1.0, "g_sickle", {"start": 1.0, "grade": PLAY}),
|
||||
(1.5, "v_knees", {"start": 0.2, "speed": 0.9, "grade": HOT}),
|
||||
(1.6, "g_wide", {"start": 1.2, "grade": PLAY}),
|
||||
(1.6, "v_strip", {"rate": 30, "start": 1.6, "speed": 3.0, "grade": HOT, "zoom": (1.2, 1.3), "pan": (70.0, 0.0)}),
|
||||
(1.6, "g_deposit", {"start": 1.0, "grade": PLAY}),
|
||||
(1.4, "v_sunset", {"rate": 30, "start": 0.0, "speed": 1.5, "grade": DUSK}),
|
||||
(1.3, "n_line", {"start": 0.8, "grade": NIGHT}),
|
||||
(1.3, "n_tractor", {"start": 0.8, "grade": NIGHT}),
|
||||
(1.7, "v_phone", {"start": 0.3, "grade": HOT}),
|
||||
(1.5, "v_sixteen_end", {"start": 0.6, "grade": HOT}),
|
||||
(1.2, "v_rhythm", {"start": 0.3, "grade": HOT}),
|
||||
(0, "g_coop", {"start": 1.0, "grade": PLAY}),
|
||||
until=60.58)
|
||||
|
||||
# ───────────────────────── verse two: machines and a factory ─────────────────────────
|
||||
run(75.1,
|
||||
(1.4, "w_wheels", {"start": 1.0, "speed": 0.8, "grade": HOT}),
|
||||
(1.4, "g_ride", {"start": 1.5, "grade": PLAY}),
|
||||
(1.2, "w_trucks", {"start": 2.3, "grade": HOT}),
|
||||
(1.4, "g_combine", {"start": 2.0, "grade": PLAY}),
|
||||
(1.2, "b_header", {"rate": 120, "start": 0.6, "speed": 0.5, "grade": HOT}),
|
||||
(1.6, "y_house", {"start": 0.8, "grade": GOLD}),
|
||||
(1.6, "k_grow", {"start": 3.0, "speed": 1.4, "grade": HOT}),
|
||||
(0.9, "k_hammer", {"start": 0.6, "grade": HOT}),
|
||||
(1.5, "y_belts", {"start": 0.6, "grade": HOT}),
|
||||
(1.6, "y_drones", {"start": 0.4, "grade": GOLD}),
|
||||
(1.6, "k_robots", {"start": 1.6, "grade": HOT}),
|
||||
(1.4, "y_vending", {"start": 0.6, "grade": DUSK}),
|
||||
(1.5, "y_fp_beer", {"start": 3.0, "grade": PLAY}),
|
||||
(1.2, "c_combine_top", {"start": 0.8, "grade": HOT}),
|
||||
(1.2, "b_line", {"rate": 120, "start": 1.0, "speed": 0.5, "grade": HOT}),
|
||||
(1.4, "w_three", {"start": 0.3, "grade": GOLD}),
|
||||
(0, "n_air", {"start": 0.3, "grade": NIGHT}),
|
||||
until=97.77)
|
||||
|
||||
# ───────────────────────── last chorus: everyone, everything ─────────────────────────
|
||||
run(116.1,
|
||||
(BAR, "f_hero", {"start": 0.4, "grade": HOT, "zoom": (1.0, 1.04)}),
|
||||
(BAR, "f_in", {"start": 0.0, "grade": HOT}),
|
||||
(BAR, "f_air", {"start": 0.6, "grade": HOT}),
|
||||
(BAR, "y_twister", {"start": 1.2, "grade": HOT}),
|
||||
(BAR, "b_grass", {"rate": 120, "start": 0.2, "speed": 0.5, "grade": GOLD}),
|
||||
(BAR, "y_ufo", {"start": 0.4, "grade": DUSK}),
|
||||
(BAR, "c_line", {"start": 1.2, "grade": HOT}),
|
||||
(0, "f_in", {"start": 1.6, "grade": HOT}),
|
||||
until=131.03)
|
||||
run(131.03,
|
||||
(9.0, "e_cut_k", {"speed": 1.0, "zoom": (1.0, 1.05), "grade": {"sat": 1.1, "contrast": 1.08, "tint": (0, 0, 0)}}),
|
||||
(BAR, "f_hero", {"start": 2.0, "grade": HOT}),
|
||||
(BAR, "y_acid", {"start": 0.4, "grade": HOT}),
|
||||
(2.0, "f_in", {"start": 0.9, "speed": 0.9, "grade": HOT}),
|
||||
(0, "f_air", {"start": 0.2, "speed": 0.9, "grade": HOT, "zoom": (1.0, 1.06)}),
|
||||
until=147.72)
|
||||
|
||||
# ───────────────────────── nothing left ─────────────────────────
|
||||
run(147.72,
|
||||
(2.6, "e_bare", {"start": 1.0, "speed": 0.9, "grade": BARE}),
|
||||
(5.0, "e_crew", {"speed": 0.85, "grade": BARE}),
|
||||
(2.4, "e_look", {"start": 0.3, "speed": 0.7, "grade": BARE}),
|
||||
(0, "e_up", {"speed": 0.48, "zoom": (1.0, 1.08), "grade": dict(BARE, sat=1.2)}),
|
||||
until=170.0)
|
||||
|
||||
FLASH = [(22.9, 0.5), (75.1, 0.3), (116.1, 0.6), (159.0, 0.7)]
|
||||
|
||||
|
||||
def REACT(t):
|
||||
if t < 22.9:
|
||||
return 0.25
|
||||
if t < 38.2:
|
||||
return 0.6
|
||||
if t < 97.8:
|
||||
return 0.35
|
||||
if t < 147.7:
|
||||
return 0.7
|
||||
if t < 159:
|
||||
return 0.0
|
||||
return 0.4
|
||||
|
||||
|
||||
def BLACK(t):
|
||||
if t < 2.7:
|
||||
return 1 - (t - 2.2) / 0.5
|
||||
if t > 168.6:
|
||||
return min(1.0, (t - 168.6) / 1.2)
|
||||
return 0.0
|
||||
|
||||
|
||||
TYPE = [
|
||||
Type("HERBARIA-7", 5.75, 8.0, 150, y=0.5, how="rise"),
|
||||
Type("EARTH HAS RUN OUT OF GRASS", 8.5, 10.9, 84, y=0.2, how="rise"),
|
||||
Type("THIS PLANET HAS TOO MUCH", 11.1, 13.35, 84, y=0.2, how="rise"),
|
||||
Type("MOW IT!", 23.0, 24.95, 210, y=0.74, how="slam"),
|
||||
Type("ALL OF IT", 28.74, 30.5, 170, how="slam"),
|
||||
Type("TOGETHER", 30.6, 32.4, 170, y=0.78, how="slam"),
|
||||
Type("THE WHOLE PLANET", 36.3, 38.2, 150, how="slam"),
|
||||
Type("START SMALL", 39.85, 42.3, 120, y=0.82, how="rise"),
|
||||
Type("GROW BIGGER", 44.5, 47.0, 120, y=0.82, how="rise"),
|
||||
Type("UP TO 16 PLAYERS", 57.05, 58.5, 120, y=0.82, how="slam"),
|
||||
Type("DRIVE IT", 75.2, 77.9, 150, y=0.8, how="slam"),
|
||||
Type("BUILD IT", 81.7, 83.3, 150, y=0.8, how="slam"),
|
||||
Type("AUTOMATE IT", 85.8, 88.9, 150, y=0.8, how="slam"),
|
||||
Type("MOW IT!", 116.1, 118.0, 240, how="slam"),
|
||||
Type("TAKE THE WHOLE PLANET", 129.0, 131.0, 130, how="slam"),
|
||||
Type("ZERO GRASS REMAINING", 150.6, 154.8, 92, y=0.22, how="rise"),
|
||||
Type("WAIT...", 155.6, 157.9, 92, y=0.78, how="rise"),
|
||||
Type("WISHLIST NOW ON STEAM", 161.0, 170.0, 76, y=0.76, how="rise"),
|
||||
Type("CO-OP FOR 1 TO 16 PLAYERS", 162.0, 170.0, 50, y=0.85, how="rise", colour=(226, 240, 200)),
|
||||
Logo(LOGO, 159.0, 170.0, 1180, 0.4),
|
||||
]
|
||||
_names = ["HANK", "OTIS", "LIN", "RUSTAM", "MARCUS", "GUS", "WADE", "KENJI"]
|
||||
for i, n in enumerate(_names):
|
||||
TYPE.append(Type(n, 15.33 + BEAT * (4 + i), 15.33 + BEAT * (5 + i), 96, x=0.2, y=0.84, how="slam"))
|
||||
|
||||
SFX = [(40.0, clip("snip"), 0.5), (41.5, clip("shears_snip_1"), 0.7), (42.6, clip("shears_snip_2"), 0.7)]
|
||||
SFX += [(22.9, clip("scythe_swing_1"), 0.5), (116.1, clip("scythe_swing_2"), 0.5)]
|
||||
SFX += [(50.75, clip("cash_register"), 0.6)]
|
||||
SFX += [(82.5, clip("build_place"), 0.7)]
|
||||
SFX += [(159.0, clip("confetti"), 0.7)]
|
||||
125
Tools/Trailer/gameplay.py
Normal file
125
Tools/Trailer/gameplay.py
Normal file
@ -0,0 +1,125 @@
|
||||
"""The gameplay trailer: the game's own music, and the game shown as it plays, most of it through the player's eyes with the
|
||||
HUD. Times are seconds of music_game_loop.wav, which beats at 79.5 a minute; every shot is a whole number of beats."""
|
||||
import os
|
||||
|
||||
from cut import Logo, Type
|
||||
from looks import AUDIO, GOLD, HOT, LOGO, NIGHT, PLAY, ROLLS, SPACE, clip, runner # noqa: F401
|
||||
|
||||
TRACK = os.path.join(AUDIO, "music_game_loop.wav")
|
||||
TRACK_GAIN = 0.75
|
||||
B = 60 / 79.5
|
||||
KEEP = [(0.0, 103.5)]
|
||||
PUNCH, SHAKE, ABERRATE = 0.006, 1.5, 0.8
|
||||
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
|
||||
run(0.0,
|
||||
(B * 6, "o_space_k", {"speed": 1.2, "zoom": (1.0, 1.04), "grade": SPACE}),
|
||||
(B * 4, "o_skim", {"start": 1.0, "speed": 1.2, "grade": GOLD}),
|
||||
# the tools, one after another
|
||||
(B * 5, "g_scissors", {"start": 0.1, "grade": PLAY}),
|
||||
(B * 3, "g_shears", {"start": 0.8, "grade": PLAY}),
|
||||
(B * 3, "g_sickle", {"start": 0.8, "grade": PLAY}),
|
||||
(B * 4, "g_scythe", {"start": 1.2, "grade": PLAY}),
|
||||
(B * 5, "g_deposit", {"start": 0.1, "grade": PLAY}),
|
||||
(B * 4, "g_supply", {"start": 0.0, "grade": PLAY}),
|
||||
(B * 4, "g_shop", {"start": 0.4, "grade": PLAY}),
|
||||
(B * 4, "g_wide", {"start": 1.5, "grade": PLAY}),
|
||||
# together
|
||||
(B * 5, "g_coop", {"start": 1.5, "grade": PLAY}),
|
||||
(B * 4, "v_sixteen", {"start": 0.9, "grade": HOT}),
|
||||
(B * 3, "c_line", {"start": 1.2, "grade": HOT}),
|
||||
# the factory
|
||||
(B * 6, "g_build", {"start": 0.3, "grade": PLAY}),
|
||||
(B * 4, "k_grow", {"start": 2.5, "grade": HOT}),
|
||||
(B * 4, "k_belt", {"start": 0.3, "grade": HOT}),
|
||||
(B * 4, "k_robots", {"start": 0.4, "grade": HOT}),
|
||||
# the machines
|
||||
(B * 5, "g_ride", {"start": 1.5, "grade": PLAY}),
|
||||
(B * 4, "g_combine", {"start": 2.0, "grade": PLAY}),
|
||||
(B * 3, "c_tractor", {"start": 1.2, "grade": HOT}),
|
||||
(B * 3, "w_trucks", {"start": 1.6, "grade": HOT}),
|
||||
# night, the planet, the crew
|
||||
(B * 4, "n_line", {"start": 0.8, "grade": NIGHT}),
|
||||
(B * 3, "n_tractor", {"start": 0.7, "grade": NIGHT}),
|
||||
(B * 4, "g_map", {"start": 0.0, "grade": PLAY}),
|
||||
(B * 4, "c_ring", {"start": 0.8, "grade": GOLD}),
|
||||
(B * 4, "g_character", {"start": 0.0, "grade": PLAY}),
|
||||
(B * 4, "f_air", {"start": 0.6, "grade": HOT}),
|
||||
(B * 8, "e_cut_k", {"speed": 1.4, "zoom": (1.0, 1.05), "grade": SPACE}),
|
||||
(0, "e_up", {"speed": 0.4, "zoom": (1.0, 1.08), "grade": dict(GOLD, sat=1.2)}),
|
||||
until=103.5)
|
||||
|
||||
|
||||
def at(take):
|
||||
return next(s.at for s in SHOTS if s.take == take)
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.15
|
||||
|
||||
|
||||
def BLACK(t):
|
||||
if t < 0.5:
|
||||
return 1 - t / 0.5
|
||||
if t > 102.0:
|
||||
return min(1.0, (t - 102.0) / 1.4)
|
||||
return 0.0
|
||||
|
||||
|
||||
FLASH = [(at("e_up"), 0.5)]
|
||||
|
||||
|
||||
def caption(text, take, beats=None, size=72):
|
||||
a = at(take) + 0.15
|
||||
end = next(s.end for s in SHOTS if s.take == take) if beats is None else a + beats * B
|
||||
return Type(text, a, end - 0.1, size, y=0.86, how="rise")
|
||||
|
||||
|
||||
TYPE = [
|
||||
Type("EARTH HAS RUN OUT OF GRASS", 0.6, at("o_skim") - 0.1, 84, y=0.2, how="rise"),
|
||||
Type("HERBARIA-7 HAS TOO MUCH", at("o_skim") + 0.1, at("g_scissors") - 0.1, 84, y=0.2, how="rise"),
|
||||
caption("START WITH NAIL SCISSORS", "g_scissors"),
|
||||
caption("CASH IN, BUY BETTER BLADES", "g_shears", 10),
|
||||
caption("HAND IN WHAT YOU CUT", "g_deposit"),
|
||||
caption("GEAR UP", "g_supply"),
|
||||
caption("UNLOCK UPGRADES", "g_shop"),
|
||||
caption("WIDER BLADES, BIGGER STRIPS", "g_wide"),
|
||||
caption("MOW WITH YOUR FRIENDS", "g_coop"),
|
||||
caption("UP TO 16 PLAYERS", "v_sixteen", 7),
|
||||
caption("BUILD A GRASS FACTORY", "g_build", 10),
|
||||
caption("BELTS, PRESSES, BALERS", "k_belt"),
|
||||
caption("ROBOTS THAT MOW FOR YOU", "k_robots"),
|
||||
caption("DRIVE MOWERS, TRACTORS AND COMBINES", "g_ride", 15, 64),
|
||||
caption("WORK THROUGH THE NIGHT", "n_line", 7),
|
||||
caption("A WHOLE PLANET TO CLEAR", "g_map", 8),
|
||||
caption("PICK YOUR CREW", "g_character"),
|
||||
caption("MOW IT ALL", "f_air"),
|
||||
caption("UNTIL NOT A BLADE IS LEFT", "e_cut_k", 7),
|
||||
Logo(LOGO, at("e_up"), 103.5, 1180, 0.4),
|
||||
Type("WISHLIST NOW ON STEAM", at("e_up") + 2.0, 103.5, 76, y=0.76, how="rise"),
|
||||
Type("CO-OP FOR 1 TO 16 PLAYERS", at("e_up") + 3.0, 103.5, 50, y=0.85, how="rise", colour=(226, 240, 200)),
|
||||
]
|
||||
|
||||
|
||||
def loop(name, take, gain, beats=None):
|
||||
a = at(take)
|
||||
end = next(s.end for s in SHOTS if s.take == take) if beats is None else a + beats * B
|
||||
return (a, clip(name), gain, end - a)
|
||||
|
||||
|
||||
SFX = [loop("grass_rustle_loop", "g_scissors", 0.35, 15), loop("grass_rustle_loop", "g_wide", 0.35, 9)]
|
||||
SFX += [(at("g_scissors") + 0.3 + 0.6 * i, clip("snip"), 0.3) for i in range(6)]
|
||||
SFX += [(at("g_shears") + 0.2 + 0.7 * i, clip("shears_snip_%d" % (i % 2 + 1)), 0.35) for i in range(3)]
|
||||
SFX += [(at("g_sickle") + 0.3 + 0.8 * i, clip("scythe_swing_%d" % (i % 3 + 1)), 0.3) for i in range(7)]
|
||||
SFX += [(at("g_wide") + 0.4 + 0.9 * i, clip("scythe_swing_%d" % (i % 3 + 1)), 0.3) for i in range(7)]
|
||||
SFX += [(at("g_deposit") + 1.9, clip("cash_register"), 0.6), (at("g_deposit") + 2.1, clip("coin_tick"), 0.4)]
|
||||
SFX += [(at("g_supply") + 0.05, clip("ui_open"), 0.5), (at("g_shop") + 0.05, clip("ui_open"), 0.5), (at("g_shop") + 1.8, clip("perk_unlock"), 0.5)]
|
||||
SFX += [(at("g_build") + 2.7, clip("build_place"), 0.7)]
|
||||
SFX += [loop("conveyor_loop", "k_belt", 0.4), (at("k_belt") + 1.2, clip("press_thump"), 0.5)]
|
||||
SFX += [loop("robot_mower_loop", "k_robots", 0.4), (at("k_robots") + 0.8, clip("robot_chirp"), 0.5)]
|
||||
SFX += [loop("mower_engine_loop", "g_ride", 0.45), loop("combine_engine_loop", "g_combine", 0.45), loop("tractor_engine_loop", "c_tractor", 0.4, 6)]
|
||||
SFX += [loop("night_crickets_loop", "n_line", 0.5, 7)]
|
||||
SFX += [(at("g_map") + 0.05, clip("ui_open"), 0.5), (at("g_character") + 0.05, clip("ui_open"), 0.5)]
|
||||
SFX += [(at("e_cut_k") + 0.5, clip("sector_clear"), 0.5), (at("e_up"), clip("milestone"), 0.6), (at("e_up") + 0.1, clip("confetti"), 0.6)]
|
||||
44
Tools/Trailer/grid.py
Normal file
44
Tools/Trailer/grid.py
Normal file
@ -0,0 +1,44 @@
|
||||
"""Contact sheets of a rendered cut. py -I grid.py in.mp4 outdir step [from to]"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
src, out, step = sys.argv[1], sys.argv[2], float(sys.argv[3])
|
||||
start = float(sys.argv[4]) if len(sys.argv) > 4 else 0.0
|
||||
cap = cv2.VideoCapture(src)
|
||||
fps = cap.get(cv2.CAP_PROP_FPS)
|
||||
end = float(sys.argv[5]) if len(sys.argv) > 5 else cap.get(cv2.CAP_PROP_FRAME_COUNT) / fps
|
||||
os.makedirs(out, exist_ok=True)
|
||||
upright = cap.get(cv2.CAP_PROP_FRAME_HEIGHT) > cap.get(cv2.CAP_PROP_FRAME_WIDTH)
|
||||
cols, rows, w, h = (8, 3, 240, 427) if upright else (5, 6, 400, 225)
|
||||
cells, page, t = [], 0, start
|
||||
|
||||
|
||||
def flush():
|
||||
global cells, page
|
||||
if not cells:
|
||||
return
|
||||
while len(cells) % cols:
|
||||
cells.append(np.zeros((h, w, 3), np.uint8))
|
||||
sheet = np.vstack([np.hstack(cells[i:i + cols]) for i in range(0, len(cells), cols)])
|
||||
page += 1
|
||||
cv2.imwrite(os.path.join(out, f"page{page:02d}.jpg"), sheet, [cv2.IMWRITE_JPEG_QUALITY, 85])
|
||||
cells = []
|
||||
|
||||
|
||||
while t < end:
|
||||
cap.set(cv2.CAP_PROP_POS_MSEC, t * 1000)
|
||||
ok, f = cap.read()
|
||||
if not ok:
|
||||
break
|
||||
f = cv2.resize(f, (w, h), interpolation=cv2.INTER_AREA)
|
||||
cv2.putText(f, f"{t:.1f}", (6, 20), cv2.FONT_HERSHEY_SIMPLEX, 0.55, (0, 0, 0), 3, cv2.LINE_AA)
|
||||
cv2.putText(f, f"{t:.1f}", (6, 20), cv2.FONT_HERSHEY_SIMPLEX, 0.55, (255, 255, 255), 1, cv2.LINE_AA)
|
||||
cells.append(f)
|
||||
if len(cells) == cols * rows:
|
||||
flush()
|
||||
t += step
|
||||
flush()
|
||||
print(page)
|
||||
75
Tools/Trailer/lipsync.json
Normal file
75
Tools/Trailer/lipsync.json
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"earth": {
|
||||
"clip": "ArtSource/Trailer/boss/dir_earth.wav",
|
||||
"from": 0.0,
|
||||
"to": 2.7999375,
|
||||
"parts": [
|
||||
{
|
||||
"take": "d_earth_0",
|
||||
"at": 0.0,
|
||||
"secs": 1.75,
|
||||
"loop": "boss_angry",
|
||||
"first": 44,
|
||||
"speed": 1.0,
|
||||
"score": 0.762
|
||||
},
|
||||
{
|
||||
"take": "d_earth_1",
|
||||
"at": 1.75,
|
||||
"secs": 1.125,
|
||||
"loop": "boss_angry",
|
||||
"first": 122,
|
||||
"speed": 0.8,
|
||||
"score": 0.97
|
||||
}
|
||||
]
|
||||
},
|
||||
"scissors": {
|
||||
"clip": "ArtSource/Trailer/boss/dir_scissors.wav",
|
||||
"from": 0.0,
|
||||
"to": 2.5095,
|
||||
"parts": [
|
||||
{
|
||||
"take": "d_scissors_0",
|
||||
"at": 0.0,
|
||||
"secs": 2.5833333333333335,
|
||||
"loop": "boss_angry",
|
||||
"first": 85,
|
||||
"speed": 1.1,
|
||||
"score": 0.823
|
||||
}
|
||||
]
|
||||
},
|
||||
"did": {
|
||||
"clip": "ArtSource/Trailer/boss/dir_did.wav",
|
||||
"from": 0.0,
|
||||
"to": 3.0155625,
|
||||
"parts": [
|
||||
{
|
||||
"take": "d_did_0",
|
||||
"at": 0.0,
|
||||
"secs": 3.0833333333333335,
|
||||
"loop": "boss_stern",
|
||||
"first": 75,
|
||||
"speed": 1.0,
|
||||
"score": 0.605
|
||||
}
|
||||
]
|
||||
},
|
||||
"noted": {
|
||||
"clip": "ArtSource/Trailer/boss/asst_noted.wav",
|
||||
"from": 0.0,
|
||||
"to": 2.77775,
|
||||
"parts": [
|
||||
{
|
||||
"take": "d_noted_0",
|
||||
"at": 0.0,
|
||||
"secs": 2.8333333333333335,
|
||||
"loop": "asst_fed",
|
||||
"first": 13,
|
||||
"speed": 1.0,
|
||||
"score": 0.705
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
206
Tools/Trailer/lipsync.py
Normal file
206
Tools/Trailer/lipsync.py
Normal file
@ -0,0 +1,206 @@
|
||||
"""Lip sync by casting, not by animation: the Director's and the assistant's filmed loops (ArtSource/Director/video) are
|
||||
searched for the stretch whose mouth opens and shuts most like the line being spoken, and that stretch becomes a take.
|
||||
|
||||
The mouth is found by following the eyes (template matching against the first frame) and measuring how much of a box under
|
||||
the nose is dark (an open mouth shows its inside). The line's loudness, frame by frame at the loop's 24 fps, is compared with
|
||||
that, over every loop of the right mood, every start and a few speeds. A line is split at its pauses, and each part gets its
|
||||
own stretch, so the cut between them is a cut on a pause.
|
||||
|
||||
Each part is written as a take of 1920x1080 frames at 60 fps (the figure keyed over the mission-control backdrop) into
|
||||
Builds/Trailer/rolls_z/d_<line>_<part>, and lipsync.json says where the parts go: the edit reads it.
|
||||
|
||||
py -I lipsync.py
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import wave
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
ROOT = os.path.normpath(os.path.join(HERE, "..", ".."))
|
||||
sys.path.insert(0, os.path.join(ROOT, "Tools", "director"))
|
||||
import talk_videos # noqa: E402
|
||||
from talk_videos import frames, key # noqa: E402
|
||||
|
||||
VID = os.path.join(ROOT, "ArtSource", "Director", "video")
|
||||
AUDIO = os.path.join(ROOT, "Assets", "Audio")
|
||||
OUT = os.path.join(ROOT, "Builds", "Trailer", "rolls_z")
|
||||
BG = os.path.join(ROOT, "Assets", "Art", "UI", "T_Dir_BgWide.png")
|
||||
FPS, OFPS = 24, 60
|
||||
W, H = 1920, 1080
|
||||
|
||||
# where the face is in each loop's first frame: the eyes to follow, the mouth to measure (x0, y0, x1, y1)
|
||||
FACE = {
|
||||
"boss": {"eyes": (230, 240, 560, 370), "mouth": (325, 398, 445, 455)},
|
||||
"asst": {"eyes": (250, 250, 520, 350), "mouth": (300, 360, 430, 425)},
|
||||
}
|
||||
|
||||
# the trailer's own takes of their lines (Eleven v4, trimmed to the voice): name: (file, from, to, loops to try)
|
||||
LINE_DIR = os.path.join(ROOT, "ArtSource", "Trailer", "boss")
|
||||
LINES = {
|
||||
"earth": ("dir_earth", 0.0, None, ["boss_angry", "boss_stern"]),
|
||||
"scissors": ("dir_scissors", 0.0, None, ["boss_angry", "boss_stern"]),
|
||||
"did": ("dir_did", 0.0, None, ["boss_calm", "boss_stern"]),
|
||||
"noted": ("asst_noted", 0.0, None, ["asst_fed", "asst_stern"]),
|
||||
}
|
||||
|
||||
|
||||
def mouth_track(loop):
|
||||
"""Per frame: how open the mouth is, and where the face is (offset from the first frame)."""
|
||||
who = loop.split("_")[0]
|
||||
ex0, ey0, ex1, ey1 = FACE[who]["eyes"]
|
||||
mx0, my0, mx1, my1 = FACE[who]["mouth"]
|
||||
tmpl, opens, offs = None, [], []
|
||||
for rgb in frames(os.path.join(VID, loop + "_src.webm")):
|
||||
g = cv2.cvtColor(rgb[:700], cv2.COLOR_RGB2GRAY)
|
||||
if tmpl is None:
|
||||
tmpl = g[ey0:ey1, ex0:ex1].copy()
|
||||
dx = dy = 0
|
||||
else:
|
||||
m = cv2.matchTemplate(g, tmpl, cv2.TM_CCOEFF_NORMED)
|
||||
_, _, _, (bx, by) = cv2.minMaxLoc(m)
|
||||
dx, dy = bx - ex0, by - ey0
|
||||
box = rgb[my0 + dy:my1 + dy, mx0 + dx:mx1 + dx].astype(np.float32)
|
||||
v = box.max(axis=2)
|
||||
inside = (v < 120) & (box[..., 0] > box[..., 2]) # dark and reddish: the inside of a mouth
|
||||
teeth = (box.min(axis=2) > 200)
|
||||
opens.append(float(inside.mean() + 0.5 * teeth.mean()))
|
||||
offs.append((dx, dy))
|
||||
return np.array(opens), offs
|
||||
|
||||
|
||||
def decode(path, a, b):
|
||||
p = subprocess.run(["ffmpeg", "-v", "error", "-i", path, "-f", "f32le", "-ac", "1", "-ar", "16000", "-"], capture_output=True, check=True)
|
||||
x = np.frombuffer(p.stdout, np.float32)
|
||||
end = len(x) if b is None else int(b * 16000)
|
||||
return x[int(a * 16000):end]
|
||||
|
||||
|
||||
def envelope(x):
|
||||
hop = 16000 // FPS
|
||||
n = len(x) // hop
|
||||
e = np.array([np.sqrt(np.mean(x[i * hop:(i + 1) * hop] ** 2)) for i in range(n)])
|
||||
return np.convolve(e, np.ones(2) / 2, mode="same")
|
||||
|
||||
|
||||
def parts(env, gap=0.18, quiet=0.1):
|
||||
"""Stretches of speech, split where it is quiet for longer than `gap` seconds."""
|
||||
loud = env > quiet * env.max()
|
||||
runs, start, still = [], None, 0
|
||||
for i, on in enumerate(loud):
|
||||
if on:
|
||||
if start is None:
|
||||
start = i
|
||||
still = 0
|
||||
elif start is not None:
|
||||
still += 1
|
||||
if still > gap * FPS:
|
||||
runs.append((start, i - still + 1))
|
||||
start = None
|
||||
if start is not None:
|
||||
runs.append((start, len(loud)))
|
||||
# glue scraps under a third of a second onto their neighbour
|
||||
out = []
|
||||
for r in runs:
|
||||
if out and (r[1] - r[0] < FPS / 3 or out[-1][1] - out[-1][0] < FPS / 3):
|
||||
out[-1] = (out[-1][0], r[1])
|
||||
else:
|
||||
out.append(r)
|
||||
return out
|
||||
|
||||
|
||||
def z(v):
|
||||
s = v.std()
|
||||
return (v - v.mean()) / s if s > 1e-6 else v * 0
|
||||
|
||||
|
||||
def best(env, tracks, loops, used):
|
||||
"""The loop, first frame and speed whose mouth follows this loudness best."""
|
||||
want = z(env)
|
||||
top = (-9, None, 0, 1.0)
|
||||
for loop in loops:
|
||||
o = tracks[loop][0]
|
||||
for speed in (0.8, 0.9, 1.0, 1.1, 1.25):
|
||||
span = (len(env) - 1) * speed
|
||||
for s in range(0, int(len(o) - span - 1)):
|
||||
if any(loop == u and abs(s - us) < FPS for u, us in used):
|
||||
continue
|
||||
idx = (s + np.arange(len(env)) * speed).astype(int)
|
||||
seq = o[idx]
|
||||
score = float(np.mean(z(seq) * want)) + 0.15 * min(1.0, seq.std() / 0.05)
|
||||
if score > top[0]:
|
||||
top = (score, loop, s, speed)
|
||||
return top
|
||||
|
||||
|
||||
def render(name, loop, first, speed, frames_out, offs):
|
||||
"""The stretch of the loop as a take: the figure, keyed, over the backdrop, head and shoulders filling the frame."""
|
||||
folder = os.path.join(OUT, name)
|
||||
os.makedirs(folder, exist_ok=True)
|
||||
for f in os.listdir(folder):
|
||||
os.remove(os.path.join(folder, f))
|
||||
bg = cv2.imread(BG, cv2.IMREAD_COLOR)
|
||||
s = max(W / bg.shape[1], H / bg.shape[0])
|
||||
bg = cv2.resize(bg, (int(bg.shape[1] * s) + 1, int(bg.shape[0] * s) + 1), interpolation=cv2.INTER_AREA)
|
||||
y0, x0 = (bg.shape[0] - H) // 2, (bg.shape[1] - W) // 2
|
||||
bg = (bg[y0:y0 + H, x0:x0 + W].astype(np.float32) * np.array([0.95, 0.86, 0.82])).astype(np.float32)
|
||||
# her loops sit on a lighter black than his: flood up to just over it
|
||||
talk_videos.FLOOD = 20 if loop.startswith("asst") else 9
|
||||
talk_videos.SOLID = talk_videos.FLOOD + 15
|
||||
need = sorted({int(first + i * FPS / OFPS * speed) for i in range(frames_out)})
|
||||
keep = {}
|
||||
for i, rgb in enumerate(frames(os.path.join(VID, loop + "_src.webm"))):
|
||||
if i in need:
|
||||
keep[i] = (rgb, key(rgb))
|
||||
if i > need[-1]:
|
||||
break
|
||||
top, crop = 30, 560 # head to chest
|
||||
sc = H / crop
|
||||
fw = int(768 * sc)
|
||||
for k in range(frames_out):
|
||||
i = min(int(first + k * FPS / OFPS * speed), max(keep))
|
||||
rgb, a = keep[i]
|
||||
fig = cv2.resize(cv2.cvtColor(rgb[top:top + crop], cv2.COLOR_RGB2BGR), (fw, int(crop * sc)), interpolation=cv2.INTER_AREA).astype(np.float32)
|
||||
al = cv2.resize(a[top:top + crop], (fw, int(crop * sc)), interpolation=cv2.INTER_AREA).astype(np.float32)[..., None] / 255
|
||||
out = bg.copy()
|
||||
fx = (W - fw) // 2
|
||||
fh = min(H, fig.shape[0])
|
||||
out[:fh, fx:fx + fw] = fig[:fh] * al[:fh] + out[:fh, fx:fx + fw] * (1 - al[:fh])
|
||||
cv2.imwrite(os.path.join(folder, "%05d.jpg" % k), out.astype(np.uint8), [cv2.IMWRITE_JPEG_QUALITY, 93])
|
||||
|
||||
|
||||
def main():
|
||||
tracks = {}
|
||||
plan = {}
|
||||
for name, (clip, a, b, loops) in LINES.items():
|
||||
for loop in loops:
|
||||
if loop not in tracks:
|
||||
tracks[loop] = mouth_track(loop)
|
||||
o = tracks[loop][0]
|
||||
print(f"{loop}: {len(o)} frames, open {o.min():.3f}..{o.max():.3f}")
|
||||
x = decode(os.path.join(LINE_DIR, clip + ".wav"), a, b)
|
||||
env = envelope(x)
|
||||
used, out = [], []
|
||||
runs = parts(env)
|
||||
# the parts tile the whole line: each runs to where the next starts, the last just past the end
|
||||
cuts = [0] + [max(0, r[0] - 2) for r in runs[1:]] + [len(env) + 2]
|
||||
for k in range(len(runs)):
|
||||
lo, hi = cuts[k], cuts[k + 1]
|
||||
score, loop, first, speed = best(np.pad(env, (0, 6))[lo:hi], tracks, loops, used)
|
||||
used.append((loop, first))
|
||||
take = f"d_{name}_{k}"
|
||||
secs = (hi - lo) / FPS
|
||||
render(take, loop, first, speed, int(secs * OFPS) + 18, tracks[loop][1])
|
||||
out.append({"take": take, "at": lo / FPS, "secs": secs, "loop": loop, "first": first, "speed": speed, "score": round(score, 3)})
|
||||
print(f"{take}: {lo / FPS:5.2f}+{secs:4.2f}s {loop} from {first} x{speed} score {score:.2f}")
|
||||
plan[name] = {"clip": os.path.relpath(os.path.join(LINE_DIR, clip + ".wav"), ROOT).replace(os.sep, "/"), "from": a, "to": b if b is not None else a + len(x) / 16000, "parts": out}
|
||||
with open(os.path.join(HERE, "lipsync.json"), "w") as f:
|
||||
json.dump(plan, f, indent=1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
36
Tools/Trailer/looks.py
Normal file
36
Tools/Trailer/looks.py
Normal file
@ -0,0 +1,36 @@
|
||||
"""What every cut shares: the song's beat, the grades, where the takes and the sounds are, and laying shots end to end."""
|
||||
import os
|
||||
|
||||
from cut import PROJECT, Shot
|
||||
|
||||
ROLLS = os.path.join(PROJECT, r"Builds\Trailer\rolls")
|
||||
AUDIO = os.path.join(PROJECT, r"Assets\Audio")
|
||||
LOGO = os.path.join(PROJECT, r"Assets\Art\UI\logo_grasscutter.png")
|
||||
BEAT = 0.4665
|
||||
BAR = BEAT * 4
|
||||
|
||||
GOLD = {"tint": (-0.02, 0.0, 0.03), "sat": 1.08, "gain": 1.02, "contrast": 1.1}
|
||||
DUSK = {"tint": (-0.05, -0.012, 0.06), "sat": 1.24, "gain": 1.04, "contrast": 1.12}
|
||||
NIGHT = {"tint": (0.05, 0.012, -0.03), "sat": 0.95, "gain": 1.5, "contrast": 1.16}
|
||||
BARE = {"tint": (-0.03, -0.004, 0.035), "sat": 1.0, "gain": 1.0, "contrast": 1.16}
|
||||
HOT = {"sat": 1.1, "contrast": 1.1, "gain": 1.0}
|
||||
PLAY = {"sat": 1.04, "contrast": 1.04, "gain": 1.0} # first person: the HUD keeps its own colours
|
||||
SPACE = {"sat": 1.1, "contrast": 1.06, "tint": (0, 0, 0)}
|
||||
|
||||
|
||||
def clip(name):
|
||||
return os.path.join(AUDIO, name + ".wav")
|
||||
|
||||
|
||||
def runner(shots):
|
||||
"""run(at, (seconds, take, keywords), ...): back to back from `at`. With `until` the last shot runs to it."""
|
||||
def run(at, *cuts, until=None):
|
||||
t = at
|
||||
for i, c in enumerate(cuts):
|
||||
secs, take = c[0], c[1]
|
||||
kw = c[2] if len(c) > 2 else {}
|
||||
end = until if until is not None and i == len(cuts) - 1 else t + secs
|
||||
shots.append(Shot(take, t, end, **kw))
|
||||
t = end
|
||||
return t
|
||||
return run
|
||||
393
Tools/Trailer/polden.py
Normal file
393
Tools/Trailer/polden.py
Normal file
@ -0,0 +1,393 @@
|
||||
"""The scripted trailer, Docs/TRAILER_SCRIPT.md (the Polden workshop way): the Director's call opens it, one pair of nail
|
||||
scissors against the planet, then a co-op evening told by four players on voice chat (foreman, gremlin, engineer,
|
||||
tourist), the loop from hands to machines to factory, the planet fighting back, the bald planet, and the Director again.
|
||||
|
||||
Every line is an Eleven v4 take: the crew's put through a headset filter (ArtSource/Trailer/crew), the Director's and the
|
||||
assistant's clean (ArtSource/Trailer/boss). The music is ElevenLabs too
|
||||
(ArtSource/Trailer/polden_music.mp3); under the storm it goes dull and the storm loop comes up.
|
||||
|
||||
py -I cut.py polden.py out.mp4 [from to]
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import wave
|
||||
|
||||
import numpy as np
|
||||
|
||||
from cut import PROJECT, SR, Logo, Shot, Type, decode
|
||||
from looks import GOLD, HOT, LOGO, NIGHT, PLAY, SPACE, clip
|
||||
|
||||
TR = os.path.join(PROJECT, "Builds", "Trailer")
|
||||
ROLLS = TR
|
||||
OUT = os.path.join(TR, "polden")
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
CREW = os.path.join(PROJECT, "ArtSource", "Trailer", "crew")
|
||||
MUSIC = os.path.join(PROJECT, "ArtSource", "Trailer", "polden_music.mp3")
|
||||
PUNCH, SHAKE, ABERRATE = 0.008, 1.5, 0.8
|
||||
STUDIO = {"sat": 1.02, "contrast": 1.04, "gain": 1.0, "tint": (0, 0, 0)}
|
||||
B = 60 / 129.2 # the music's beat
|
||||
|
||||
|
||||
def roll(take):
|
||||
base = take.split("@")[0]
|
||||
for d in ("rolls_z", "rolls3", "rolls_1105"):
|
||||
if os.path.isdir(os.path.join(TR, d, base)):
|
||||
return os.path.join(TR, d, take)
|
||||
raise SystemExit("no take " + take)
|
||||
|
||||
|
||||
# ───────────────────────── what the game heard ─────────────────────────
|
||||
|
||||
_logs = {}
|
||||
|
||||
|
||||
def log(take):
|
||||
base = take.split("@")[0]
|
||||
if base not in _logs:
|
||||
rows = []
|
||||
path = os.path.join(os.path.dirname(roll(take)), base, "sounds.txt")
|
||||
if os.path.exists(path):
|
||||
for line in open(path, encoding="utf-8"):
|
||||
p = line.rstrip("\n").split("\t")
|
||||
if len(p) >= 5:
|
||||
rows.append((int(p[0]) / 60.0, p[1], float(p[2].replace(",", ".")), float(p[4].replace(",", "."))))
|
||||
_logs[base] = rows
|
||||
return _logs[base]
|
||||
|
||||
|
||||
def when(take, name, n=0):
|
||||
hits = [t for t, nm, _, _ in log(take) if nm == name]
|
||||
if len(hits) <= n:
|
||||
raise SystemExit(f"{take}: no {name} #{n} in sounds.txt")
|
||||
return hits[n]
|
||||
|
||||
|
||||
def seconds(path):
|
||||
with wave.open(path) as w:
|
||||
return w.getnframes() / w.getframerate()
|
||||
|
||||
|
||||
# ───────────────────────── laying shots ─────────────────────────
|
||||
|
||||
SHOTS, HEAR, EXTRA, LINES, SUBS = [], [], [], [], []
|
||||
now = 0.0
|
||||
|
||||
|
||||
def put(take, start, secs, hear=False, sound=None, **kw):
|
||||
global now
|
||||
SHOTS.append(Shot(roll(take), now, now + secs, start=start, **kw))
|
||||
if hear or sound:
|
||||
st, sf = sound if sound else (take, start)
|
||||
HEAR.append((now, st, sf, secs))
|
||||
now += secs
|
||||
return now
|
||||
|
||||
|
||||
WHO = {"fo": (255, 214, 90), "gr": (255, 140, 90), "en": (140, 220, 255), "to": (190, 255, 150)}
|
||||
|
||||
|
||||
def say(name, at, text, gain=1.0):
|
||||
"""A crew line on voice chat, with its subtitle (Steam plays trailers muted until you click)."""
|
||||
path = os.path.join(CREW, name + ".wav")
|
||||
d = seconds(path)
|
||||
LINES.append((at, path, 1.15 * gain))
|
||||
SUBS.append((at, at + max(d, 1.0) + 0.25, text, WHO[name[:2]]))
|
||||
return at + d
|
||||
|
||||
|
||||
def sub(at, secs, text, colour=(255, 255, 255)):
|
||||
SUBS.append((at, at + secs, text, colour))
|
||||
|
||||
|
||||
LIP = json.load(open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "lipsync.json")))
|
||||
TALK = [] # the Director's and the assistant's lines: (at, clip, gain, seconds, from)
|
||||
|
||||
|
||||
def speak(line, text, zooms=((1.0, 1.04), (1.12, 1.16)), colour=(255, 255, 255)):
|
||||
"""A line of theirs, the trailer's own take of it (ArtSource/Trailer/boss). Shown as ElevenLabs' talking avatar of
|
||||
the figure (rolls_z/el_<line>, made from that same take) when there is one; otherwise in their own filmed loops, cut
|
||||
where the mouth moves with it (lipsync.py chose the stretches). The shot ends with the voice: no air after it."""
|
||||
L = LIP[line]
|
||||
path = os.path.join(PROJECT, L["clip"])
|
||||
secs = L["to"] - L["from"]
|
||||
at = now
|
||||
if os.path.isdir(os.path.join(TR, "rolls_z", "el_" + line)):
|
||||
put("el_" + line, 0.0, secs, grade=STUDIO, zoom=zooms[0])
|
||||
else:
|
||||
for k, p in enumerate(L["parts"]):
|
||||
put(p["take"], 0.0, min(p["secs"], at + secs - now), grade=STUDIO, zoom=zooms[k % len(zooms)])
|
||||
TALK.append((at, path, 1.0, secs, L["from"]))
|
||||
sub(at + 0.05, now - at - 0.1, text, colour)
|
||||
return at
|
||||
|
||||
|
||||
# ───────────────────────── 1 · We have a situation ─────────────────────────
|
||||
|
||||
speak("earth", "EARTH IS OUT OF GRASS! NO GRASS!")
|
||||
TITLE1 = 0.6
|
||||
speak("scissors", "I don't care if you have to use nail scissors!", zooms=((1.1, 1.18),))
|
||||
BLADE_AT = now
|
||||
put("z_blade", 0.5, 4.0, grade=HOT)
|
||||
say("to_nails", BLADE_AT + 0.4, "...these are nail scissors.")
|
||||
EXTRA += [(BLADE_AT + 0.15 + 0.42 * i, clip("snip"), 0.35) for i in range(4)]
|
||||
EXTRA += [(BLADE_AT, clip("grass_rustle_loop"), 0.35, 4.0), (BLADE_AT, clip("ambience_loop"), 0.5, 4.0)]
|
||||
MUSIC_AT = now # the music starts on the cut to the crew; its big hit then lands on the bald planet
|
||||
|
||||
# ───────────────────────── 2 · Meet the crew ─────────────────────────
|
||||
|
||||
CREW_AT = now
|
||||
put("v_touch", 0.3, 3.0, grade=GOLD)
|
||||
say("fo_rows", CREW_AT + 0.15, "Okay team. Rows. Straight rows.")
|
||||
t = put("p_4", 1.0, 1.1, grade=GOLD)
|
||||
say("gr_big", t - 1.0, "Wait... how big is this planet?")
|
||||
WHOLE_AT = now
|
||||
put("o_dive", 0.6, 2.4, grade=SPACE)
|
||||
t = now
|
||||
put("o_giant", 0.4, 3.0, grade=GOLD)
|
||||
say("to_sky", t + 0.2, "Guys... look at the sky.")
|
||||
|
||||
# ───────────────────────── 3 · By hand ─────────────────────────
|
||||
|
||||
HAND_AT = now
|
||||
put("g_scissors", 0.6, B * 3, grade=PLAY)
|
||||
put("c_swing", 0.4, B * 3, grade=HOT)
|
||||
t = now
|
||||
put("g_deposit", 1.0, B * 4, grade=PLAY)
|
||||
say("fo_hand", t + 0.2, "Hand it in, hand it in!")
|
||||
CATCH_AT = now
|
||||
put("z_catch", 0.55, 2.5, hear=True, grade=HOT)
|
||||
say("gr_catch", CATCH_AT + 0.25, "Catch!")
|
||||
THROW, HIT = 0.32 * 3.2 - 0.55, 0.32 * 3.2 + 0.42 - 0.55
|
||||
EXTRA += [(CATCH_AT + THROW, clip("throw_whoosh"), 0.7), (CATCH_AT + HIT, clip("cardboard_thud_1"), 1.0), (CATCH_AT + HIT + 0.02, clip("land"), 0.6)]
|
||||
SIXTEEN_AT = now
|
||||
put("v_sixteen", 0.8, B * 6, grade=HOT)
|
||||
|
||||
# ───────────────────────── 4 · Bigger blades ─────────────────────────
|
||||
|
||||
BLADES_AT = now
|
||||
put("g_shears", 0.8, B * 2, grade=PLAY)
|
||||
put("g_sickle", 0.8, B * 2, grade=PLAY)
|
||||
put("g_scythe", 1.2, B * 2, grade=PLAY)
|
||||
put("g_wide", 1.5, B * 2, grade=PLAY)
|
||||
put("c_tractor", 1.6, B * 3, grade=HOT)
|
||||
t = now
|
||||
put("g_combine", 1.0, B * 3, grade=PLAY)
|
||||
say("fo_back", t + 0.1, "We are SO back.")
|
||||
put("c_combine", 0.6, B * 4, grade=HOT)
|
||||
t = now
|
||||
put("c_combine_top", 0.5, B * 4, grade=HOT)
|
||||
say("en_pickup", t + 0.1, "Who took the pickup?")
|
||||
t = now
|
||||
put("w_wheels", 0.3, B * 5, grade=HOT)
|
||||
say("gr_nobody", t + 0.15, "Nobody!")
|
||||
EXTRA += [(BLADES_AT + B * 2 * i + 0.1, clip("scythe_swing_%d" % (i % 3 + 1)), 0.35) for i in range(4)]
|
||||
EXTRA += [(BLADES_AT + B * 8, clip("combine_engine_loop"), 0.3, B * 14)]
|
||||
|
||||
# ───────────────────────── 5 · Let the factory do it ─────────────────────────
|
||||
|
||||
FACTORY_AT = now
|
||||
put("k_grow", 0.4, B * 6, grade=HOT)
|
||||
put("k_hammer", 1.0, B * 2, grade=HOT)
|
||||
put("y_drones", 0.4, B * 4, grade=GOLD)
|
||||
put("k_robots", 0.5, B * 3, grade=HOT)
|
||||
t = now
|
||||
put("k_belt", 0.6, B * 6, grade=HOT)
|
||||
say("en_works", t + 0.2, "It works. It actually works.")
|
||||
EXTRA += [(t, clip("conveyor_loop"), 0.35, B * 6)]
|
||||
SPILL_AT = now
|
||||
put("z_spill", 1.2, 3.0, hear=True, grade=HOT)
|
||||
say("en_mostly", SPILL_AT + 1.0, "...it mostly works.")
|
||||
|
||||
# ───────────────────────── 6 · The planet fights back ─────────────────────────
|
||||
|
||||
STORM_AT = now
|
||||
put("y_acid", 0.4, 2.9, grade=HOT)
|
||||
say("to_rain", STORM_AT + 0.2, "Is the rain... eating the grass?")
|
||||
t = now
|
||||
put("s_storm", 2.0, 2.2, grade=HOT)
|
||||
say("fo_save", t + 0.1, "The bundles! Save the bundles!")
|
||||
T0 = "s_thrown"
|
||||
FLING = when(T0, "throw_whoosh")
|
||||
t = now
|
||||
put(T0, FLING - 1.1, 2.3, grade=PLAY)
|
||||
say("gr_goin", t, "I'm going in!")
|
||||
EXTRA += [(t + 1.1, clip("throw_whoosh"), 0.8)]
|
||||
speak("noted", "You got thrown by a twister. Noted.", zooms=((1.0, 1.05), (1.14, 1.18)), colour=(255, 200, 220))
|
||||
UFO_AT = now
|
||||
put("y_ufo", 0.4, 2.6, grade=GOLD)
|
||||
STORM_END = now
|
||||
EXTRA += [(STORM_AT, clip("rain_loop"), 0.45, 5.1), (STORM_AT + 2.9, clip("twister_loop"), 0.5, 5.9), (STORM_AT + 2.9, clip("wind_loop"), 0.35, 5.9),
|
||||
(STORM_AT + 3.0, clip("thunder"), 0.55), (UFO_AT, clip("ufo_hum_loop"), 0.45, 2.6), (UFO_AT + 0.8, clip("ufo_beam_loop"), 0.35, 1.8)]
|
||||
|
||||
# ───────────────────────── 7 · Not a single blade ─────────────────────────
|
||||
|
||||
BIG_AT = now
|
||||
for take, start, grade in (("f_air", 0.6, HOT), ("y_house", 0.8, GOLD), ("f_top", 0.5, HOT), ("y_house_night", 0.6, NIGHT),
|
||||
("f_in", 0.6, HOT), ("f_side", 0.8, HOT)):
|
||||
put(take, start, B * 2, grade=grade)
|
||||
CUT_AT = now
|
||||
put("e_cut_k", 2.0, B * 6, speed=1.6, zoom=(1.0, 1.05), grade=SPACE)
|
||||
t = now
|
||||
put("e_crew", 0.6, B * 5, grade=GOLD)
|
||||
say("to_did", t + 0.1, "We did that?")
|
||||
say("fo_did", t + 1.2, "We did that.")
|
||||
|
||||
# ───────────────────────── 8 · CTA ─────────────────────────
|
||||
|
||||
CTA_AT = now
|
||||
speak("did", "You magnificent idiots actually did it.")
|
||||
LOGO_AT = now
|
||||
put("e_up", 1.52, 6.0, speed=0.45, zoom=(1.06, 1.12), grade=dict(GOLD, sat=1.2))
|
||||
say("gr_keep", LOGO_AT + 0.5, "Can we keep the combine?")
|
||||
EXTRA += [(LOGO_AT, clip("milestone"), 0.6), (LOGO_AT + 0.1, clip("confetti"), 0.6)]
|
||||
HIT = 66.5 # the song's last hit, in its own seconds
|
||||
# where the song's zero falls: the hit mid bald planet, and a whole number of beats skipped so the cuts stay on the beat
|
||||
SONG_AT = MUSIC_AT - max(0, round((MUSIC_AT - (CUT_AT + 1.54 - HIT)) / B)) * B
|
||||
EXTRA += [(SONG_AT + HIT, clip("ambience_loop"), 0.5, LOGO_AT + 2.0 - (SONG_AT + HIT))]
|
||||
END = now
|
||||
KEEP = [(0.0, END)]
|
||||
|
||||
|
||||
# ───────────────────────── the sound ─────────────────────────
|
||||
|
||||
def voice(name):
|
||||
return name.startswith("dir_") or name.startswith("asst_")
|
||||
|
||||
|
||||
def gather():
|
||||
"""What the takes heard: the Director's lines, cut to the stretch each shot shows; the game's effects within it."""
|
||||
pieces, sfx = [], []
|
||||
for at, take, frm, secs in HEAR:
|
||||
for ts, name, vol, dist in log(take):
|
||||
if not os.path.exists(clip(name)):
|
||||
continue
|
||||
if voice(name):
|
||||
L = seconds(clip(name))
|
||||
a, b = max(ts, frm), min(ts + L, frm + secs)
|
||||
if b - a > 0.02:
|
||||
pieces.append([at + a - frm, name, b - a, a - ts])
|
||||
elif frm <= ts < frm + secs and not name.startswith("phone"):
|
||||
fall = 1.0 / (1.0 + dist / 10.0) if dist > 0 else 1.0
|
||||
sfx.append((at + ts - frm, clip(name), min(1.0, vol) * fall * 0.8))
|
||||
voices = [(a, clip(n), 1.0, d, o) for a, n, d, o in pieces]
|
||||
# a pile of bundles logs a clunk a frame: one per name every 0.15 s is plenty
|
||||
sfx.sort(key=lambda x: x[0])
|
||||
last, thin = {}, []
|
||||
for at, path, g in sfx:
|
||||
if at - last.get(path, -9) >= 0.15:
|
||||
last[path] = at
|
||||
thin.append((at, path, g * 0.6))
|
||||
return voices, thin
|
||||
|
||||
|
||||
DIRECTOR, HEARD = gather()
|
||||
VOICES = DIRECTOR + TALK + [(a, p, g, seconds(p)) for a, p, g in LINES]
|
||||
SFX = DIRECTOR + TALK + LINES + HEARD + [e for e in EXTRA if os.path.exists(e[1])]
|
||||
MISSING = sorted({os.path.basename(e[1]) for e in EXTRA if not os.path.exists(e[1])})
|
||||
|
||||
|
||||
def bed():
|
||||
"""Nothing under the call; the music from the pull-back on, dull and low under the storm, ducked under every line."""
|
||||
n = int((END + 2) * SR)
|
||||
out = np.zeros((n, 2), np.float32)
|
||||
song = decode(MUSIC)
|
||||
# the song in two: through its last hit, which buttons the bald planet, and on as it rings out under "we did that"
|
||||
# and the Director (no dead air); then from two beats before that hit again, so it lands on the logo
|
||||
lead = int((HIT - 0.9) * SR)
|
||||
i = int(MUSIC_AT * SR)
|
||||
j = int((LOGO_AT - 0.9) * SR)
|
||||
a = song[int((MUSIC_AT - SONG_AT) * SR):].copy()
|
||||
up = int(0.2 * SR)
|
||||
a[:up] *= np.linspace(0.0, 1.0, up)[:, None]
|
||||
a = a[:max(0, j - i) + int(0.3 * SR)]
|
||||
fade = int(0.3 * SR)
|
||||
a[-fade:] *= np.linspace(1.0, 0.0, fade)[:, None] ** 2
|
||||
out[i:i + len(a)] += a[:n - i] * 0.9
|
||||
b = song[lead:lead + n - j].copy()
|
||||
b[:int(0.05 * SR)] *= np.linspace(0.0, 1.0, int(0.05 * SR))[:, None]
|
||||
out[j:j + len(b)] += b * 0.9
|
||||
# the storm: the band through a wall, the storm loop over it
|
||||
s, e = int(STORM_AT * SR), int(STORM_END * SR)
|
||||
import subprocess
|
||||
seg = out[s:e].copy()
|
||||
p = subprocess.run(["ffmpeg", "-v", "error", "-f", "f32le", "-ac", "2", "-ar", str(SR), "-i", "-", "-af", "lowpass=f=420,lowpass=f=420",
|
||||
"-f", "f32le", "-ac", "2", "-ar", str(SR), "-"], input=seg.tobytes(), capture_output=True, check=True)
|
||||
dull = np.frombuffer(p.stdout, np.float32).reshape(-1, 2)[:len(seg)] * 0.8
|
||||
x = int(0.35 * SR)
|
||||
w = np.ones(len(seg), np.float32)
|
||||
w[:x] = np.linspace(0, 1, x)
|
||||
w[-x:] = np.linspace(1, 0, x)
|
||||
out[s:e] = seg * (1 - w[:, None]) + dull * w[:, None]
|
||||
storm = decode(clip("music_storm_loop"))
|
||||
k = min(len(storm), e - s)
|
||||
out[s:s + k] += storm[:k] * 0.55 * w[:k, None]
|
||||
# under the voices
|
||||
duck = np.ones(n, np.float32)
|
||||
for v in VOICES:
|
||||
at, d = v[0], v[3]
|
||||
a, b = int((at - 0.12) * SR), int((at + d + 0.2) * SR)
|
||||
duck[max(0, a):min(n, b)] = 0.38
|
||||
kernel = int(0.18 * SR)
|
||||
duck = np.convolve(duck, np.ones(kernel) / kernel, mode="same").astype(np.float32)
|
||||
out *= duck[:, None]
|
||||
path = os.path.join(OUT, "bed.wav")
|
||||
raw = (np.clip(out, -1, 1) * 32767).astype(np.int16)
|
||||
with wave.open(path, "wb") as f:
|
||||
f.setnchannels(2)
|
||||
f.setsampwidth(2)
|
||||
f.setframerate(SR)
|
||||
f.writeframes(raw.tobytes())
|
||||
return path
|
||||
|
||||
|
||||
TRACK = bed()
|
||||
TRACK_GAIN = 1.0
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.0 if t < MUSIC_AT + 1.0 or CTA_AT <= t < LOGO_AT else 0.3
|
||||
|
||||
|
||||
def BLACK(t):
|
||||
if t < 0.25:
|
||||
return 1 - t / 0.25
|
||||
if t > END - 1.0:
|
||||
return min(1.0, (t - (END - 1.0)) / 1.0)
|
||||
return 0.0
|
||||
|
||||
|
||||
FLASH = [(CREW_AT, 0.4), (BIG_AT, 0.45), (LOGO_AT, 0.6)]
|
||||
|
||||
|
||||
def card(text, at, secs, size=110):
|
||||
return Type(text, at, at + secs, size, y=0.2, how="slam")
|
||||
|
||||
|
||||
TYPE = [
|
||||
card("EARTH RAN OUT OF GRASS", TITLE1, 3.0),
|
||||
card("MOW A WHOLE PLANET", WHOLE_AT + 0.1, 2.3),
|
||||
card("UP TO 16 PLAYERS ONLINE", SIXTEEN_AT + 0.1, B * 6 - 0.2),
|
||||
card("FROM NAIL SCISSORS TO A COMBINE", BLADES_AT + 0.05, B * 8 - 0.1, 96),
|
||||
card("LET THE FACTORY DO IT", FACTORY_AT + 0.05, B * 8 - 0.1),
|
||||
card("AN ALIEN WORLD", UFO_AT + 0.1, 2.4),
|
||||
card("NOT A SINGLE BLADE LEFT", CUT_AT + 0.1, B * 6 - 0.2),
|
||||
Logo(LOGO, LOGO_AT, END, 1180, 0.4),
|
||||
Type("WISHLIST NOW ON STEAM", LOGO_AT + 1.6, END, 76, y=0.76, how="rise"),
|
||||
Type("ONLINE CO-OP FOR 1 TO 16 PLAYERS", LOGO_AT + 2.4, END, 50, y=0.85, how="rise", colour=(226, 240, 200)),
|
||||
]
|
||||
# subtitles, low and small, in each speaker's colour
|
||||
for a, b, text, colour in SUBS:
|
||||
if a < LOGO_AT:
|
||||
TYPE.append(Type(text, a, b, 52, y=0.9, how="fade", colour=colour, edge=(18, 22, 16)))
|
||||
else:
|
||||
TYPE.append(Type(text, a, b, 48, y=0.94, how="fade", colour=colour, edge=(18, 22, 16)))
|
||||
|
||||
if __name__ == "__main__":
|
||||
for s in SHOTS:
|
||||
print(f"{s.at:7.2f} {s.end - s.at:5.2f} {os.path.basename(s.take):24s} from {s.start:6.2f}")
|
||||
print("song %.2f " % SONG_AT, end="")
|
||||
print("music %.2f crew %.2f hand %.2f blades %.2f factory %.2f storm %.2f big %.2f cta %.2f logo %.2f end %.2f" % (
|
||||
MUSIC_AT, CREW_AT, HAND_AT, BLADES_AT, FACTORY_AT, STORM_AT, BIG_AT, CTA_AT, LOGO_AT, END))
|
||||
for v in VOICES:
|
||||
print("voice %7.2f %-16s %5.2f" % (v[0], os.path.basename(v[1]), v[3]))
|
||||
print("missing sounds:", MISSING)
|
||||
23
Tools/Trailer/remix.py
Normal file
23
Tools/Trailer/remix.py
Normal file
@ -0,0 +1,23 @@
|
||||
"""Lays the sound of an edit again under a finished render, picture untouched: py -I remix.py edl.py film.mp4"""
|
||||
import importlib.util
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
import cut # noqa: E402
|
||||
|
||||
spec = importlib.util.spec_from_file_location("edl", sys.argv[1])
|
||||
edl = importlib.util.module_from_spec(spec)
|
||||
sys.modules["edl"] = edl
|
||||
spec.loader.exec_module(edl)
|
||||
film = sys.argv[2]
|
||||
wav = film + ".remix.wav"
|
||||
song = cut.decode(getattr(edl, "TRACK", cut.TRACK)) * getattr(edl, "TRACK_GAIN", 1.0)
|
||||
cut.mix(song, cut.Clock(edl.KEEP), getattr(edl, "SFX", []), wav)
|
||||
tmp = film + ".remix.mp4"
|
||||
subprocess.run(["ffmpeg", "-y", "-v", "error", "-i", film, "-i", wav, "-map", "0:v", "-map", "1:a", "-c:v", "copy", "-c:a", "aac", "-b:a", "320k",
|
||||
"-shortest", "-movflags", "+faststart", tmp], check=True)
|
||||
os.replace(tmp, film)
|
||||
os.remove(wav)
|
||||
print("remixed", film)
|
||||
28
Tools/Trailer/sheet.py
Normal file
28
Tools/Trailer/sheet.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""Contact sheet: one row per take, n frames across it. py -I sheet.py rolls out.jpg [per_row] [take,take,...]"""
|
||||
import os, sys
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
root, out = sys.argv[1], sys.argv[2]
|
||||
n = int(sys.argv[3]) if len(sys.argv) > 3 else 3
|
||||
only = sys.argv[4].split(",") if len(sys.argv) > 4 else None
|
||||
cell = (480, 270) if n <= 3 else (360, 202)
|
||||
rows = []
|
||||
takes = sorted(t for t in os.listdir(root) if os.path.isdir(os.path.join(root, t)))
|
||||
if only:
|
||||
takes = [t for t in takes if any(t == o or t.startswith(o) for o in only)]
|
||||
for t in takes:
|
||||
files = sorted(f for f in os.listdir(os.path.join(root, t)) if f.endswith(".jpg"))
|
||||
if not files:
|
||||
continue
|
||||
pick = [files[int(i * (len(files) - 1) / max(1, n - 1))] for i in range(n)]
|
||||
row = []
|
||||
for j, f in enumerate(pick):
|
||||
im = cv2.resize(cv2.imread(os.path.join(root, t, f)), cell, interpolation=cv2.INTER_AREA)
|
||||
if j == 0:
|
||||
cv2.putText(im, t, (8, 22), cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 0, 0), 3, cv2.LINE_AA)
|
||||
cv2.putText(im, t, (8, 22), cv2.FONT_HERSHEY_SIMPLEX, 0.6, (255, 255, 255), 1, cv2.LINE_AA)
|
||||
row.append(im)
|
||||
rows.append(np.hstack(row))
|
||||
cv2.imwrite(out, np.vstack(rows), [cv2.IMWRITE_JPEG_QUALITY, 88])
|
||||
print(len(rows), "takes")
|
||||
29
Tools/Trailer/shorts/s1_hook.py
Normal file
29
Tools/Trailer/shorts/s1_hook.py
Normal file
@ -0,0 +1,29 @@
|
||||
"""Short 1, the premise: Earth ran out of grass, so the crew went to a planet that has too much, and mowed it."""
|
||||
from looks import BAR, GOLD, HOT, ROLLS, SPACE, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook # noqa: F401
|
||||
|
||||
KEEP = [(2.2, 15.33), (22.9, 31.3), CARD]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
run(2.2,
|
||||
(5.3, "o_space_k", {"speed": 1.5, "zoom": (1.15, 1.25), "grade": SPACE}),
|
||||
(4.1, "o_dive", {"start": 0.9, "speed": 0.9, "grade": GOLD}),
|
||||
(1.8, "o_skim", {"start": 2.2, "speed": 1.35, "grade": GOLD}),
|
||||
(0, "o_giant", {"start": 0.6, "speed": 0.7, "grade": GOLD}),
|
||||
until=15.33)
|
||||
run(22.9,
|
||||
(2.1, "c_swing_s", {"rate": 120, "start": 1.2, "speed": 0.5, "grade": HOT}),
|
||||
(BAR, "v_sixteen", {"start": 1.2, "grade": HOT}),
|
||||
(BAR, "f_air", {"start": 0.6, "grade": HOT}),
|
||||
(0, "e_cut_k", {"start": 2.0, "speed": 2.6, "zoom": (1.15, 1.2), "grade": SPACE}),
|
||||
until=31.3)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": dict(GOLD, sat=1.2)}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.3 if t < 22.9 else 0.6
|
||||
|
||||
|
||||
TYPE = hook(["EARTH RAN OUT", "OF GRASS"], 2.5, 7.4) + hook(["SO WE FOUND", "A PLANET WITH", "TOO MUCH"], 7.6, 15.3, how="rise")
|
||||
TYPE += hook(["AND MOWED", "ALL OF IT"], 26.9, 31.3) + card()
|
||||
SFX = [(22.9, clip("scythe_swing_1"), 0.5), (CARD[0], clip("confetti"), 0.7)]
|
||||
22
Tools/Trailer/shorts/s2_tools.py
Normal file
22
Tools/Trailer/shorts/s2_tools.py
Normal file
@ -0,0 +1,22 @@
|
||||
"""Short 2, the climb: every blade from nail scissors to the combine, one bar each, in first person."""
|
||||
from looks import BAR, HOT, PLAY, ROLLS, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook, label # noqa: F401
|
||||
|
||||
KEEP = [(22.9, 38.23), CARD]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
STEPS = [("g_scissors", 0.6, "NAIL SCISSORS"), ("g_shears", 0.8, "GARDEN SHEARS"), ("g_sickle", 0.8, "SICKLE"), ("g_scythe", 1.2, "SCYTHE"),
|
||||
("g_wide", 1.2, "TWO-HANDED SCYTHE"), ("g_ride", 1.6, "RIDE-ON MOWER"), ("g_combine", 2.0, "COMBINE")]
|
||||
end = run(22.9, *[(BAR, take, {"start": s, "grade": PLAY}) for take, s, _ in STEPS])
|
||||
run(end, (0, "f_air", {"start": 0.6, "grade": HOT}), until=38.23)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": HOT}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.5
|
||||
|
||||
|
||||
TYPE = hook(["FROM NAIL SCISSORS", "TO A COMBINE"], 22.9, 38.2, size=84)
|
||||
TYPE += [label(text, 22.9 + i * BAR + 0.05, 22.9 + (i + 1) * BAR - 0.05, 96 if len(text) < 14 else 76) for i, (_, _, text) in enumerate(STEPS)]
|
||||
TYPE += [label("ALL OF IT", end + 0.05, 38.2)] + card()
|
||||
SFX = [(22.9, clip("snip"), 0.5), (22.9 + BAR, clip("shears_snip_1"), 0.5), (22.9 + BAR * 3, clip("scythe_swing_1"), 0.5), (CARD[0], clip("confetti"), 0.7)]
|
||||
26
Tools/Trailer/shorts/s3_sixteen.py
Normal file
26
Tools/Trailer/shorts/s3_sixteen.py
Normal file
@ -0,0 +1,26 @@
|
||||
"""Short 3, the crowd: sixteen players and every machine on one planet, the last chorus."""
|
||||
from looks import BAR, HOT, NIGHT, PLAY, ROLLS, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook # noqa: F401
|
||||
|
||||
KEEP = [(116.1, 131.03), CARD]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
run(116.1,
|
||||
(BAR, "v_sixteen", {"start": 1.0, "grade": HOT}),
|
||||
(BAR, "c_line", {"start": 1.2, "grade": HOT}),
|
||||
(BAR, "g_coop", {"start": 1.5, "grade": PLAY}),
|
||||
(BAR, "n_line", {"start": 0.8, "grade": NIGHT}),
|
||||
(BAR, "f_hero", {"start": 0.4, "grade": HOT}),
|
||||
(BAR, "f_in", {"start": 0.6, "grade": HOT}),
|
||||
(BAR, "f_side", {"start": 0.3, "grade": HOT}),
|
||||
(0, "f_air", {"start": 0.6, "grade": HOT}),
|
||||
until=131.03)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": HOT}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.6
|
||||
|
||||
|
||||
TYPE = hook(["16 PLAYERS", "ONE PLANET"], 116.1, 123.5) + hook(["NOT ONE BLADE", "OF GRASS LEFT"], 123.6, 131.0) + card()
|
||||
SFX = [(116.1, clip("scythe_swing_2"), 0.5), (CARD[0], clip("confetti"), 0.7)]
|
||||
24
Tools/Trailer/shorts/s4_satisfying.py
Normal file
24
Tools/Trailer/shorts/s4_satisfying.py
Normal file
@ -0,0 +1,24 @@
|
||||
"""Short 4, the slow part of the song under the slow-motion takes: blades through grass, strips from above."""
|
||||
from looks import GOLD, HOT, ROLLS, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook # noqa: F401
|
||||
|
||||
KEEP = [(97.77, 112.0), CARD]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
run(97.77,
|
||||
(2.65, "b_grass", {"rate": 120, "speed": 0.5, "start": 0.2, "grade": GOLD}),
|
||||
(2.1, "m_blade", {"rate": 120, "start": 0.3, "speed": 0.4, "grade": GOLD}),
|
||||
(2.0, "b_header", {"rate": 120, "start": 0.6, "speed": 0.5, "grade": GOLD}),
|
||||
(2.6, "c_swing_s", {"rate": 120, "start": 1.0, "speed": 0.5, "grade": GOLD}),
|
||||
(2.0, "b_line", {"rate": 120, "start": 0.25, "speed": 0.5, "grade": GOLD}),
|
||||
(0, "c_top", {"start": 0.8, "speed": 0.8, "grade": HOT}),
|
||||
until=112.0)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": GOLD}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.1
|
||||
|
||||
|
||||
TYPE = hook(["THE MOST", "SATISFYING JOB", "IN SPACE"], 97.9, 111.9, how="rise") + card()
|
||||
SFX = [(CARD[0], clip("confetti"), 0.7)]
|
||||
23
Tools/Trailer/shorts/s5_planet.py
Normal file
23
Tools/Trailer/shorts/s5_planet.py
Normal file
@ -0,0 +1,23 @@
|
||||
"""Short 5, the whole planet going from green to bare, seen from orbit, then the armada that did it."""
|
||||
from looks import BAR, HOT, ROLLS, SPACE, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook # noqa: F401
|
||||
|
||||
KEEP = [(131.03, 147.72), CARD]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
run(131.03,
|
||||
(9.0, "e_cut_k", {"speed": 1.0, "zoom": (1.2, 1.3), "grade": SPACE}),
|
||||
(BAR, "f_air", {"start": 0.6, "grade": HOT}),
|
||||
(BAR, "f_top", {"start": 0.4, "grade": HOT}),
|
||||
(BAR, "f_in", {"start": 0.9, "grade": HOT}),
|
||||
(0, "f_hero", {"start": 1.0, "grade": HOT}),
|
||||
until=147.72)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": HOT}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.2 if t < 140 else 0.6
|
||||
|
||||
|
||||
TYPE = hook(["WE MOWED", "AN ENTIRE", "PLANET"], 131.1, 140.0) + hook(["16 OF US"], 140.1, 147.7) + card()
|
||||
SFX = [(131.2, clip("sector_clear"), 0.5), (CARD[0], clip("confetti"), 0.7)]
|
||||
28
Tools/Trailer/shorts/s6_factory.py
Normal file
28
Tools/Trailer/shorts/s6_factory.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""Short 6, the factory: building it, belts and robots, the money coming in."""
|
||||
from looks import HOT, PLAY, ROLLS, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook, label # noqa: F401
|
||||
|
||||
KEEP = [(80.7, 97.77), CARD]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
run(80.7,
|
||||
(3.0, "g_build", {"start": 1.6, "grade": PLAY}),
|
||||
(2.4, "k_grow", {"start": 2.5, "speed": 1.4, "zoom": (1.35, 1.45), "grade": HOT}),
|
||||
(1.4, "k_hammer", {"start": 0.6, "grade": HOT}),
|
||||
(2.6, "k_belt", {"start": 0.3, "grade": HOT}),
|
||||
(2.4, "k_robots", {"start": 0.6, "grade": HOT}),
|
||||
(1.8, "k_robots2", {"start": 0.6, "grade": HOT}),
|
||||
(2.0, "g_deposit", {"start": 1.6, "grade": PLAY}),
|
||||
(0, "g_shop", {"start": 0.6, "grade": PLAY}),
|
||||
until=97.77)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": HOT}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.45
|
||||
|
||||
|
||||
TYPE = hook(["TURNING GRASS", "INTO MONEY"], 80.8, 97.7)
|
||||
TYPE += [label("BUILD", 80.8, 83.6), label("BALE", 86.2, 88.6), label("AUTOMATE", 88.8, 92.9), label("CASH IN", 93.0, 95.0), label("UPGRADE", 95.1, 97.7)]
|
||||
TYPE += card()
|
||||
SFX = [(82.1, clip("build_place"), 0.7), (86.4, clip("press_thump"), 0.5), (94.0, clip("cash_register"), 0.6), (CARD[0], clip("confetti"), 0.7)]
|
||||
26
Tools/Trailer/shorts/s7_crew.py
Normal file
26
Tools/Trailer/shorts/s7_crew.py
Normal file
@ -0,0 +1,26 @@
|
||||
"""Short 7, the roll call: the eight of them two beats each, then off to work."""
|
||||
from looks import BAR, BEAT, HOT, ROLLS, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook, label # noqa: F401
|
||||
|
||||
START = 15.33 + BEAT * 4
|
||||
KEEP = [(START, 30.6), CARD]
|
||||
NAMES = ["HANK", "OTIS", "LIN", "RUSTAM", "MARCUS", "GUS", "WADE", "KENJI"]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
t = run(START, *[(BEAT * 2, f"p_{i}", {"start": 0.3, "speed": 0.9, "zoom": (1.0, 1.04), "grade": HOT}) for i in range(8)])
|
||||
run(t,
|
||||
(BAR, "c_swing_s", {"rate": 120, "start": 1.2, "speed": 0.5, "grade": HOT}),
|
||||
(BAR, "v_sixteen", {"start": 1.2, "grade": HOT}),
|
||||
(0, "f_air", {"start": 0.6, "grade": HOT}),
|
||||
until=30.6)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": HOT}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.45
|
||||
|
||||
|
||||
TYPE = hook(["PICK YOUR", "GRASS CUTTER"], START, t)
|
||||
TYPE += [label(n, START + i * BEAT * 2 + 0.03, START + (i + 1) * BEAT * 2 - 0.03, 120) for i, n in enumerate(NAMES)]
|
||||
TYPE += hook(["THEN GET", "TO WORK"], t + 0.1, 30.55) + card()
|
||||
SFX = [(t, clip("scythe_swing_1"), 0.5), (CARD[0], clip("confetti"), 0.7)]
|
||||
24
Tools/Trailer/shorts/s8_night.py
Normal file
24
Tools/Trailer/shorts/s8_night.py
Normal file
@ -0,0 +1,24 @@
|
||||
"""Short 8, the night shift: sundown, work lights, the crew still in a line."""
|
||||
from looks import DUSK, GOLD, NIGHT, ROLLS, clip, runner # noqa: F401
|
||||
from vertical import ABERRATE, BLACK, CARD, PUNCH, SHAKE, SIZE, card, hook # noqa: F401
|
||||
|
||||
KEEP = [(47.56, 60.58), CARD]
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
run(47.56,
|
||||
(2.8, "v_sunset", {"rate": 30, "start": 0.0, "speed": 1.4, "grade": DUSK}),
|
||||
(2.4, "n_line", {"start": 0.6, "grade": NIGHT}),
|
||||
(2.2, "n_air", {"start": 0.4, "grade": NIGHT}),
|
||||
(2.2, "n_tractor", {"start": 0.6, "grade": NIGHT}),
|
||||
(1.6, "n_left", {"start": 0.2, "grade": NIGHT}),
|
||||
(0, "v_rhythm", {"start": 0.3, "grade": GOLD}),
|
||||
until=60.58)
|
||||
run(CARD[0], (0, "e_up", {"start": 0.2, "speed": 0.48, "grade": GOLD}), until=CARD[1])
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.35
|
||||
|
||||
|
||||
TYPE = hook(["THE GRASS", "DOESN'T SLEEP"], 47.6, 52.6) + hook(["NEITHER", "DO WE"], 52.7, 58.9) + hook(["NIGHT SHIFT", "OVER"], 59.0, 60.5) + card()
|
||||
SFX = [(52.4, clip("night_crickets_loop"), 0.4, 6.0), (CARD[0], clip("confetti"), 0.7)]
|
||||
107
Tools/Trailer/space.py
Normal file
107
Tools/Trailer/space.py
Normal file
@ -0,0 +1,107 @@
|
||||
"""
|
||||
The game's sky stays daylight blue from orbit, so the orbital takes get a real one: the ball is keyed out, lit from one side
|
||||
with a terminator and an atmosphere, and set against stars. py -I space.py rolls take take_k
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
root, src, dst = sys.argv[1:4]
|
||||
front = len(sys.argv) > 4
|
||||
W, H = 2560, 1440
|
||||
os.makedirs(os.path.join(root, dst), exist_ok=True)
|
||||
rng = np.random.default_rng(11)
|
||||
|
||||
# the stars: a field a little bigger than the frame that drifts
|
||||
sky = np.zeros((H + 400, W + 400, 3), np.float32)
|
||||
for n, size, lo, hi in ((9000, 1, 0.12, 0.5), (1300, 2, 0.35, 0.8), (130, 3, 0.7, 1.0)):
|
||||
ys = rng.integers(0, sky.shape[0], n)
|
||||
xs = rng.integers(0, sky.shape[1], n)
|
||||
v = rng.uniform(lo, hi, n)
|
||||
tint = rng.uniform(0.82, 1.0, (n, 3))
|
||||
for y, x, a, c in zip(ys, xs, v, tint):
|
||||
cv2.circle(sky, (int(x), int(y)), size - 1, (float(a * c[0]), float(a * c[1]), float(a * c[2])), -1, cv2.LINE_AA)
|
||||
sky = cv2.GaussianBlur(sky, (0, 0), 0.8)
|
||||
# a band of faint dust across it
|
||||
y, x = np.mgrid[0:sky.shape[0], 0:sky.shape[1]].astype(np.float32)
|
||||
band = np.exp(-(((x * 0.34 + y - 1200) / 340) ** 2))
|
||||
noise = cv2.GaussianBlur(rng.random(sky.shape[:2], np.float32), (0, 0), 60)
|
||||
noise = (noise - noise.min()) / (noise.max() - noise.min())
|
||||
sky += (band * noise * 0.16)[..., None] * np.array([0.9, 0.55, 0.5], np.float32)
|
||||
|
||||
# what makes the front ragged, as if it were made of many crews
|
||||
ragged = cv2.GaussianBlur(rng.random((H, W), np.float32), (0, 0), 7) + cv2.GaussianBlur(rng.random((H, W), np.float32), (0, 0), 30) * 2.2
|
||||
ragged = (ragged - ragged.mean()) / ragged.std()
|
||||
blot = cv2.GaussianBlur(rng.random((H, W), np.float32), (0, 0), 16)
|
||||
blot = np.clip((blot - blot.mean()) / blot.std() * 0.5 + 0.5, 0, 1)
|
||||
spot = None
|
||||
|
||||
light = np.array([-0.62, -0.42, 0.66], np.float32)
|
||||
light /= np.linalg.norm(light)
|
||||
files = sorted(f for f in os.listdir(os.path.join(root, src)) if f.endswith(".jpg"))
|
||||
fit = None
|
||||
for i, name in enumerate(files):
|
||||
img = cv2.imread(os.path.join(root, src, name), cv2.IMREAD_COLOR).astype(np.float32) / 255
|
||||
b, g, r = cv2.split(img)
|
||||
mask = ((g > b * 1.03) | (r > b * 1.03)).astype(np.uint8) * 255
|
||||
mask = cv2.morphologyEx(cv2.morphologyEx(mask, cv2.MORPH_OPEN, np.ones((5, 5), np.uint8)), cv2.MORPH_CLOSE, np.ones((9, 9), np.uint8))
|
||||
n, labels, stats, _ = cv2.connectedComponentsWithStats(mask)
|
||||
if n > 1:
|
||||
mask = (labels == 1 + int(np.argmax(stats[1:, cv2.CC_STAT_AREA]))).astype(np.uint8) * 255
|
||||
edge = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)[0]
|
||||
pts = max(edge, key=len)[:, 0, :].astype(np.float64)
|
||||
pts = pts[(pts[:, 0] > 3) & (pts[:, 0] < W - 4) & (pts[:, 1] > 3) & (pts[:, 1] < H - 4)]
|
||||
# a circle through the rim, least squares
|
||||
A = np.c_[2 * pts, np.ones(len(pts))]
|
||||
c = np.linalg.lstsq(A, (pts ** 2).sum(axis=1), rcond=None)[0]
|
||||
cx, cy, rad = c[0], c[1], np.sqrt(c[2] + c[0] ** 2 + c[1] ** 2)
|
||||
now = np.array([cx, cy, rad])
|
||||
fit = now if fit is None else fit * 0.7 + now * 0.3
|
||||
cx, cy, rad = fit
|
||||
|
||||
yy, xx = np.mgrid[0:H, 0:W].astype(np.float32)
|
||||
nx, ny = (xx - cx) / rad, (yy - cy) / rad
|
||||
rr = nx * nx + ny * ny
|
||||
inside = np.clip((1 - np.sqrt(rr)) * rad / 2.0 + 0.5, 0, 1)
|
||||
nz = np.sqrt(np.clip(1 - rr, 0, 1))
|
||||
lit = np.clip(nx * light[0] + ny * light[1] + nz * light[2], 0, 1)
|
||||
if front:
|
||||
k = i / (len(files) - 1)
|
||||
seen = (r > g * 0.92) & (rr < 0.8)
|
||||
if seen.sum() > 300:
|
||||
ys, xs = np.nonzero(seen)
|
||||
now = np.array([(xs.mean() - cx) / rad, (ys.mean() - cy) / rad])
|
||||
spot = now if spot is None else spot * 0.85 + now * 0.15
|
||||
bx, by = spot if spot is not None else (0.0, 0.0)
|
||||
bz = np.sqrt(max(0.0, 1 - bx * bx - by * by))
|
||||
ang = np.arccos(np.clip(nx * bx + ny * by + nz * bz, -1, 1))
|
||||
reach = 0.06 + 1.95 * (k * k * (3 - 2 * k))
|
||||
edge = reach - ang + ragged * 0.022
|
||||
cover = np.clip(edge / 0.012, 0, 1)[..., None]
|
||||
lum = img.mean(axis=2, keepdims=True)
|
||||
lum = lum * 0.3 + cv2.GaussianBlur(lum, (0, 0), 90)[..., None] * 0.7
|
||||
tan = lum * (0.96 + blot[..., None] * 0.08) * np.array([0.56, 0.86, 1.3], np.float32)
|
||||
img = img * (1 - cover) + tan * cover
|
||||
# a soft terminator with a warm edge
|
||||
day = np.clip(lit * 1.5, 0, 1) ** 0.75
|
||||
warm = np.clip(1 - np.abs(lit - 0.1) / 0.16, 0, 1) * 0.5
|
||||
surface = img * (day[..., None] * 1.28 + 0.012) + warm[..., None] * img * np.array([0.0, 0.25, 0.8], np.float32)
|
||||
if front:
|
||||
surface += (np.exp(-(edge / 0.018) ** 2) * (0.25 + day))[..., None] * np.array([0.25, 0.8, 1.0], np.float32) * 0.9
|
||||
# the thin air at the rim, inside and out
|
||||
rim = (1 - nz) ** 3.2 * np.clip(lit * 2.2 + 0.05, 0, 1)
|
||||
surface += rim[..., None] * np.array([1.0, 0.72, 0.32], np.float32) * 0.85
|
||||
out = np.maximum(np.sqrt(rr) - 1, 0) * rad
|
||||
side = np.clip((nx * light[0] + ny * light[1]) / np.maximum(np.sqrt(rr), 1e-3) + 0.35, 0, 1)
|
||||
halo = (np.exp(-out / (rad * 0.016)) * 0.7 + np.exp(-out / (rad * 0.07)) * 0.16) * side
|
||||
dx = int(40 + i * 0.05)
|
||||
back = sky[120:120 + H, dx:dx + W] + halo[..., None] * np.array([1.0, 0.7, 0.34], np.float32)
|
||||
# the sun just out of frame
|
||||
sun = 0.5 / (1 + ((xx + 300) ** 2 + (yy + 150) ** 2) / 420000)
|
||||
back = back + sun[..., None] * np.array([0.8, 0.9, 1.0], np.float32)
|
||||
frame = surface * inside[..., None] + back * (1 - inside[..., None])
|
||||
cv2.imwrite(os.path.join(root, dst, name), (np.clip(frame, 0, 1) * 255).astype(np.uint8), [cv2.IMWRITE_JPEG_QUALITY, 96])
|
||||
if i % 60 == 0:
|
||||
print(name, f"centre {cx:.0f},{cy:.0f} radius {rad:.0f}", flush=True)
|
||||
66
Tools/Trailer/splice.py
Normal file
66
Tools/Trailer/splice.py
Normal file
@ -0,0 +1,66 @@
|
||||
"""
|
||||
Replaces a stretch of a finished render without encoding the rest again: the stretch is cut on keyframes, rendered anew and joined.
|
||||
py -I splice.py edl.py film.mp4 out_from out_to seconds of the film
|
||||
"""
|
||||
import importlib.util
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
edl, film, lo, hi = sys.argv[1], sys.argv[2], float(sys.argv[3]), float(sys.argv[4])
|
||||
spec = importlib.util.spec_from_file_location("edl", edl)
|
||||
plan = importlib.util.module_from_spec(spec)
|
||||
sys.modules["edl"] = plan
|
||||
spec.loader.exec_module(plan)
|
||||
|
||||
|
||||
def song(t):
|
||||
"""The film's second t in the song's time, through the kept stretches."""
|
||||
for a, b in plan.KEEP:
|
||||
if t <= b - a:
|
||||
return a + t
|
||||
t -= b - a
|
||||
raise ValueError("past the end of the song")
|
||||
|
||||
|
||||
tmp = os.path.join(os.path.dirname(film), "splice")
|
||||
shutil.rmtree(tmp, ignore_errors=True)
|
||||
os.makedirs(tmp)
|
||||
|
||||
|
||||
def run(*a):
|
||||
return subprocess.run(a, check=True, capture_output=True, text=True).stdout
|
||||
|
||||
|
||||
def frames(path):
|
||||
return int(run("ffprobe", "-v", "error", "-select_streams", "v", "-count_packets", "-show_entries", "stream=nb_read_packets", "-of", "csv=p=0", path).strip().strip(","))
|
||||
|
||||
|
||||
keys = [float(x.strip(",")) for x in run("ffprobe", "-v", "error", "-select_streams", "v", "-skip_frame", "nokey", "-show_entries", "frame=pts_time", "-of", "csv=p=0", film).split()]
|
||||
a = max(k for k in keys if k <= lo)
|
||||
b = min(k for k in keys if k >= hi)
|
||||
print("keyframes", a, b, flush=True)
|
||||
part = os.path.join(tmp, "part.mp4")
|
||||
here = os.path.dirname(os.path.abspath(__file__))
|
||||
subprocess.run([sys.executable, "-I", os.path.join(here, "cut.py"), edl, part, f"{song(a) + 0.002:.3f}", f"{song(b) + 0.08:.3f}"], check=True, stdout=subprocess.DEVNULL)
|
||||
run("ffmpeg", "-y", "-v", "error", "-i", film, "-map", "0:v", "-c", "copy", "-f", "segment", "-segment_times", f"{a - 0.004:.6f},{b - 0.004:.6f}", "-reset_timestamps", "1", os.path.join(tmp, "seg%d.mp4"))
|
||||
partv = os.path.join(tmp, "partv.mp4")
|
||||
# the render runs a little long so that the encoder's tail can't fall short
|
||||
run("ffmpeg", "-y", "-v", "error", "-i", part, "-map", "0:v", "-c", "copy", "-frames:v", str(round((b - a) * 60)), partv)
|
||||
seg = [os.path.join(tmp, f"seg{i}.mp4") for i in range(3)]
|
||||
counts = [frames(p) for p in seg]
|
||||
new = frames(partv)
|
||||
print("frames", counts, "new", new, flush=True)
|
||||
assert new == counts[1], "the new stretch must be as long as the old one"
|
||||
listing = os.path.join(tmp, "list.txt")
|
||||
with open(listing, "w", encoding="utf-8") as f:
|
||||
for p in (seg[0], partv, seg[2]):
|
||||
f.write("file '" + p.replace("\\", "/") + "'\n")
|
||||
joined = os.path.join(tmp, "joined.mp4")
|
||||
run("ffmpeg", "-y", "-v", "error", "-f", "concat", "-safe", "0", "-i", listing, "-i", film, "-map", "0:v", "-map", "1:a", "-c", "copy", "-movflags", "+faststart", joined)
|
||||
assert frames(joined) == frames(film)
|
||||
os.replace(joined, film)
|
||||
shutil.rmtree(tmp)
|
||||
print("done", flush=True)
|
||||
324
Tools/Trailer/story.py
Normal file
324
Tools/Trailer/story.py
Normal file
@ -0,0 +1,324 @@
|
||||
"""The story trailer: told the way the game opens. The Director's call from Earth in the real opening film, cut between the
|
||||
phone in your hand and his face filling the frame; the planet; his assistant in your ear; then the game, with his calls
|
||||
and her warnings over it, to the hundred percent and his joke about a second planet over the logo.
|
||||
|
||||
Every s_ take carries a sounds.txt from the game (frame, name, volume, pitch, metres off), so a shot brings its own voices
|
||||
and effects with it, cut to exactly the stretch of the take it shows. The music bed is built here: silence under the call,
|
||||
the game's music from the planet on, ducked under every line.
|
||||
|
||||
py -I cut.py story.py out.mp4 [from to]
|
||||
"""
|
||||
import os
|
||||
import wave
|
||||
|
||||
import numpy as np
|
||||
|
||||
from cut import PROJECT, SR, Logo, Shot, Type, decode
|
||||
from looks import AUDIO, GOLD, HOT, LOGO, NIGHT, PLAY, SPACE, clip # noqa: F401
|
||||
|
||||
ROLLS = os.path.join(PROJECT, r"Builds\Trailer\rolls3")
|
||||
OUT = os.path.join(PROJECT, r"Builds\Trailer\story")
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
PUNCH, SHAKE, ABERRATE = 0.006, 1.2, 0.6
|
||||
STUDIO = {"sat": 1.02, "contrast": 1.04, "gain": 1.0, "tint": (0, 0, 0)}
|
||||
B = 60 / 79.5
|
||||
|
||||
|
||||
# ───────────────────────── what the game heard ─────────────────────────
|
||||
|
||||
_logs = {}
|
||||
|
||||
|
||||
def log(take):
|
||||
base = take.split("@")[0]
|
||||
if base not in _logs:
|
||||
rows = []
|
||||
path = os.path.join(ROLLS, base, "sounds.txt")
|
||||
if os.path.exists(path):
|
||||
for line in open(path, encoding="utf-8"):
|
||||
p = line.rstrip("\n").split("\t")
|
||||
if len(p) >= 5:
|
||||
rows.append((int(p[0]) / 60.0, p[1], float(p[2].replace(",", ".")), float(p[4].replace(",", "."))))
|
||||
_logs[base] = rows
|
||||
return _logs[base]
|
||||
|
||||
|
||||
def when(take, name, n=0):
|
||||
hits = [t for t, nm, _, _ in log(take) if nm == name]
|
||||
if len(hits) <= n:
|
||||
raise SystemExit(f"{take}: no {name} #{n} in sounds.txt")
|
||||
return hits[n]
|
||||
|
||||
|
||||
_lengths = {}
|
||||
|
||||
|
||||
def length(name):
|
||||
if name not in _lengths:
|
||||
with wave.open(clip(name)) as w:
|
||||
_lengths[name] = w.getnframes() / w.getframerate()
|
||||
return _lengths[name]
|
||||
|
||||
|
||||
def voice(name):
|
||||
return name.startswith("dir_") or name.startswith("asst_")
|
||||
|
||||
|
||||
# ───────────────────────── laying shots ─────────────────────────
|
||||
|
||||
SHOTS = []
|
||||
HEAR = [] # (at, take, from, seconds): that stretch of the take's sound, at that time
|
||||
EXTRA = [] # sounds by hand: (at, clip path, gain[, seconds[, offset]])
|
||||
now = 0.0
|
||||
|
||||
|
||||
def put(take, start, secs, hear=True, sound=None, **kw):
|
||||
"""The next shot: `secs` of `take` from `start` seconds in. Its own sound comes with it unless hear is False, or
|
||||
sound=(take, from) brings another stretch instead."""
|
||||
global now
|
||||
SHOTS.append(Shot(take, now, now + secs, start=start, **kw))
|
||||
if hear:
|
||||
st, sf = sound if sound else (take, start)
|
||||
HEAR.append((now, st, sf, secs))
|
||||
now += secs
|
||||
return now
|
||||
|
||||
|
||||
def gap(secs):
|
||||
global now
|
||||
now += secs
|
||||
|
||||
|
||||
# ───────────────────────── the cut ─────────────────────────
|
||||
|
||||
I, BOSS = "s_intro", "s_intro@s_boss"
|
||||
RING = when(I, "phone_ring")
|
||||
V = when(I, "dir_intro")
|
||||
SPACE_AT = when(I, "space_rumble")
|
||||
TAG = when(I, "dir_intro_tag")
|
||||
|
||||
# 1. the planks in the half dark, the phone ringing, coming up
|
||||
put(I, RING - 1.6, V - (RING - 1.6), grade=PLAY)
|
||||
# 2. the call: (from, to) in the line, and whose picture
|
||||
CALL = [
|
||||
(0.0, 2.32, I), # Listen up, you incompetent idiots!
|
||||
(2.32, 6.2, BOSS), # EARTH IS OUT OF GRASS! NO GRASS!
|
||||
(6.2, 9.2, I), # NOT A SINGLE DAMN BLADE!
|
||||
(15.9, 20.2, BOSS), # And Earth needs EVERY. SINGLE. BLADE.
|
||||
(20.2, 23.3, I), # I want it CUT! I want it PACKED!
|
||||
(23.3, 25.95, BOSS), # And I want it SHIPPED BACK TO EARTH!
|
||||
(25.95, 28.8, I), # I don't care if you have to use nail scissors!
|
||||
(28.8, 33.0, BOSS), # NOW GET OUT THERE AND MOW THAT GODDAMN PLANET!
|
||||
]
|
||||
for a, b, who in CALL:
|
||||
kw = {"grade": STUDIO if who == BOSS else PLAY}
|
||||
if who == BOSS and a == 15.9:
|
||||
kw["zoom"] = (1.0, 1.18)
|
||||
put(who, V + a, b - a, **kw)
|
||||
# 3. the phone goes, the head comes up, the cuts climb to the planet; his deadpan over it
|
||||
put(I, V + 33.0, SPACE_AT - (V + 33.0), grade=PLAY)
|
||||
MUSIC_AT = now
|
||||
# the planet from orbit: the composited orbit take, with the film's own sound (the rumble, his "we take grass very seriously")
|
||||
put("o_space_k", 1.0, TAG + length("dir_intro_tag") + 0.5 - SPACE_AT, sound=(I, SPACE_AT), grade=SPACE, zoom=(1.0, 1.05))
|
||||
|
||||
# 4. her hello: "Hi. I'm the Director's assistant. I'll be in your ear the whole time. He shouts. I explain."
|
||||
# the film ends and she starts inside s_intro; s_after picks up 4 frames after s_intro's last
|
||||
ASST = "s_after@s_asst"
|
||||
A = when(I, "asst_hello")
|
||||
AFTER = (3420 + 4) / 60.0
|
||||
put(I, A - 0.3, 3.95, grade=PLAY) # her window in the corner of your view
|
||||
put(BOSS, V + 3.0, 0.95, sound=(I, A + 4.62), grade=STUDIO) # He shouts. (over him shouting)
|
||||
put(ASST, A + 6.05 - AFTER, 1.3, sound=(I, A + 6.05), grade=STUDIO) # I explain.
|
||||
|
||||
# 5. the game: the tools one after another, the crew
|
||||
put("g_scissors", 0.3, B * 3, hear=False, grade=PLAY)
|
||||
put("g_shears", 0.8, B * 2, hear=False, grade=PLAY)
|
||||
put("g_sickle", 0.8, B * 2, hear=False, grade=PLAY)
|
||||
put("g_scythe", 1.2, B * 3, hear=False, grade=PLAY)
|
||||
put("g_wide", 1.5, B * 3, hear=False, grade=PLAY)
|
||||
TOOLS_AT = SHOTS[-5].at
|
||||
put("g_coop", 1.5, B * 4, hear=False, grade=PLAY)
|
||||
put("v_sixteen", 0.9, B * 4, hear=False, grade=HOT)
|
||||
COOP_AT = SHOTS[-2].at
|
||||
|
||||
# 6. belts: "Conveyor belts! Grass that moves BY ITSELF! ... This is what peak civilization looks like."
|
||||
DB, DBB = "s_dir_belts", "s_dir_belts@s_boss"
|
||||
VB = when(DB, "dir_belts")
|
||||
put("k_belt", 0.6, 5.3, hear=False, sound=None, grade=HOT)
|
||||
HEAR.append((SHOTS[-1].at, DB, VB - 0.1, 5.3))
|
||||
put(DBB, VB + 6.3, 4.2, grade=STUDIO)
|
||||
BELT_AT = SHOTS[-2].at
|
||||
|
||||
# 7. the combine: "A COMBINE HARVESTER?! (laughs) NOW we're talking! Earth's lawns will be green by Christmas!"
|
||||
DC, DCB = "s_dir_combine", "s_dir_combine@s_boss"
|
||||
VC = when(DC, "dir_combine")
|
||||
put(DCB, VC - 0.1, 3.85, grade=STUDIO)
|
||||
put("c_combine", 0.6, 2.4, hear=False, grade=HOT)
|
||||
HEAR.append((SHOTS[-1].at, DC, VC + 3.75, 2.4))
|
||||
put("c_combine_over", 1.0, 3.3, hear=False, grade=HOT)
|
||||
HEAR.append((SHOTS[-1].at, DC, VC + 6.15, 3.3))
|
||||
|
||||
# 8. the weather: a twister over the meadow, the warning in your ear, and up you go
|
||||
put("s_storm", 2.0, 3.6, hear=False, grade=HOT)
|
||||
T0, TA = "s_thrown", "s_thrown@s_asst"
|
||||
VT = when(T0, "asst_twister")
|
||||
FLING = when(T0, "throw_whoosh")
|
||||
VN = when(T0, "asst_thrown")
|
||||
put(T0, VT - 0.2, 1.8, grade=PLAY) # Twister incoming!
|
||||
put(T0, FLING - 1.6, VN - 0.1 - (FLING - 1.6), grade=PLAY) # it comes, and you go up
|
||||
put(TA, VN - 0.1, length("asst_thrown") + 0.25, grade=STUDIO) # You got thrown by a twister. Noted.
|
||||
STORM_AT = SHOTS[-4].at
|
||||
|
||||
# 9. the saucer, and him on the phone about it
|
||||
U0, UB = "s_ufocall", "s_ufocall@s_boss"
|
||||
VU = when(U0, "dir_ufo")
|
||||
put("s_ufo", 4.0, 3.4, sound=(U0, VU - 1.65), grade=GOLD) # (the call connects) Was that a UFO?!
|
||||
put(UB, VU + 2.6, 4.95, grade=STUDIO) # Listen to me. Do NOT let them take the grass.
|
||||
put("s_ufo_top", 3.0, 3.1, hear=False, grade=GOLD)
|
||||
HEAR.append((SHOTS[-1].at, U0, VU + 8.6, 3.1)) # THAT GRASS BELONGS TO EARTH!
|
||||
UFO_AT = SHOTS[-3].at
|
||||
|
||||
# 10. everybody, everything, the whole ball
|
||||
put("f_air", 0.6, B * 4, hear=False, grade=HOT)
|
||||
put("n_line", 0.8, B * 3, hear=False, grade=NIGHT)
|
||||
put("e_cut_k", 2.0, B * 5, hear=False, speed=1.6, zoom=(1.0, 1.05), grade=SPACE)
|
||||
BIG_AT = SHOTS[-3].at
|
||||
|
||||
# 11. one hundred percent, and the joke over the logo
|
||||
M, MB = "s_dir_m100", "s_dir_m100@s_boss"
|
||||
VM = when(M, "dir_m100")
|
||||
put(MB, VM - 0.1, 1.75, grade=STUDIO) # One hundred percent.
|
||||
put(MB, VM + 4.1, 0.9, grade=STUDIO) # You did it.
|
||||
put(MB, VM + 5.8, 3.4, grade=STUDIO, zoom=(1.0, 1.12)) # You magnificent idiots actually did it.
|
||||
put("e_up", 0.2, 2.2, hear=False, speed=0.6, zoom=(1.02, 1.06), grade=dict(GOLD, sat=1.2))
|
||||
HEAR.append((SHOTS[-1].at, M, VM + 10.4, 2.2)) # Earth has grass again!
|
||||
LOGO_AT = now
|
||||
put("e_up", 1.52, 9.0, hear=False, speed=0.45, zoom=(1.06, 1.12), grade=dict(GOLD, sat=1.2))
|
||||
HEAR.append((LOGO_AT + 0.6, M, VM + 14.1, 3.05)) # Now. About the second planet.
|
||||
HEAR.append((LOGO_AT + 4.4, M, VM + 19.0, 0.9)) # I'm kidding.
|
||||
HEAR.append((LOGO_AT + 6.3, M, VM + 21.5, 2.2)) # Unless?
|
||||
END = now
|
||||
KEEP = [(0.0, END)]
|
||||
|
||||
|
||||
# ───────────────────────── the sound ─────────────────────────
|
||||
|
||||
def gather():
|
||||
pieces, sfx = [], []
|
||||
for at, take, frm, secs in HEAR:
|
||||
for ts, name, vol, dist in log(take):
|
||||
if not os.path.exists(clip(name)):
|
||||
continue
|
||||
if voice(name):
|
||||
L = length(name)
|
||||
a, b = max(ts, frm), min(ts + L, frm + secs)
|
||||
if b - a > 0.02:
|
||||
pieces.append([at + a - frm, name, b - a, a - ts])
|
||||
elif frm <= ts < frm + secs:
|
||||
fall = 1.0 / (1.0 + dist / 10.0) if dist > 0 else 1.0
|
||||
sfx.append((at + ts - frm, clip(name), min(1.0, vol) * fall * 0.85))
|
||||
# a line laid in pieces that follow on in both picture and recording is one piece: no dip at the cut
|
||||
pieces.sort(key=lambda p: (p[1], p[0]))
|
||||
merged = []
|
||||
for p in pieces:
|
||||
q = merged[-1] if merged else None
|
||||
if q and q[1] == p[1] and abs(q[0] + q[2] - p[0]) < 0.03 and abs(q[3] + q[2] - p[3]) < 0.03:
|
||||
q[2] += p[2]
|
||||
else:
|
||||
merged.append(p)
|
||||
voices = [(a, clip(n), 1.0, d, o) for a, n, d, o in merged]
|
||||
return voices, sfx
|
||||
|
||||
|
||||
VOICES, HEARD = gather()
|
||||
|
||||
# loops the takes don't log
|
||||
EXTRA += [(STORM_AT, clip("twister_loop"), 0.5, 9.0), (STORM_AT, clip("wind_loop"), 0.35, 9.0), (STORM_AT + 0.4, clip("thunder"), 0.5)]
|
||||
EXTRA += [(UFO_AT, clip("ufo_hum_loop"), 0.4, 12.0), (UFO_AT + 9.0, clip("ufo_beam_loop"), 0.35, 3.1)]
|
||||
EXTRA += [(BELT_AT, clip("conveyor_loop"), 0.35, 5.3)] if os.path.exists(clip("conveyor_loop")) else []
|
||||
EXTRA += [(TOOLS_AT + 0.3 + 0.6 * i, clip("snip"), 0.3) for i in range(4)]
|
||||
EXTRA += [(TOOLS_AT + B * 5 + 0.3 + 0.75 * i, clip("scythe_swing_%d" % (i % 3 + 1)), 0.3) for i in range(8)]
|
||||
EXTRA += [(TOOLS_AT, clip("grass_rustle_loop"), 0.3, B * 13)]
|
||||
EXTRA += [(LOGO_AT, clip("milestone"), 0.6), (LOGO_AT + 0.1, clip("confetti"), 0.6)]
|
||||
SFX = VOICES + HEARD + EXTRA
|
||||
|
||||
|
||||
def bed():
|
||||
"""Silence under the call; the music from the planet on, under every line ducked, out before the joke."""
|
||||
n = int((END + 2) * SR)
|
||||
out = np.zeros((n, 2), np.float32)
|
||||
song = decode(clip("music_game_loop"))
|
||||
i = int(MUSIC_AT * SR)
|
||||
stop = int((LOGO_AT + 1.0) * SR)
|
||||
k = 0
|
||||
while i < stop:
|
||||
m = min(len(song), stop - i)
|
||||
out[i:i + m] += song[:m] * 0.8
|
||||
i += m
|
||||
k += 1
|
||||
# rise in over the first second and a half, out over the last one
|
||||
a = int(MUSIC_AT * SR)
|
||||
ramp = int(1.5 * SR)
|
||||
out[a:a + ramp] *= np.linspace(0.3, 1.0, ramp)[:, None]
|
||||
tail = int(1.0 * SR)
|
||||
out[stop - tail:stop] *= np.linspace(1.0, 0.0, tail)[:, None]
|
||||
# under the voices
|
||||
duck = np.ones(n, np.float32)
|
||||
for at, _, _, d, _ in VOICES:
|
||||
s, e = int((at - 0.15) * SR), int((at + d + 0.25) * SR)
|
||||
duck[max(0, s):min(n, e)] = 0.32
|
||||
kernel = int(0.2 * SR)
|
||||
duck = np.convolve(duck, np.ones(kernel) / kernel, mode="same").astype(np.float32)
|
||||
out *= duck[:, None]
|
||||
path = os.path.join(OUT, "bed.wav")
|
||||
raw = (np.clip(out, -1, 1) * 32767).astype(np.int16)
|
||||
with wave.open(path, "wb") as f:
|
||||
f.setnchannels(2)
|
||||
f.setsampwidth(2)
|
||||
f.setframerate(SR)
|
||||
f.writeframes(raw.tobytes())
|
||||
return path
|
||||
|
||||
|
||||
TRACK = bed()
|
||||
TRACK_GAIN = 1.0
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.0 if t < MUSIC_AT else 0.25
|
||||
|
||||
|
||||
def BLACK(t):
|
||||
if t < 0.6:
|
||||
return 1 - t / 0.6
|
||||
if t > END - 1.2:
|
||||
return min(1.0, (t - (END - 1.2)) / 1.2)
|
||||
return 0.0
|
||||
|
||||
|
||||
FLASH = [(MUSIC_AT, 0.35), (LOGO_AT, 0.6)]
|
||||
|
||||
|
||||
def caption(text, at, secs, size=72):
|
||||
return Type(text, at + 0.1, at + secs - 0.1, size, y=0.86, how="rise")
|
||||
|
||||
|
||||
TYPE = [
|
||||
caption("START WITH NAIL SCISSORS", TOOLS_AT, B * 5),
|
||||
caption("WORK YOUR WAY UP TO THE SCYTHE", TOOLS_AT + B * 7, B * 6),
|
||||
caption("MOW WITH YOUR FRIENDS", COOP_AT, B * 4),
|
||||
caption("UP TO 16 PLAYERS", COOP_AT + B * 4, B * 4),
|
||||
caption("BUILD A GRASS FACTORY", BELT_AT, 5.3),
|
||||
caption("WEATHER THAT FIGHTS BACK", STORM_AT, 3.6),
|
||||
caption("A WHOLE PLANET TO CLEAR", BIG_AT + B * 7, B * 5),
|
||||
Logo(LOGO, LOGO_AT, END, 1180, 0.4),
|
||||
Type("WISHLIST NOW ON STEAM", LOGO_AT + 1.6, END, 76, y=0.76, how="rise"),
|
||||
Type("CO-OP FOR 1 TO 16 PLAYERS", LOGO_AT + 2.4, END, 50, y=0.85, how="rise", colour=(226, 240, 200)),
|
||||
]
|
||||
|
||||
if __name__ == "__main__":
|
||||
for s in SHOTS:
|
||||
print(f"{s.at:7.2f} {s.end - s.at:5.2f} {s.take:28s} from {s.start:6.2f}")
|
||||
print("music at %.2f, logo at %.2f, end %.2f" % (MUSIC_AT, LOGO_AT, END))
|
||||
for v in VOICES:
|
||||
print("voice %7.2f %-14s %5.2f from %5.2f" % (v[0], os.path.basename(v[1]), v[3], v[4]))
|
||||
58
Tools/Trailer/teaser.py
Normal file
58
Tools/Trailer/teaser.py
Normal file
@ -0,0 +1,58 @@
|
||||
"""The teaser, forty seconds of the song: the cold open, straight into the first chorus, and the logo on the outro's hit."""
|
||||
from cut import Logo, Type
|
||||
from looks import BAR, GOLD, HOT, LOGO, PLAY, ROLLS, SPACE, clip, runner # noqa: F401
|
||||
|
||||
KEEP = [(2.2, 15.33), (22.9, 38.23), (159.0, 170.0)]
|
||||
PUNCH, SHAKE, ABERRATE = 0.016, 4.0, 1.8
|
||||
|
||||
SHOTS = []
|
||||
run = runner(SHOTS)
|
||||
|
||||
run(2.2,
|
||||
(5.3, "o_space_k", {"speed": 1.5, "zoom": (1.0, 1.04), "grade": SPACE}),
|
||||
(4.1, "o_dive", {"start": 0.9, "speed": 0.9, "grade": GOLD, "into": "whip"}),
|
||||
(1.8, "o_skim", {"start": 2.2, "speed": 1.35, "grade": GOLD, "into": "whip"}),
|
||||
(0, "o_giant", {"start": 0.6, "speed": 0.7, "grade": GOLD}),
|
||||
until=15.33)
|
||||
run(22.9,
|
||||
(2.1, "c_swing_s", {"rate": 120, "start": 1.2, "speed": 0.5, "grade": HOT}),
|
||||
(BAR, "g_scythe", {"start": 1.0, "grade": PLAY}),
|
||||
(BAR, "c_combine_over", {"start": 1.34, "grade": HOT}),
|
||||
(BAR, "v_sixteen", {"start": 1.2, "grade": HOT}),
|
||||
(BAR, "k_grow", {"start": 3.0, "speed": 1.6, "grade": HOT}),
|
||||
(BAR, "f_air", {"start": 0.6, "grade": HOT}),
|
||||
(BAR, "c_top", {"start": 1.2, "grade": HOT}),
|
||||
(0, "e_cut_k", {"start": 2.0, "speed": 2.6, "zoom": (1.0, 1.05), "grade": {"sat": 1.1, "contrast": 1.08, "tint": (0, 0, 0)}}),
|
||||
until=38.23)
|
||||
run(159.0, (0, "e_up", {"start": 0.2, "speed": 0.48, "zoom": (1.02, 1.08), "grade": {"sat": 1.2, "contrast": 1.12}}), until=170.0)
|
||||
|
||||
FLASH = [(22.9, 0.5), (159.0, 0.7)]
|
||||
|
||||
|
||||
def REACT(t):
|
||||
return 0.25 if t < 22.9 else 0.6 if t < 38.3 else 0.4
|
||||
|
||||
|
||||
def BLACK(t):
|
||||
if t < 2.7:
|
||||
return 1 - (t - 2.2) / 0.5
|
||||
if t > 168.6:
|
||||
return min(1.0, (t - 168.6) / 1.2)
|
||||
return 0.0
|
||||
|
||||
|
||||
TYPE = [
|
||||
Type("EARTH HAS RUN OUT OF GRASS", 5.0, 8.4, 84, y=0.2, how="rise"),
|
||||
Type("THIS PLANET HAS TOO MUCH", 9.0, 12.4, 84, y=0.2, how="rise"),
|
||||
Type("HERBARIA-7", 12.6, 15.3, 150, y=0.5, how="rise"),
|
||||
Type("MOW IT!", 23.0, 24.95, 210, y=0.74, how="slam"),
|
||||
Type("UP TO 16 PLAYERS", 28.74, 30.5, 120, y=0.8, how="slam"),
|
||||
Type("BUILD IT", 30.6, 32.4, 150, y=0.8, how="slam"),
|
||||
Type("DRIVE IT", 32.47, 34.3, 150, y=0.8, how="slam"),
|
||||
Type("THE WHOLE PLANET", 36.2, 38.2, 150, how="slam"),
|
||||
Type("WISHLIST NOW ON STEAM", 161.0, 170.0, 76, y=0.76, how="rise"),
|
||||
Type("CO-OP FOR 1 TO 16 PLAYERS", 162.0, 170.0, 50, y=0.85, how="rise", colour=(226, 240, 200)),
|
||||
Logo(LOGO, 159.0, 170.0, 1180, 0.4),
|
||||
]
|
||||
|
||||
SFX = [(22.9, clip("scythe_swing_1"), 0.5), (159.0, clip("confetti"), 0.7)]
|
||||
29
Tools/Trailer/vertical.py
Normal file
29
Tools/Trailer/vertical.py
Normal file
@ -0,0 +1,29 @@
|
||||
"""What the upright clips for Shorts and Reels share: the frame, a hook in the top third, a label low down, and the
|
||||
same six-second end card on the song's last hit."""
|
||||
from cut import Logo, Type
|
||||
from looks import LOGO
|
||||
|
||||
SIZE = (1080, 1920)
|
||||
PUNCH, SHAKE, ABERRATE = 0.016, 4.0, 1.6
|
||||
CARD = (159.0, 165.0)
|
||||
|
||||
|
||||
def hook(lines, at, end, size=96, y=0.13, how="slam"):
|
||||
"""Up to three short lines, stacked from y down."""
|
||||
return [Type(text, at, end, size, y=y + i * size * 1.05 / 1920, how=how) for i, text in enumerate(lines)]
|
||||
|
||||
|
||||
def label(text, at, end, size=104, y=0.74):
|
||||
return Type(text, at, end, size, y=y, how="slam")
|
||||
|
||||
|
||||
def card():
|
||||
a, b = CARD
|
||||
return [Logo(LOGO, a, b, 940, 0.4),
|
||||
Type("WISHLIST ON STEAM", a + 0.6, b, 84, y=0.6, how="rise"),
|
||||
Type("CO-OP FOR 1 TO 16 PLAYERS", a + 1.0, b, 54, y=0.66, how="rise", colour=(226, 240, 200))]
|
||||
|
||||
|
||||
def BLACK(t):
|
||||
"""In from black over a quarter second, out over the last second."""
|
||||
return 0.0 if t < CARD[1] - 1.0 else min(1.0, (t - CARD[1] + 1.0) / 0.9)
|
||||
236
Tools/Trailer/voices.py
Normal file
236
Tools/Trailer/voices.py
Normal file
@ -0,0 +1,236 @@
|
||||
"""Every spoken line in the scripted trailer, made whole and then cut: the crew's evening as one Eleven v4 dialogue (four
|
||||
voices in one take, so they answer each other), and the Director's and the assistant's calls each read through in one go
|
||||
as in the game, with the trailer's phrases cut out of them. A phrase read inside its speech sounds like it; read alone it
|
||||
sounds like a line being read.
|
||||
|
||||
Where each phrase falls in a take is found by listening (faster-whisper's word timings, matched in order against the
|
||||
script): the timings the API sends back drift too far to cut by. Whole takes are kept in Tools/audio/eleven_raw/whole_*.wav (+ .json). The crew's lines then go
|
||||
through a headset (ArtSource/Trailer/crew), the Director's and the assistant's stay clean (ArtSource/Trailer/boss).
|
||||
|
||||
ELEVEN_KEY_FILE=... py -I voices.py [again] ("again" makes the whole takes anew)
|
||||
"""
|
||||
import base64
|
||||
import difflib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
ROOT = os.path.normpath(os.path.join(HERE, "..", ".."))
|
||||
sys.path.insert(0, os.path.join(ROOT, "Tools", "audio"))
|
||||
import eleven # noqa: E402
|
||||
|
||||
RAW = os.path.join(ROOT, "Tools", "audio", "eleven_raw")
|
||||
CREW = os.path.join(ROOT, "ArtSource", "Trailer", "crew")
|
||||
BOSS = os.path.join(ROOT, "ArtSource", "Trailer", "boss")
|
||||
MODEL = "eleven_v4"
|
||||
RATE = 24000
|
||||
|
||||
FO, GR, EN, TO = "rPMkKgdwgIwqv4fXgR6N", "Q0Co3mt4NHZCSmKqCMMo", "sWsBiVcjjowceAScTnu3", "i9SZdx1xJqqryIiaFdmN"
|
||||
DIRECTOR, ASSISTANT = "1BfrkuYXmEwp8AWqSLWk", "fgDJOgmENIR82PueQrVs"
|
||||
GA, TA = "[strong Indian accent] ", "[strong Singaporean accent] "
|
||||
|
||||
# the evening, in the order the trailer tells it
|
||||
EVENING = [
|
||||
("to_nails", TO, TA + "[deadpan] [quietly] ...these are nail scissors."),
|
||||
("fo_rows", FO, "[confident] Okay team. Rows. Straight rows."),
|
||||
("gr_big", GR, GA + "[curious] Wait... how big is this planet?"),
|
||||
("to_sky", TO, TA + "[awed] [softly] Guys... look at the sky."),
|
||||
("fo_hand", FO, "[urgent] Hand it in, hand it in!"),
|
||||
("gr_catch", GR, GA + "[mischievously] Catch!"),
|
||||
("fo_back", FO, "[excited] [laughs] We are SO back."),
|
||||
("en_pickup", EN, "[suspicious] Who took the pickup?"),
|
||||
("gr_nobody", GR, GA + "[shouting] [laughing] Nobody!"),
|
||||
("en_works", EN, "[proud] It works. It actually works."),
|
||||
("en_mostly", EN, "[sighs] ...it mostly works."),
|
||||
("to_rain", TO, TA + "[worried] Is the rain... eating the grass?"),
|
||||
("fo_save", FO, "[shouting] The bundles! Save the bundles!"),
|
||||
("gr_goin", GR, GA + "[excited] [shouting] I'm going in!"),
|
||||
("to_did", TO, TA + "[amazed] [softly] We did that?"),
|
||||
("fo_did", FO, "[proud] [warmly] We did that."),
|
||||
("gr_keep", GR, GA + "[hopeful] Can we keep the combine?"),
|
||||
]
|
||||
|
||||
# their calls, whole, from the game's own scripts; then which phrases the trailer takes out of each
|
||||
LINES = json.load(open(os.path.join(ROOT, "Tools", "director", "lines.json"), encoding="utf-8"))["lines"]
|
||||
ASST = json.load(open(os.path.join(ROOT, "Tools", "director", "assistant_lines.json"), encoding="utf-8"))["lines"]
|
||||
SPEECHES = {
|
||||
"intro": (DIRECTOR, LINES["dir_intro"], [("dir_earth", "EARTH IS OUT OF GRASS! NO GRASS!"),
|
||||
("dir_scissors", "I don't care if you have to use nail scissors!")]),
|
||||
"m100": (DIRECTOR, LINES["dir_m100"], [("dir_did", "You magnificent idiots actually did it.")]),
|
||||
"thrown": (ASSISTANT, ASST["asst_thrown"], [("asst_noted", "You got thrown by a twister. [pause] Noted.")]),
|
||||
}
|
||||
|
||||
HEADSET = ("highpass=f=260,lowpass=f=4200,acompressor=threshold=-20dB:ratio=4:attack=5:release=60:makeup=4,"
|
||||
"aecho=0.8:0.5:12:0.08,volume=-1dB,alimiter=limit=0.89")
|
||||
CLEAN = "apad=pad_dur=0.25,loudnorm=I=-16:TP=-1.5:LRA=11"
|
||||
|
||||
|
||||
def fetch(name, path, payload):
|
||||
"""A take with timings, kept; made again only when asked."""
|
||||
wav, meta = os.path.join(RAW, f"whole_{name}.wav"), os.path.join(RAW, f"whole_{name}.json")
|
||||
if os.path.exists(meta) and "again" not in sys.argv:
|
||||
return np.frombuffer(open_pcm(wav), np.int16).astype(np.float32) / 32768, json.load(open(meta))
|
||||
d = json.loads(eleven.post(path, payload, accept="application/json"))
|
||||
pcm = base64.b64decode(d.pop("audio_base64"))
|
||||
os.makedirs(RAW, exist_ok=True)
|
||||
eleven.save_pcm(wav, pcm, channels=1, rate=RATE)
|
||||
json.dump(d, open(meta, "w"), indent=1)
|
||||
print("made", os.path.basename(wav), "%.1fs" % (len(pcm) / 2 / RATE))
|
||||
return np.frombuffer(pcm, np.int16).astype(np.float32) / 32768, d
|
||||
|
||||
|
||||
def open_pcm(path):
|
||||
import wave
|
||||
with wave.open(path) as w:
|
||||
return w.readframes(w.getnframes())
|
||||
|
||||
|
||||
def tighten(x, gap=0.3):
|
||||
"""Shorten any silence inside a phrase to `gap` seconds: a pause the tag asked for, not a hole."""
|
||||
hop = RATE // 100
|
||||
e = np.array([np.sqrt(np.mean(x[i:i + hop] ** 2)) for i in range(0, len(x) - hop, hop)])
|
||||
quiet = e < max(1e-4, 0.03 * e.max())
|
||||
keep = np.ones(len(x), bool)
|
||||
i = 0
|
||||
while i < len(quiet):
|
||||
if quiet[i]:
|
||||
j = i
|
||||
while j < len(quiet) and quiet[j]:
|
||||
j += 1
|
||||
if 0 < i and j < len(quiet) and (j - i) * hop > gap * RATE:
|
||||
keep[i * hop + int(gap / 2 * RATE):j * hop - int(gap / 2 * RATE)] = False
|
||||
i = j
|
||||
else:
|
||||
i += 1
|
||||
return x[keep]
|
||||
|
||||
|
||||
def write(x, out, chain):
|
||||
"""Trim the ends, run the chain, 48 kHz mono."""
|
||||
trim = "silenceremove=start_periods=1:start_threshold=-40dB,areverse,silenceremove=start_periods=1:start_threshold=-40dB,areverse"
|
||||
pcm = (np.clip(x, -1, 1) * 32767).astype(np.int16).tobytes()
|
||||
subprocess.run(["ffmpeg", "-v", "error", "-y", "-f", "s16le", "-ar", str(RATE), "-ac", "1", "-i", "-",
|
||||
"-af", trim + "," + chain, "-ar", "48000", "-ac", "1", out], input=pcm, check=True)
|
||||
|
||||
|
||||
def words(text):
|
||||
"""The words a line says, without its tags, as whisper would spell them."""
|
||||
text = re.sub(r"\[[^\]]*\]", " ", text)
|
||||
return [w for w in re.sub(r"[^a-z' ]", " ", text.lower()).split() if w]
|
||||
|
||||
|
||||
_heard = None
|
||||
|
||||
|
||||
def heard(x):
|
||||
"""Every word in a take, with when it was said (faster-whisper on the CPU)."""
|
||||
global _heard
|
||||
from faster_whisper import WhisperModel
|
||||
if _heard is None:
|
||||
_heard = WhisperModel("small.en", device="cpu", compute_type="int8")
|
||||
sixteen = np.interp(np.arange(0, len(x), RATE / 16000), np.arange(len(x)), x).astype(np.float32)
|
||||
segs, _ = _heard.transcribe(sixteen, beam_size=5, word_timestamps=True)
|
||||
out = []
|
||||
for sg in segs:
|
||||
for w in sg.words:
|
||||
for part in words(w.word):
|
||||
out.append((part, w.start, w.end))
|
||||
return out
|
||||
|
||||
|
||||
def place(x, lines):
|
||||
"""Where each line (a list of words) was said in the take: matched in order against what whisper heard. The
|
||||
timings the API sends with a dialogue only say which input is which, not where its speech is."""
|
||||
got = heard(x)
|
||||
flat, owner = [], []
|
||||
for k, ws in enumerate(lines):
|
||||
flat += ws
|
||||
owner += [k] * len(ws)
|
||||
sm = difflib.SequenceMatcher(None, flat, [g[0] for g in got], autojunk=False)
|
||||
hit = {}
|
||||
for a, b, n in sm.get_matching_blocks():
|
||||
for i in range(n):
|
||||
k = owner[a + i]
|
||||
s, e = got[b + i][1], got[b + i][2]
|
||||
lo, hi = hit.get(k, (s, e))
|
||||
hit[k] = (min(lo, s), max(hi, e))
|
||||
missing = [k for k in range(len(lines)) if k not in hit]
|
||||
if missing:
|
||||
raise SystemExit("not heard: " + ", ".join(" ".join(lines[k]) for k in missing))
|
||||
return [hit[k] for k in range(len(lines))]
|
||||
|
||||
|
||||
def gap(x, a, b):
|
||||
"""The quietest moment between a and b seconds: the middle of the longest near-silence, else the softest 10 ms.
|
||||
Whisper's word ends run late and its starts early, so lines are parted here, not at its timings."""
|
||||
hop = RATE // 100
|
||||
lo, hi = int(max(0, a) * RATE), int(min(len(x) / RATE, b) * RATE)
|
||||
e = np.array([np.sqrt(np.mean(x[i:i + hop] ** 2)) + 1e-9 for i in range(lo, max(lo + 1, hi - hop), hop)])
|
||||
db = 20 * np.log10(e)
|
||||
quiet = db < -50
|
||||
best, run, start = (0, 0), 0, 0
|
||||
for i, q in enumerate(quiet):
|
||||
if q:
|
||||
if run == 0:
|
||||
start = i
|
||||
run += 1
|
||||
if run > best[0]:
|
||||
best = (run, start)
|
||||
else:
|
||||
run = 0
|
||||
k = best[1] + best[0] // 2 if best[0] else int(np.argmin(db))
|
||||
return (lo + k * hop) / RATE
|
||||
|
||||
|
||||
def cut(x, spans, k):
|
||||
"""Line k's stretch: from the quiet before it to the quiet after it (the ends are trimmed to the voice afterwards)."""
|
||||
a, b = spans[k]
|
||||
lo = gap(x, spans[k - 1][1] - 0.3, a + 0.2) if k > 0 else 0.0
|
||||
hi = gap(x, b - 0.2, spans[k + 1][0] + 0.6) if k + 1 < len(spans) else len(x) / RATE
|
||||
return x[int(lo * RATE):int(hi * RATE)]
|
||||
|
||||
|
||||
def evening():
|
||||
x, _ = fetch("evening", f"/text-to-dialogue/with-timestamps?output_format=pcm_{RATE}",
|
||||
{"model_id": MODEL, "inputs": [{"text": t, "voice_id": v} for _, v, t in EVENING]})
|
||||
spans = place(x, [words(t) for _, _, t in EVENING])
|
||||
os.makedirs(CREW, exist_ok=True)
|
||||
for k, (name, _, _) in enumerate(EVENING):
|
||||
write(tighten(cut(x, spans, k)), os.path.join(CREW, name + ".wav"), HEADSET)
|
||||
print(f"{name:12s} {spans[k][0]:6.2f}-{spans[k][1]:6.2f}")
|
||||
|
||||
|
||||
def speeches():
|
||||
os.makedirs(BOSS, exist_ok=True)
|
||||
for name, (voice, text, cuts) in SPEECHES.items():
|
||||
x, _ = fetch(name, f"/text-to-speech/{voice}/with-timestamps?output_format=pcm_{RATE}",
|
||||
{"model_id": MODEL, "text": text, "voice_settings": {"stability": 0.5}})
|
||||
# the whole speech in sentences, so each phrase is matched where it really falls
|
||||
parts, which = [], {}
|
||||
rest = text
|
||||
for out, phrase in cuts:
|
||||
i = rest.find(phrase)
|
||||
if i < 0:
|
||||
raise SystemExit(f"{name}: no '{phrase}' in its script")
|
||||
if words(rest[:i]):
|
||||
parts.append(words(rest[:i]))
|
||||
which[out] = len(parts)
|
||||
parts.append(words(phrase))
|
||||
rest = rest[i + len(phrase):]
|
||||
if words(rest):
|
||||
parts.append(words(rest))
|
||||
spans = place(x, parts)
|
||||
for out, _ in cuts:
|
||||
k = which[out]
|
||||
write(tighten(cut(x, spans, k)), os.path.join(BOSS, out + ".wav"), CLEAN)
|
||||
print(f"{out:12s} {spans[k][0]:6.2f}-{spans[k][1]:6.2f}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
evening()
|
||||
speeches()
|
||||
106
Tools/audio/eleven.py
Normal file
106
Tools/audio/eleven.py
Normal file
@ -0,0 +1,106 @@
|
||||
"""ElevenLabs sound/music fetcher for WRAP PARTY.
|
||||
|
||||
The API key is read at runtime from the ELEVEN_KEY_FILE env var (kept outside the project).
|
||||
Raw candidates are saved to Tools/audio/eleven_raw/<name>_<k>.wav (44.1 kHz PCM).
|
||||
|
||||
Usage:
|
||||
python eleven.py sfx <name> <duration> <prompt influence> "<prompt>" [count]
|
||||
python eleven.py music <name> <length_ms> "<prompt>"
|
||||
python eleven.py tts <name> <voice_id> "<text with v3 audio tags>" [count]
|
||||
python eleven.py credits
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
import wave
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
RAW = os.path.join(HERE, "eleven_raw")
|
||||
API = "https://api.elevenlabs.io/v1"
|
||||
|
||||
|
||||
def key():
|
||||
with open(os.environ["ELEVEN_KEY_FILE"], encoding="utf-8") as f:
|
||||
return f.read().strip()
|
||||
|
||||
|
||||
def post(path, payload, accept="audio/*"):
|
||||
req = urllib.request.Request(API + path, data=json.dumps(payload).encode(), method="POST",
|
||||
headers={"xi-api-key": key(), "Content-Type": "application/json", "Accept": accept})
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=600) as r:
|
||||
return r.read()
|
||||
except urllib.error.HTTPError as e:
|
||||
raise SystemExit(f"HTTP {e.code}: {e.read()[:600].decode(errors='replace')}")
|
||||
|
||||
|
||||
def credits():
|
||||
req = urllib.request.Request(API + "/user/subscription", headers={"xi-api-key": key()})
|
||||
with urllib.request.urlopen(req, timeout=60) as r:
|
||||
d = json.load(r)
|
||||
return d["character_limit"] - d["character_count"]
|
||||
|
||||
|
||||
def save_pcm(path, pcm, channels=1, rate=44100):
|
||||
with wave.open(path, "wb") as w:
|
||||
w.setnchannels(channels)
|
||||
w.setsampwidth(2)
|
||||
w.setframerate(rate)
|
||||
w.writeframes(pcm)
|
||||
|
||||
|
||||
def sfx(name, duration, influence, prompt, count=1):
|
||||
os.makedirs(RAW, exist_ok=True)
|
||||
for k in range(count):
|
||||
out = os.path.join(RAW, f"{name}_{k}.wav")
|
||||
if os.path.exists(out):
|
||||
print("skip", out)
|
||||
continue
|
||||
payload = {"text": prompt, "prompt_influence": influence}
|
||||
if duration > 0:
|
||||
payload["duration_seconds"] = duration
|
||||
pcm = post("/sound-generation?output_format=pcm_44100", payload)
|
||||
save_pcm(out, pcm, channels=2) # pcm_44100 comes back as interleaved stereo
|
||||
print("saved", out, f"{len(pcm) / 2 / 44100:.2f}s")
|
||||
|
||||
|
||||
def tts(name, voice, text, count=1):
|
||||
"""Speech with the v3 model, or ELEVEN_MODEL (it reads [angry], [shouting], [pause]... tags). Mono 24 kHz."""
|
||||
os.makedirs(RAW, exist_ok=True)
|
||||
for k in range(count):
|
||||
out = os.path.join(RAW, f"{name}_{k}.wav")
|
||||
if os.path.exists(out):
|
||||
print("skip", out)
|
||||
continue
|
||||
# 44.1 kHz PCM is a Pro-tier format; 24 kHz is plenty for a voice on a phone
|
||||
pcm = post(f"/text-to-speech/{voice}?output_format=pcm_24000",
|
||||
{"text": text, "model_id": os.environ.get("ELEVEN_MODEL", "eleven_v3"), "voice_settings": {"stability": 0.5}})
|
||||
save_pcm(out, pcm, channels=1, rate=24000)
|
||||
print("saved", out, f"{len(pcm) / 2 / 24000:.2f}s")
|
||||
|
||||
|
||||
def music(name, length_ms, prompt):
|
||||
os.makedirs(RAW, exist_ok=True)
|
||||
out = os.path.join(RAW, f"{name}.mp3")
|
||||
if os.path.exists(out):
|
||||
print("skip", out)
|
||||
return
|
||||
data = post("/music?output_format=mp3_44100_192",
|
||||
{"prompt": prompt, "music_length_ms": length_ms, "force_instrumental": True}, accept="audio/mpeg")
|
||||
with open(out, "wb") as f:
|
||||
f.write(data)
|
||||
print("saved", out, len(data), "bytes")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cmd = sys.argv[1]
|
||||
if cmd == "credits":
|
||||
print("credits left:", credits())
|
||||
elif cmd == "sfx":
|
||||
sfx(sys.argv[2], float(sys.argv[3]), float(sys.argv[4]), sys.argv[5], int(sys.argv[6]) if len(sys.argv) > 6 else 1)
|
||||
elif cmd == "tts":
|
||||
tts(sys.argv[2], sys.argv[3], sys.argv[4], int(sys.argv[5]) if len(sys.argv) > 5 else 1)
|
||||
elif cmd == "music":
|
||||
music(sys.argv[2], int(sys.argv[3]), sys.argv[4])
|
||||
32
Tools/audio/eleven_batch.sh
Normal file
32
Tools/audio/eleven_batch.sh
Normal file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
# Batch-generate ElevenLabs candidates. Needs ELEVEN_KEY_FILE in env. Skips files that exist.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run music music_game 90000 "Upbeat bouncy playful funk-pop instrumental loop for a cheerful co-op video game about popping bubble wrap in a sunny warehouse: punchy clean drums with claps, slap-style groovy bass, bright clavinet and Rhodes stabs, little marimba and glockenspiel melody, happy and energetic but not frantic, 104 BPM, steady consistent groove from start to end with no intro and no outro so it can loop, no vocals" &
|
||||
|
||||
run sfx popseq 4 0.7 "a sequence of single bubble wrap bubbles popped one at a time with fingers, about eight separate crisp pops with short pauses between them, close mic, dry room, satisfying sharp snaps, no background noise" 2
|
||||
run sfx pop_big 1 0.6 "one large bubble wrap bubble popping loudly, deep punchy satisfying pop, close mic, dry, no background noise" 2
|
||||
run sfx pop_golden 2 0.5 "bubble pop followed by a magical glittering chime sparkle, cute video game reward sound" 2
|
||||
run sfx tape_rip 1.5 0.6 "packing tape ripped off a cardboard box in one long fast pull, crackly sticky tearing, close mic, no background noise" 3
|
||||
run sfx box_burst 1.5 0.5 "cardboard box flaps flung open quickly and packing peanuts spill out with a rustle, close mic" 2
|
||||
run sfx thud 3 0.6 "three separate empty cardboard boxes dropped onto a concrete floor one after another, hollow cardboard thuds with pauses between" 1
|
||||
run sfx plastic_grab 1 0.6 "hand grabbing a sheet of bubble wrap, short plastic crinkle rustle, close mic, no background" 2
|
||||
run sfx throw_whoosh 0.8 0.6 "quick short whoosh of an object thrown through the air, swish" 2
|
||||
run sfx recycler_grind 2.5 0.5 "industrial shredder machine briefly grinding and crunching plastic bubble wrap and cardboard, motor hum, then winding down" 2
|
||||
run sfx cash_register 1.5 0.6 "old mechanical cash register ka-ching with a bright bell and drawer opening, close mic" 3
|
||||
run sfx shift_start_horn 2 0.6 "delivery truck horn honking twice outside a warehouse, friendly short honks" 2
|
||||
run sfx shift_complete 3 0.6 "short cheerful victory fanfare jingle, marimba and brass, cartoon game level complete, happy" 3
|
||||
run sfx confetti 1.5 0.6 "party popper confetti cannon pop with paper confetti rustling down, cheerful" 2
|
||||
run sfx footsteps 4 0.6 "footsteps walking on a concrete warehouse floor in rubber sneakers, about eight distinct steps, close mic, no background" 1
|
||||
run sfx land 1 0.6 "person landing on their feet on concrete floor after a jump, single soft heavy thud, close mic" 1
|
||||
run sfx jump 0.6 0.5 "quick cartoon jump hop, light cloth movement and soft hup whoosh, no voice" 1
|
||||
run sfx roll_unroll 2 0.6 "a big roll of bubble wrap unrolling quickly across a floor, plastic rustling rolling and slapping, a few pops" 2
|
||||
run sfx mallet_thump 1 0.6 "rubber mallet slamming down hard on bubble wrap on a wooden table, heavy thump with several bubbles bursting at once" 2
|
||||
run sfx roller_engine 8 0.5 "small diesel road roller engine idling steadily, chugging, constant, no revving" 1
|
||||
run sfx conveyor 8 0.5 "conveyor belt running steadily in a warehouse, rollers rattling softly, constant motor hum" 1
|
||||
run sfx ambience 15 0.4 "calm quiet sunny warehouse interior room tone, soft ventilation hum, very faint distant birds chirping outside" 1
|
||||
run sfx ui_click 0.6 0.5 "soft bubbly cartoon user interface click, gentle rounded bloop, game menu button" 2
|
||||
wait
|
||||
echo BATCHDONE
|
||||
148
Tools/audio/eleven_batch_farm.sh
Normal file
148
Tools/audio/eleven_batch_farm.sh
Normal file
@ -0,0 +1,148 @@
|
||||
#!/usr/bin/env bash
|
||||
# GRASS CUTTER farm sound candidates: every clip the game plays, re-imagined for the grass planet, plus the new
|
||||
# belt / battery / tool / vehicle clips the code will use. Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
# eleven_batch_farm.sh music1 the one music track that prices the rest
|
||||
# eleven_batch_farm.sh music the remaining music tracks
|
||||
# eleven_batch_farm.sh sfx all sound effects
|
||||
# eleven_batch_farm.sh sfx2 second takes of the ones that failed the numbers
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
MAX=2 # the Starter plan allows two requests at once
|
||||
run() {
|
||||
while [ "$(jobs -rp | wc -l)" -ge "$MAX" ]; do wait -n; done
|
||||
( $E "$@" || echo "FAILED $2" ) &
|
||||
}
|
||||
|
||||
STYLE="Instrumental only, no vocals. Warm cosy farming game soundtrack, folk bluegrass meets cosy indie: rolling banjo, fingerpicked acoustic guitar, sweet fiddle, upright bass, light brushed percussion and soft hand claps, with a touch of space-age wobble from a gentle theremin-like synth and tape vibrato. Bright, friendly, slightly comic, played by a small live band."
|
||||
LOOPY="Keeps the same groove and energy from the first second to the last, no intro, no fade out, no big ending, made to loop."
|
||||
|
||||
music1() {
|
||||
$E music farm_music_game 150000 "$STYLE Cheerful hard-working daytime field tune in G major at 112 BPM, bouncy banjo roll under a catchy fiddle melody, whistleable hook. $LOOPY" || echo "FAILED farm_music_game"
|
||||
}
|
||||
|
||||
# 150 s costs about 1875 credits. Two takes of each tune; the first take of music_game comes from music1.
|
||||
music_rest() {
|
||||
GAME="$STYLE Cheerful hard-working daytime field tune in G major at 112 BPM, bouncy banjo roll under a catchy fiddle melody, whistleable hook. $LOOPY"
|
||||
GAME2="$STYLE A different daytime tune in D major at 96 BPM, an easy strolling sunny afternoon feel, acoustic guitar carries the melody, fiddle answers it, banjo sits lightly behind, playful wobbly synth fills. $LOOPY"
|
||||
MENU="$STYLE Warm welcoming main theme in C major at 84 BPM, front porch at golden hour, fiddle sings a gentle memorable melody over fingerpicked guitar and soft banjo, wobbly synth shimmer drifting above like a distant planet. $LOOPY"
|
||||
NIGHT="$STYLE Gentle sparse night version in A minor moving to F major at 66 BPM, a quiet lullaby under the stars, lone fingerpicked guitar with lots of space, soft long fiddle notes, a few quiet banjo plucks, faint wobbly synth pad, no drums, no claps. $LOOPY"
|
||||
run music farm_music_game_b 150000 "$GAME"
|
||||
run music farm_music_game2 150000 "$GAME2"
|
||||
run music farm_music_game2_b 150000 "$GAME2"
|
||||
run music farm_music_menu 150000 "$MENU"
|
||||
run music farm_music_menu_b 150000 "$MENU"
|
||||
run music farm_music_night 150000 "$NIGHT"
|
||||
run music farm_music_night_b 150000 "$NIGHT"
|
||||
wait
|
||||
}
|
||||
|
||||
sfx() {
|
||||
NO="close mic, no background, no voice, no music"
|
||||
|
||||
# heard the most: two takes each
|
||||
run sfx farm_steps_grass 6 0.6 "boots walking slowly on short dry grass, one step per second with clear silence between steps, each step a soft crunchy rustle, close mic, no background, no voice, no music" 2
|
||||
run sfx farm_steps_wood 6 0.6 "boots walking slowly on a hollow wooden deck of planks, one step per second with clear silence between steps, each step a warm dull wooden knock, close mic, no background, no voice, no music" 2
|
||||
run sfx farm_scythe 1 0.6 "a single scythe swing slicing through tall dry grass, a fast sharp metallic swish with crisp grass blades tearing and falling, $NO" 6
|
||||
run sfx farm_snip 0.5 0.7 "a single snip of steel garden hand shears cutting grass, crisp metal blades closing once, tiny rustle of grass, $NO" 6
|
||||
run sfx farm_cash 1.6 0.6 "old brass cash register at a country market stall, a bright bell ding, drawer sliding open and a few coins dropping into a wooden tray, $NO" 2
|
||||
run sfx farm_coin_tick 0.5 0.7 "one tiny copper coin tick on a wooden counter, very short bright tap, $NO" 2
|
||||
run sfx farm_ui_click 0.5 0.7 "one short soft click of a small wooden button, warm dry wooden tick, game menu click, $NO" 2
|
||||
run sfx farm_ui_hover 0.5 0.7 "one very faint tiny soft wooden tap, delicate light tick, game menu hover, $NO" 2
|
||||
|
||||
# interface and rewards
|
||||
run sfx farm_ui_open 0.8 0.6 "a little wooden crate lid lifting open with a soft friendly creak and a light knock, game menu opening, $NO" 1
|
||||
run sfx farm_ui_close 0.8 0.6 "a little wooden crate lid closing with a soft gentle wooden thud, game menu closing, $NO" 1
|
||||
run sfx farm_perk 2 0.6 "short cheerful ascending banjo pluck arpeggio ending on a bright small bell, cosy game reward jingle, no voice" 1
|
||||
run sfx farm_milestone 3 0.6 "short triumphant fiddle and banjo flourish ending on a bright major chord with a soft sparkly chime, cosy game achievement jingle, no voice" 1
|
||||
run sfx farm_error 0.6 0.7 "two quick dull low wooden knocks, comic negative game error sound, $NO" 1
|
||||
run sfx farm_tank_full 1 0.6 "an overstuffed canvas sack squeezed full with a puffy rustle, then one small brass cowbell clank, game warning, $NO" 1
|
||||
|
||||
# the farmer's body
|
||||
run sfx farm_jump 0.5 0.6 "quick push off from the ground in work clothes, short soft cloth swish with a small grass rustle, $NO" 1
|
||||
run sfx farm_land 0.6 0.6 "boots landing on soft grassy soil, a muffled thump with a short dry grass rustle, $NO" 1
|
||||
run sfx farm_whoosh 0.5 0.6 "short soft airy swoosh of a handful of grass thrown through the air, light leafy flutter, $NO" 1
|
||||
run sfx farm_whiff 0.7 0.6 "a shears blade swishing through empty air and missing, short thin metallic whiff, $NO" 1
|
||||
|
||||
# grass handling
|
||||
run sfx farm_scoop 0.7 0.6 "an armful of dry grass clippings dumped into a wooden bin, a thick soft rustling flump, $NO" 1
|
||||
run sfx farm_gulp 0.5 0.6 "a tiny puff of grass clippings dropping into a wicker basket, one quick soft rustle, $NO" 1
|
||||
run sfx farm_press_squash 1 0.6 "a bundle of straw squeezed tight and tied with twine, a dry crackling cinch and a quick rope snap, $NO" 1
|
||||
run sfx farm_compactor 1 0.6 "a hay binding machine chomping a load of dry grass, one heavy fibrous crunch with a wooden thump and a ratchet clack, $NO" 1
|
||||
run sfx farm_barrel 0.5 0.6 "a small straw bale bumping onto wooden boards, a soft heavy dry thump with a little rustle, $NO" 1
|
||||
run sfx farm_brick 0.5 0.6 "a dense pressed hay brick knocked against a wooden crate, a hard dull woody clunk with a slight crackle of dry straw, $NO" 1
|
||||
run sfx farm_grab 0.5 0.6 "a work glove gripping a wooden tool handle, a short leather creak and a soft wooden tap, $NO" 1
|
||||
run sfx farm_cargo_load 0.7 0.6 "a hay bundle landing in a rope cargo net above a wooden basket, a soft bouncy thump with dry rustle and creak, $NO" 1
|
||||
run sfx farm_launcher 0.8 0.6 "a pneumatic farm cannon firing a hay bundle, one hollow air thoomp with a spring twang, cartoony, $NO" 1
|
||||
run sfx farm_thump_small 0.6 0.6 "a small bundle dropping into thick tall dry grass, soft rustling swish and a muffled thump on soil, $NO" 1
|
||||
run sfx farm_thump_big 1.2 0.6 "a heavy wooden crate crashing down into dense tall dry grass, a big dry rustling whoosh and a deep thump on soil with bits of dirt pattering, $NO" 1
|
||||
|
||||
# building
|
||||
run sfx farm_build_place 0.6 0.6 "a wooden plank mallet-knocked into place on a deck, two quick firm knocks with a warm wooden ring, $NO" 1
|
||||
run sfx farm_build_remove 0.6 0.6 "a wooden plank pried up off a deck, a short wood creak and the small pop of a nail, $NO" 1
|
||||
run sfx farm_build_rotate 0.5 0.7 "one small dry wooden ratchet click, $NO" 1
|
||||
|
||||
# belts and machines
|
||||
run sfx farm_splitter 0.5 0.7 "a small wooden flap swinging over on a hinge and clacking against a wooden stop, one light clack, $NO" 1
|
||||
run sfx farm_merger 0.5 0.7 "a wooden chute gate dropping shut with a short hollow wooden clunk and a little iron latch, $NO" 1
|
||||
run sfx farm_press_thump 1 0.6 "a heavy iron and oak brick press stroke, a deep muffled thump with the crunch of compacted hay and a small hiss of air, $NO" 1
|
||||
run sfx farm_battery_full 1.2 0.6 "friendly electric charge complete sound, a small rising zap ending on two bright ding tones, cartoon farm gadget, $NO" 1
|
||||
run sfx farm_power_low 1.5 0.6 "a small electric machine running out of power, motor pitch sagging down with a soft wobble and a small sad double beep, $NO" 1
|
||||
|
||||
# loops, steady so the crossfade cannot be heard
|
||||
S="constant steady sound from start to finish, no starting, no stopping, no revving, no voice, no music"
|
||||
run sfx farm_conveyor 8 0.5 "old wooden farm conveyor belt running, wooden slats rattling over rollers with soft chain ticks, gentle rhythmic clatter, no engine, $S" 1
|
||||
run sfx farm_machine_hum 8 0.5 "hay dryer machine running, a warm fan blowing air with a low motor hum and a soft rattle of wooden housing, $S" 1
|
||||
run sfx farm_battery_hum 6 0.5 "faint quiet electric hum of a small transformer with a very soft buzz, $S" 1
|
||||
run sfx farm_grass_rustle 6 0.5 "tall dry grass being mowed through by hand, continuous leafy rustling and swishing of blades of grass, $S" 1
|
||||
run sfx farm_cut 6 0.5 "mower blades chewing through thick dry grass, steady shredding with fluttering clippings hitting a metal hopper, no engine, $S" 1
|
||||
run sfx farm_mower_engine 8 0.5 "small four stroke ride-on lawn mower petrol engine at a steady speed, friendly putt-putt chugging, outdoors, $S" 1
|
||||
run sfx farm_tractor_engine 8 0.5 "old farm tractor diesel engine at a steady working speed, deep low thumping chug, outdoors, $S" 1
|
||||
run sfx farm_combine_engine 8 0.5 "huge combine harvester working, big diesel engine rumble under a rotating threshing drum whirr, outdoors, $S" 1
|
||||
run sfx farm_pickup_engine 8 0.5 "old pickup truck petrol engine cruising at a steady speed, smooth mid rumble, $S" 1
|
||||
run sfx farm_robot_mower 6 0.5 "small cute electric robot lawn mower driving along, smooth electric motor whine with a spinning blade hum, $S" 1
|
||||
|
||||
# ambience
|
||||
run sfx farm_wind_meadow 30 0.5 "wide open summer meadow, gentle wind blowing over tall grass with soft leafy swells, a few distant songbirds far away, warm and calm, no water, no waves, no voices, no traffic, no music" 1
|
||||
run sfx farm_night_crickets 30 0.5 "warm calm night in a meadow, many crickets chirping steadily, a very soft breeze in the grass, one distant owl, no water, no frogs, no voices, no traffic, no music" 1
|
||||
wait
|
||||
}
|
||||
|
||||
# Second round for what round one got wrong: very short requests often came back as a sub-bass bump or near silence,
|
||||
# so these ask for longer takes (trimmed in finalize_farm.py) and describe the transient itself.
|
||||
sfx2() {
|
||||
NO="clearly audible, close mic, no background, no voice, no music"
|
||||
S="constant steady sound from start to finish, no starting, no stopping, no voice, no music"
|
||||
run sfx farm2_steps_grass 6 0.8 "loud crunchy boot footsteps on dry stiff grass, slow walking, each footstep a crisp crackling crunch followed by silence, $NO" 2
|
||||
run sfx farm2_land 1 0.7 "person in boots jumping down and landing hard on grassy earth, one solid thud with a crunchy burst of dry grass, $NO" 1
|
||||
run sfx farm2_jump 1 0.7 "quick rustle of dry grass and a canvas work jacket flapping as someone hops up, one fast crisp swish, $NO" 1
|
||||
run sfx farm2_whoosh 1 0.7 "one fast airy whoosh with papery leafy flutter, a bunch of dry grass flung past the microphone, bright crisp swish, $NO" 1
|
||||
run sfx farm2_thump_small 1 0.7 "a bundle of straw dropped into deep dry grass, one soft thud and a loud dry crunchy rustle, $NO" 1
|
||||
run sfx farm2_press_thump 1.5 0.7 "one stroke of a big oak hand press squashing hay into a brick, a loud solid wooden slam with crackling straw crunch and a short puff of air, $NO" 1
|
||||
run sfx farm2_build_place 1 0.7 "two sharp mallet hits on a wooden plank, bright hollow wooden knocks with a short ring, loud, $NO" 1
|
||||
run sfx farm2_build_remove 1 0.7 "a nailed wooden board being pried up, one long squeaky wood creak ending in a sharp nail pop, $NO" 1
|
||||
run sfx farm2_tank_full 1.2 0.7 "stuffing a burlap sack until it is packed tight, one dense soft crunchy thump of straw, then a single clear ring of a small brass bell, $NO" 1
|
||||
run sfx farm2_power_low 2 0.7 "an electric motor winding down and dying, whirring pitch falling steadily lower and slower until it stops, cartoon power failure, $NO" 1
|
||||
run sfx farm2_cargo_load 1 0.7 "a heavy bale of hay caught by a rope net, one deep soft thud with a springy rope creak and dry straw crackle, $NO" 1
|
||||
run sfx farm2_cut 6 0.7 "continuous string trimmer shredding thick dry grass, unbroken crisp whirring and tearing of grass with clippings fluttering, loud and close, $S" 1
|
||||
run sfx farm2_conveyor 8 0.7 "wooden slat conveyor belt running at full speed, unbroken fast rattling of wooden slats over rollers with a light squeaky chain, loud and close, $S" 1
|
||||
run sfx farm2_battery_hum 6 0.7 "loud 100 hertz electric mains hum from a transformer, a pure steady buzzing drone, close mic, $S" 1
|
||||
run sfx farm2_wind 30 0.7 "soft low wind blowing across an open prairie field recording, deep gentle gusts rising and falling, leafy grass swaying, warm and full, no hiss, no water, no waves, no birds, no voices, no traffic, no music" 1
|
||||
run sfx farm2_birds 30 0.7 "a few songbirds calling far away across a sunny field, short sweet phrases with long quiet gaps between them, no wind, no water, no insects, no voices, no music" 1
|
||||
wait
|
||||
}
|
||||
|
||||
# Both takes of the plank came back as a ratchet: ask for the creak alone.
|
||||
sfx3() {
|
||||
run sfx farm3_build_remove 1 0.7 "the slow creak of a wooden board bending, one long low woody squeak, then a dry crack, clearly audible, close mic, no background, no voice, no music" 1
|
||||
wait
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
music1) music1 ;;
|
||||
music) music_rest ;;
|
||||
sfx) sfx ;;
|
||||
sfx2) sfx2 ;;
|
||||
sfx3) sfx3 ;;
|
||||
*) echo "usage: $0 music1|music|sfx"; exit 1 ;;
|
||||
esac
|
||||
echo BATCHDONE
|
||||
23
Tools/audio/eleven_batch_grass.sh
Normal file
23
Tools/audio/eleven_batch_grass.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# GRASS CUTTER sound candidates (mowing, engines, meadow). Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run sfx gc_cut_loop 5 0.5 "continuous grass trimmer cutting thick grass, whirring nylon string slicing through tall wet grass with crisp rustling and a soft vacuum suction whoosh, constant, no starting or stopping, close mic" 2
|
||||
run sfx gc_cut_start 1 0.6 "small two-stroke grass trimmer motor revving up quickly from idle, short rising whine, cartoony, close mic, no background" 2
|
||||
run sfx gc_cut_stop 1 0.6 "small grass trimmer motor winding down and stopping, short falling whine with a soft puff, close mic, no background" 2
|
||||
run sfx gc_mower_loop 6 0.5 "ride-on lawn mower petrol engine running steadily, chugging small engine with spinning blade hum, constant, no starting or stopping, outdoor" 2
|
||||
run sfx gc_edge_loop 6 0.5 "industrial rotary grass cutter spinning steadily, deep whirring blade and electric motor hum with soft grass shredding, constant" 2
|
||||
run sfx gc_drone_loop 5 0.5 "small quadcopter drone hovering with buzzing propellers and a little spinning cutting blade shredding grass, constant, no starting or stopping" 2
|
||||
run sfx gc_meadow_loop 14 0.4 "calm open meadow ambience, soft wind rustling through tall grass, crickets chirping, a few distant birds, warm summer afternoon, constant, no voices, no traffic" 2
|
||||
run sfx gc_thud_small 0.6 0.6 "small object dropping into thick tall grass, soft rustling swish and a muffled thump on soil, close mic, no background" 3
|
||||
run sfx gc_thud_big 1.2 0.6 "heavy object crashing down into dense tall grass, big rustling whoosh and a deep thump on soil, close mic, no background" 3
|
||||
run sfx gc_pour_loop 5 0.5 "loose grass clippings pouring steadily out of a bag into a metal hopper, soft papery rustling stream, constant, close mic" 2
|
||||
run sfx gc_crunch 0.5 0.6 "single short crunchy chomp of grass being cut by shears, crisp snip with a little rustle, close mic, no background" 3
|
||||
run sfx gc_bale_thump 0.7 0.6 "a hay bale dropping onto a wooden floor, soft heavy straw thump with a dry rustle, close mic, no background" 3
|
||||
run sfx gc_baler_fill 1.5 0.6 "agricultural hay baler machine compressing a bale, mechanical plunger whump and a ratchet clack, then a twine tie snap, close mic" 2
|
||||
run sfx gc_bag_full 0.8 0.6 "stuffed canvas bag being squeezed full, a puffy squish with a little rustle, cartoony, close mic, no background" 3
|
||||
run sfx gc_growth_roar 6 0.5 "rising deep earthy rumble and creaking of plants growing very fast, rustling swelling into a big whoosh, magical cartoony, ends with rustle" 2
|
||||
wait
|
||||
echo BATCHDONE
|
||||
13
Tools/audio/eleven_batch_music2.sh
Normal file
13
Tools/audio/eleven_batch_music2.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# Stage 18 music: more daytime tunes, a second night tune, a weather tune and a saucer tune, in the farm soundtrack's style.
|
||||
# Needs ELEVEN_KEY_FILE in env. Raw takes land in eleven_raw/; finalize_music2.py makes the loops.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
STYLE="Instrumental only, no vocals. Warm cosy farming game soundtrack, folk bluegrass meets cosy indie: rolling banjo, fingerpicked acoustic guitar, sweet fiddle, upright bass, light brushed percussion and soft hand claps, with a touch of space-age wobble from a gentle theremin-like synth and tape vibrato. Bright, friendly, slightly comic, played by a small live band."
|
||||
LOOPY="Keeps the same groove and energy from the first second to the last, no intro, no fade out, no big ending, made to loop."
|
||||
run music farm_music_game3 150000 "$STYLE A brisk morning hoedown in A major at 124 BPM, chugging mandolin chop and quick banjo rolls, the fiddle plays a perky call-and-response hook with a whistled answer, stomping kick and claps, feels like getting a big job done before lunch. $LOOPY"
|
||||
run music farm_music_game4 150000 "$STYLE A laid-back lo-fi country groove in F major at 88 BPM, dusty brushed drums with a lazy swing, warm upright bass walking, slide dobro melody, soft Rhodes chords and the wobbly synth humming along, mowing in the late afternoon sun. $LOOPY"
|
||||
run music farm_music_game5 150000 "$STYLE An adventurous travelling tune in E minor moving to G major at 108 BPM, driving train-beat on brushes, banjo and fiddle in unison on a heroic riding melody, harmonica fills, big open sky and a long road across a strange green planet. $LOOPY"
|
||||
run music farm_music_night2 150000 "$STYLE A dreamy starry-night waltz in D major at 72 BPM in three-four time, music-box glockenspiel and soft fingerpicked guitar, long gentle fiddle lines, faint warm synth pad with slow tape wobble, fireflies and quiet wonder, no drums. $LOOPY"
|
||||
run music farm_music_storm 150000 "$STYLE A tense stormy-weather version in D minor at 100 BPM, low tremolo fiddle, plucked upright bass ostinato, muted banjo, rumbling floor tom and shakers like rain, the wobbly synth swoops like wind, determined and a little spooky but still playful. $LOOPY"
|
||||
25
Tools/audio/eleven_batch_popsounds.sh
Normal file
25
Tools/audio/eleven_batch_popsounds.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Pop sound packs (Settings > Pop sound). Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
# Standard packs are generated as short sequences and sliced into variants by finalize_popsounds.py.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run sfx pk_crisp 2 0.6 "four separate tiny crisp bubble wrap pops, sharp high plastic snap, close mic, dry, clear silence between each pop, no background" 2 &
|
||||
run sfx pk_chunky 2 0.6 "four separate thick heavy bubble wrap pops, deep juicy low plastic pop, close mic, dry, clear silence between each pop, no background" 2 &
|
||||
run sfx pk_balloon 2 0.6 "four separate small rubber balloon pops, short sharp burst, close mic, dry, clear silence between each pop, no background" 2 &
|
||||
run sfx pk_cork 2 0.6 "four separate champagne cork pops, hollow pop with a tiny airy fizz, close mic, clear silence between each pop, no background" 2 &
|
||||
wait
|
||||
run sfx pk_bloop 2 0.6 "four separate cartoon water droplet bloops, round bubbly plop, close mic, dry, clear silence between each, no background" 2 &
|
||||
run sfx pk_mouth 2 0.6 "four separate finger in cheek mouth pops, hollow wet pop sound, close mic, dry, clear silence between each, no background" 2 &
|
||||
run sfx pk_pew 0.6 0.6 "single retro sci-fi laser blaster shot, pew, short and bright, no background" 2 &
|
||||
run sfx pk_duck 0.6 0.6 "single rubber duck squeak, squeaky bath toy squeezed once, close mic, no background" 2 &
|
||||
wait
|
||||
run sfx pk_boing 0.8 0.6 "single cartoon spring boing, comedic jaw harp bounce, short, no background" 2 &
|
||||
run sfx pk_bonk 0.6 0.6 "single cartoon bonk, hollow wooden knock on a head, comedic hit, short, no background" 2 &
|
||||
run sfx pk_meow 0.8 0.6 "single short cute kitten meow, close mic, no background" 2 &
|
||||
run sfx pk_toot 0.7 0.6 "single short comedic cartoon fart, quick squeaky toot, no background" 2
|
||||
wait
|
||||
run sfx pk_boom 1.5 0.6 "single deep cinematic bass boom hit with a long reverb tail, dramatic meme impact, no background" 2
|
||||
wait
|
||||
echo BATCHDONE
|
||||
17
Tools/audio/eleven_batch_robots.sh
Normal file
17
Tools/audio/eleven_batch_robots.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Robots tree sounds (sweeper bot, cargo drone, launcher, poke bot, gold plater). Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run sfx drone_loop 4 0.5 "small quadcopter drone hovering, steady electric propeller buzz, constant, seamless loop, no background" 2 &
|
||||
run sfx sweeper_loop 4 0.5 "small robot vacuum cleaner running, soft steady motor whir and brush swish, constant, seamless loop, no background" 2 &
|
||||
run sfx launcher_fire 1 0.6 "heavy spring catapult launch, metal spring twang with a quick air whoosh, cartoonish, no background" 2 &
|
||||
run sfx poke_servo 0.5 0.6 "tiny robot arm servo, quick high whirr then a soft mechanical click, short, no background" 2 &
|
||||
wait
|
||||
run sfx plater_shimmer 1.2 0.6 "magical gold sparkle shimmer with a short aerosol spray hiss, bright glittery chime, no background" 2 &
|
||||
run sfx drone_grab 0.6 0.6 "mechanical claw clamping shut, small metal clunk with a servo zip, short, no background" 2 &
|
||||
run sfx robot_chirp 0.6 0.6 "cute small robot happy chirp, two quick friendly electronic beeps rising, short, no background" 2 &
|
||||
run sfx robot_bump 0.5 0.6 "small plastic robot bumping into furniture, soft hollow plastic bonk, short, no background" 2 &
|
||||
wait
|
||||
echo BATCHDONE
|
||||
20
Tools/audio/eleven_batch_treats.sh
Normal file
20
Tools/audio/eleven_batch_treats.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Vending machine and treat sounds (grass beer, herb cigar). Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run sfx vend_hopper 1.4 0.6 "a handful of fresh cut grass stuffed into a metal funnel, quick rustle then a wet mechanical slurp swallowing it, close, no voice" 3
|
||||
run sfx vend_whirr 2.6 0.6 "old vending machine motor whirring and clicking as it picks a can, then a heavy drink can drops down a chute and lands in the metal tray with a loud clunk" 3
|
||||
run sfx can_open 1.0 0.7 "aluminium drink can ring pull cracked open, sharp crack and a fizzy psst hiss of carbonation, close mic" 3
|
||||
run sfx drink_glug 1.6 0.6 "a person gulping a cold drink from a can, three quick satisfying swallows, close mic, no talking" 3
|
||||
run sfx drink_ahh 1.2 0.5 "a man exhaling a satisfied refreshed ahh after a cold drink, short and happy, no other words" 3
|
||||
run sfx can_crush 0.8 0.7 "an empty aluminium can crushed in one hand, sharp crinkling metal crunch, close" 3
|
||||
run sfx can_bounce 1.2 0.6 "an empty crushed aluminium can thrown, bouncing and rattling across hard ground" 3
|
||||
run sfx knob_pull 0.7 0.6 "a brass knob pulled out of an old wooden vending cabinet, mechanical click and clack" 3
|
||||
run sfx drawer_bell 1.5 0.6 "an old wooden drawer slides open on its runners, then a small brass bell rings once, ding" 3
|
||||
run sfx lighter_flick 1.0 0.7 "a metal flip lighter flicked open, flint wheel strike and a soft flame whoosh, close" 3
|
||||
run sfx cigar_inhale 1.4 0.6 "a slow inhale through a lit cigar, faint crackling of the burning ember, close mic, no voice" 3
|
||||
run sfx smoke_exhale 1.8 0.5 "a long relaxed exhale blowing out a big puff of smoke, breathy airy whoosh, no voice" 3
|
||||
run sfx buff_shimmer 1.4 0.6 "game power-up sound, warm rising magical shimmer with sparkling chimes, short and satisfying" 3
|
||||
run sfx hiccup 0.6 0.7 "a single short comedic hiccup, cartoon style" 3
|
||||
29
Tools/audio/eleven_batch_v2.sh
Normal file
29
Tools/audio/eleven_batch_v2.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# v2 sound candidates (gadgets, build mode, machines, sectors). Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run sfx build_place 0.8 0.6 "satisfying chunky plastic and metal snap clunk of a building block locking into place, toy-like, cartoon video game build sound, close mic, no background" 2
|
||||
run sfx build_remove 0.8 0.6 "reverse snap, a plastic part unsnapping and popping off with a soft whoop, cartoon video game deconstruct sound, close mic, no background" 2
|
||||
run sfx build_rotate 0.5 0.6 "single small ratchet click, plastic toy ratchet turning one notch, close mic, no background" 2
|
||||
run sfx blower_loop 6 0.5 "small two-stroke gasoline leaf blower running steadily at full throttle, constant airy roar, no revving changes, close" 1
|
||||
run sfx vac_loop 6 0.5 "shop vacuum cleaner running steadily, whooshy airflow suction hum, constant, no on or off" 1
|
||||
run sfx vac_suck 0.6 0.6 "cartoon vacuum sucking up a small object, quick thoop sound with a plastic rattle, close mic, no background" 2
|
||||
run sfx vac_shoot 0.7 0.6 "air cannon firing a soft object, cartoon pneumatic plonk whoomp, close mic, no background" 2
|
||||
run sfx bomb_throw 0.6 0.6 "quick swoosh of a small ball thrown, light whoosh with a tiny metallic pin ping, no background" 2
|
||||
run sfx bomb_fuse 1.2 0.6 "short cartoon fuse fizzing and sparkling sizzle, close mic, no background" 2
|
||||
run sfx bomb_boom 2 0.5 "big cartoon explosion boom made of hundreds of bubble wrap bubbles popping at once, crackling burst, playful and punchy, no fire" 2
|
||||
run sfx opener_saw 1 0.6 "quick buzzing circular saw zip slicing through a cardboard box, short, cartoon factory machine" 2
|
||||
run sfx press_squash 1.5 0.5 "heavy hydraulic press thunk squashing down followed by a rapid burst of dozens of bubble wrap pops, satisfying" 2
|
||||
run sfx compactor_crunch 1.5 0.6 "industrial compactor crunching cardboard and plastic bubble wrap, chunky crunch and squeeze" 2
|
||||
run sfx machine_hum 6 0.5 "small factory machine motor humming steadily with a soft mechanical whir, constant, quiet" 1
|
||||
run sfx gate_shutter 2.5 0.6 "metal roll-up warehouse shutter door rattling as it rolls up quickly, clattering slats and motor" 2
|
||||
run sfx gate_unlock 2 0.5 "bright cheerful video game unlock fanfare with a cash register ka-ching and a heavy mechanical clunk" 2
|
||||
run sfx perk_unlock 1.5 0.5 "magical sparkle chime with a coin clink, cartoon video game upgrade purchased, bright and rewarding" 2
|
||||
run sfx roll_rumble 6 0.5 "heavy roll of plastic bubble wrap rolling steadily across a concrete floor, rumbling and crackling continuously" 1
|
||||
run sfx giant_roll_creak 2 0.6 "giant heavy roll creaking and groaning as it starts to move, deep rumble, cardboard core strain" 2
|
||||
run sfx truck_horn 1.2 0.6 "cute small delivery truck honking twice, beep beep, friendly cartoon horn" 2
|
||||
run sfx sector_clear 3 0.5 "short triumphant cartoon victory jingle with brass and marimba and a cymbal, level cleared, joyful, ends cleanly" 2
|
||||
wait
|
||||
echo BATCHDONE
|
||||
20
Tools/audio/eleven_batch_v3.sh
Normal file
20
Tools/audio/eleven_batch_v3.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# v3 sound candidates (sorting machines, conveyors, halls, outdoor yard). Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
# truck_horn already exists in Assets/Audio, so the new double-honk candidates use the truck_honk name.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run sfx splitter_flip 0.5 0.6 "single short mechanical metal flap clack, a conveyor belt diverter paddle flipping sideways and hitting its stop, plastic and steel, close mic, no background" 3
|
||||
run sfx sorter_beep 0.5 0.6 "single short friendly barcode scanner beep, bright clean electronic blip, supermarket checkout scanner, no background" 3
|
||||
run sfx sorter_push 1 0.6 "pneumatic piston firing, quick air hiss pssht followed by a solid metal clunk, industrial sorting machine pusher, close mic, no background" 3
|
||||
run sfx belt_join 0.5 0.6 "single soft metallic click, two metal parts snapping together and locking, small latch click, close mic, no background" 3
|
||||
run sfx hall_unlock 3 0.5 "metal roller shutter door rattling up quickly with a motor whir, then a short bright cheerful brass fanfare sting, cartoon video game area unlocked, ends cleanly" 2
|
||||
run sfx crane_loop 6 0.5 "overhead gantry crane electric motor running steadily, low mechanical hum with soft gear whine, constant, no starting or stopping" 2
|
||||
run sfx fan_loop 6 0.5 "large slow industrial ceiling fan spinning, rhythmic soft air whoosh, constant, warehouse, no other sounds" 2
|
||||
run sfx outdoor_loop 14 0.4 "outdoor industrial yard ambience, distant traffic rumble, a few birds chirping, light wind, calm, constant, no voices" 2
|
||||
run sfx truck_honk 1.2 0.6 "friendly delivery truck horn honking twice, honk honk, short cheerful double honk, no engine" 3
|
||||
run sfx forklift_beep 1.5 0.6 "forklift reversing beeper, exactly three beeps, beep beep beep, warning alarm, no engine" 3
|
||||
run sfx metal_step 2 0.6 "four footsteps on steel grating stairs, boots on metal mesh, clear separate steps, close mic, no background" 2
|
||||
wait
|
||||
echo BATCHDONE
|
||||
14
Tools/audio/eleven_batch_weather.sh
Normal file
14
Tools/audio/eleven_batch_weather.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# Weather sound candidates (rain, wind, twister, thunder, acid rain, saucer, meteors). Needs ELEVEN_KEY_FILE in env. Skips existing files.
|
||||
cd "$(dirname "$0")"
|
||||
E="python eleven.py"
|
||||
run() { $E "$@" || echo "FAILED $2"; }
|
||||
|
||||
run sfx rain_loop 10 0.6 "steady moderate rain falling on a grassy meadow, constant even rainfall ambience, no thunder, no wind gusts, no birds, seamless loop" 2
|
||||
run sfx wind_loop 10 0.6 "strong steady wind blowing across an open field, whooshing gusts through tall grass, constant ambience, no rain, no voices, seamless loop" 2
|
||||
run sfx twister_loop 8 0.6 "small tornado dust devil spinning close by, roaring swirling wind vortex, debris rattling, constant intense whoosh, seamless loop" 2
|
||||
run sfx thunder 6 0.5 "single loud thunderclap close by, sharp crack followed by a long deep rolling rumble fading away, no rain" 3
|
||||
run sfx acid_sizzle 1.5 0.6 "short acidic hiss, liquid acid sizzling on grass with a quick fizz and steam, close mic, no background" 3
|
||||
run sfx ufo_hum_loop 8 0.6 "flying saucer hovering overhead, deep pulsing alien engine hum with a soft warbling electronic tone, sci-fi spaceship, constant, seamless loop" 2
|
||||
run sfx ufo_beam_loop 6 0.6 "sci-fi tractor beam, shimmering high electronic whine with soft sparkling, alien light beam humming, constant, seamless loop" 2
|
||||
run sfx meteor_whoosh 3 0.5 "a distant meteor streaking across the night sky, fast airy whoosh with a faint crackle, fading out" 3
|
||||
BIN
Tools/audio/eleven_raw/acid_sizzle_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/acid_sizzle_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/acid_sizzle_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/acid_sizzle_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/acid_sizzle_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/acid_sizzle_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/ambience_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/ambience_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_acid_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_acid_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_drive_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_drive_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_full_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_full_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_hello_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_hello_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_hopper_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_hopper_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_meteors_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_meteors_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_mow_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_mow_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_nocash_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_nocash_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_rain_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_rain_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_spend_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_spend_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_storm_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_storm_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_thrown_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_thrown_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_tools_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_tools_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_twister_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_twister_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_ufo_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_ufo_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/asst_wind_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/asst_wind_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/belt_join_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/belt_join_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/belt_join_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/belt_join_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/belt_join_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/belt_join_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/blower_loop_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/blower_loop_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bomb_boom_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bomb_boom_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bomb_boom_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bomb_boom_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bomb_fuse_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bomb_fuse_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bomb_fuse_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bomb_fuse_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bomb_throw_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bomb_throw_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bomb_throw_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bomb_throw_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/box_burst_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/box_burst_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/box_burst_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/box_burst_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/buff_shimmer_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/buff_shimmer_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/buff_shimmer_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/buff_shimmer_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/buff_shimmer_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/buff_shimmer_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bug_scatter_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bug_scatter_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/bug_scatter_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/bug_scatter_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/build_place_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/build_place_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/build_place_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/build_place_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/build_remove_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/build_remove_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/build_remove_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/build_remove_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/build_rotate_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/build_rotate_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/build_rotate_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/build_rotate_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/call_connect_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/call_connect_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/call_hangup_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/call_hangup_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_bounce_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_bounce_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_bounce_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_bounce_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_bounce_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_bounce_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_crush_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_crush_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_crush_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_crush_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_crush_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_crush_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_open_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_open_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_open_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_open_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/can_open_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/can_open_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/cash_register_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/cash_register_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/cash_register_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/cash_register_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/cash_register_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/cash_register_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/cigar_inhale_0.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/cigar_inhale_0.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/cigar_inhale_1.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/cigar_inhale_1.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Tools/audio/eleven_raw/cigar_inhale_2.wav
(Stored with Git LFS)
Normal file
BIN
Tools/audio/eleven_raw/cigar_inhale_2.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user