Przejdź do treści
Biblioteka skilli
Marketing i treści · Budowanie i kod

chengshi

/chengshi

Tworzy krótki film o rozwoju miasta z satelitarnych zdjęć i danych terenu, z modelami 3D z danych OSM i napisami.

Repozytorium
Auto-Video ↗
Licencja
MIT
Ostatnia zmiana repozytorium
10.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
125
Skrypty
118
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 118 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: render/remotion.config.ts, render/src/Chengshi.tsx, render/src/Root.tsx, render/src/camera.ts, render/src/data.ts, render/src/fonts.ts, render/src/index.ts, render/src/lighting.ts

Co robi i kiedy

Tworzy krótki film o rozwoju miasta z satelitarnych zdjęć i danych terenu, z modelami 3D z danych OSM i napisami.

Wyzwalacze z opisu

用 chengshi 出片把苏州那套改成成都
Oryginalny opis (EN)

城市年轮短片管线(Esri 卫星 + SRTM 地形 + Remotion/three.js 白模 3D 城市,透视机位,OSM 数据驱动,年轮环 + 时间轴 + 中英字幕 + 口播/配乐)。当用户要做「一座城的年轮」这类城市生长/城市史代码短片,或说"用 chengshi 出片""把苏州那套改成成都"时使用。

Jak działa

  1. 一条命令
  2. 输入(projects/<slug>/)
  3. 数据流
  4. 画面五层
  5. 参数
  6. 加一座新城市
  7. 本机部署
  8. 常见坑
  9. 与 lishi 的关系
Sekcje z nagłówków SKILL.md, w oryginale · 99 linii, 402 słów
Podgląd SKILL.md
---
name: chengshi
description: 城市年轮短片管线(Esri 卫星 + SRTM 地形 + Remotion/three.js 白模 3D 城市,透视机位,OSM 数据驱动,年轮环 + 时间轴 + 中英字幕 + 口播/配乐)。当用户要做「一座城的年轮」这类城市生长/城市史代码短片,或说"用 chengshi 出片""把苏州那套改成成都"时使用。
---

# chengshi —— 城市年轮短片管线

**现行基准**:苏州《城长》160.7s / 4821 帧 / 30fps / 1920×1080 审片成片
(`projects/suzhou/work/out/full_160b_1080p.mp4`)。4K 母版用同一模板的 `Chengshi` 合成。

画面 = **Esri World Imagery 卫星底图 + SRTM 30m 地形 + OSM 白模/道路/水系/绿地 + 年轮环 +
顶部时间轴 + 中英字幕 + 地标光圈 + 口播/配乐**,全程代码渲染,零 AI 视频。

## 一条命令

```bash
cd "D:/@kaifa/Auto-Video"
PYTHONIOENCODING=utf-8 ./.venv/Scripts/python.exe chengshi/scripts/make_city.py --project <slug>
```

顺序:OSM(缺层补抓)→ SRTM → Esri → 运行时贴图 → 白模 `city.json` → 逐句 TTS →
混音(口播 + BGM 闪避 + 环境声)→ `render_cut.py` 1080p 成片。
数据已存在默认跳过;`--skip-fetch / --skip-tts / --skip-audio / --skip-render` 可断点续跑。
4K:`--allow-4k`(需宝哥明确批准)。

## 输入(`projects/<slug>/`)

```
film.json                  画幅 / fps / 时长 / 标题 / bbox / origin / 配乐 / 响度 / 交付目录
data/
  rings.json               年轮环(lon/lat 多边形 + year + color + growth:[起,止])
  timeline.json            时间轴刻度 + 章节(t0/t1/year/机位/高亮环)
  captions.json            双语字幕(秒级 t0/t1)
  landmarks.json           地标光圈与标签
  voiceover.json           逐句口播(id/t0/t1/cn/en;可加 speed/tail)
  tags.json                旧版屏幕标签(可选)
```

## 数据流

```
Overpass / OSM API ──► work/raw/{buildings,roads,water,landuse}.json
AWS Terrain Tiles ───► work/raw/dem.json          (SRTM terrarium, z13)
Esri World Imagery ──► work/raw/esri_z16.jpg/json (z16, pad 0.08°)
prep_satellite.py ───► work/public/data/satellite.jpg(长边 ≤8192)
build_city.py ───────► work/public/data/{city,rings,terrain}.json
                       建筑:多边形→PCA OBB;楼高 height / levels×3.2+1.5 / 9m
                       生长年份:按所在年轮圈的 growth 区间确定性铺开
TTS + mix_audio.py ──► work/public/audio/mix.m4a(-15 LUFS / TP -1.8)
render_cut.py ───────► bundle + Remotion + 真峰值限幅 + 重封装
```

坐标系:以 `film.data.origin` 为原点的米制局部坐标,x 向东、z 向南(北在上)。

## 画面五层

```
5  字幕 / 地标 / 章节卡 / 片尾卡(DOM + SVG)
4  时间轴(顶部刻度 + 年份指针 + 章节名)
3  年轮环(TubeGeometry 双环,按年份出现,加色发光)
2  白模城市(InstancedMesh 楼体 + 道路线 + 水面/河道 + 绿地 + 树)
1  卫星底图 + 地形 + 雾 + 暗角 + 静态噪点
```

## 参数

见 `chengshi/pipeline.json`。改相机/配色/生长节奏都要先渲 `still` 复验。

## 加一座新城市

1. `chengshi.py new --project <slug> --title ... --bbox 南,西,北,东`(同时锁 origin)。
2. 写 `rings / timeline / captions / landmarks / voiceover`;年轮与章节决定叙事。
3. 启动 GPT-SoVITS(API 9880),或把录音 `NN.wav` 放进 `work/audio/vo/`。
4. `make_city.py --project <slug>`,先 `--frames 0-90` 看构图,再全片。
5. `chengshi.py publish --project <slug>` 归交付目录。

## 本机部署

- Python:`D:/@kaifa/Auto-Video/.venv`(numpy + Pillow)。
- Node:Remotion 4.0.484 + @remotion/three + three;依赖装在渲染工程目录自己的 `node_modules`。
  (AutoJY 里 `chengshi/template/node_modules` 曾是指向仓库根 `template/node_modules` 的目录联接;
  本仓库未带这些依赖,`chengshi.py ensure_env()` 会先尝试建联接,基线不存在时回退 `npm install`。)
- 渲染浏览器:Edge + ANGLE(`remotion.config.ts`)。
- Windows 控制台 GBK:跑 Python 前设 `PYTHONIOENCODING=utf-8`。
- **本仓库只放代码与工程,不带运行时依赖**:`.venv/`、`node_modules` 均需本机自备;
  缺依赖时在 `chengshi/render`(或 `chengshi/template`)里 `npm install`。

## 常见坑

1. **OSM 没有建成年份**:生长年份是示意,片尾必须署名。
2. **bbox 太大**:Overpass 会 504;脚本按 0.05° 切片,失败自动切主 API 0.01° 瓦片。
3. **机位是透视相机**:fov 每镜 30–42°(`camera.ts` 的 `fovSkim/fovOrbit/fovPull`);改机位先渲 still 复验。
4. **InstancedMesh 必须 `frustumCulled=false`**。
5. **生长动画必须确定性**:`tAtYear()` 反推,不能依赖帧游标。
6. **噪点/纸纹静态**:逐帧重抽会频闪。
7. **交付署名**:`© OpenStreetMap contributors(ODbL)` + Esri + SRTM。
8. **扩 bbox 锁原点**:`film.json → data.origin`,否则机位/标签整体漂移。

## 与 lishi 的关系

共用 `template/` 的 Remotion 依赖、`projects/` 与 `out/` 交付约定;渲染层独立:
lishi 是 2D SVG 纸本,chengshi 是 3D WebGL + 卫星地形。互不 import。
Pliki w paczce (125)
  • SKILL.md 5 KB
  • USAGE.md 6 KB
  • pipeline.json 3 KB
  • render/package.json 1 KB
  • render/remotion.config.ts 1 KB
  • render/tsconfig.json 1 KB
  • render/src/Chengshi.tsx 3 KB
  • render/src/Root.tsx 2 KB
  • render/src/camera.ts 12 KB
  • render/src/data.ts 3 KB
  • render/src/fonts.ts 3 KB
  • render/src/index.ts 1 KB
  • render/src/lighting.ts 4 KB
  • render/src/terrain.ts 1 KB
  • render/src/theme.ts 3 KB
  • render/src/types.ts 2 KB
  • render/src/sample/ApertureSample.tsx 3 KB
  • render/src/sample/EraCard.tsx 2 KB
  • render/src/sample/Sample.tsx 3 KB
  • render/src/sample/SampleTags.tsx 7 KB
  • render/src/sample/config.ts 7 KB
  • render/src/sample/openingCamera.ts 4 KB
  • render/src/scene/AncientCity.tsx 24 KB
  • render/src/scene/Aperture.tsx 25 KB
  • render/src/scene/Buildings.tsx 15 KB
  • render/src/scene/CameraRig.tsx 2 KB
  • render/src/scene/CityScene.tsx 9 KB
  • render/src/scene/Dynamics.tsx 7 KB
  • render/src/scene/Ground.tsx 10 KB
  • render/src/scene/LandUse.tsx 3 KB
  • render/src/scene/Landmarks.tsx 16 KB
  • render/src/scene/Lights.tsx 4 KB
  • render/src/scene/Rings.tsx 9 KB
  • render/src/scene/Roads.tsx 2 KB
  • render/src/scene/Settlement.tsx 3 KB
  • render/src/scene/Shantang.tsx 10 KB
  • render/src/scene/Trees.tsx 2 KB
  • render/src/scene/Walls.tsx 3 KB
  • render/src/scene/Water.tsx 6 KB
  • render/src/scene/ancientLayout.ts 20 KB
  • render/src/scene/clouds.ts 5 KB
  • render/src/scene/heights.ts 3 KB
  • render/src/scene/waterMask.ts 2 KB
  • render/src/shot/ShotStill.tsx 4 KB
  • render/src/shot/shots.ts 8 KB
  • render/src/ui/Captions.tsx 2 KB
  • render/src/ui/ChapterCard.tsx 3 KB
  • render/src/ui/EndCard.tsx 3 KB
  • render/src/ui/EraAxis.tsx 5 KB
  • render/src/ui/Fade.tsx 1 KB
  • render/src/ui/Grain.tsx 2 KB
  • render/src/ui/Header.tsx 1 KB
  • render/src/ui/LandmarkApertures.tsx 8 KB
  • render/src/ui/LandmarkTags.tsx 6 KB
  • render/src/ui/Tags.tsx 2 KB
  • render/src/ui/TimelineAxis.tsx 2 KB
  • render/src/ui/TitleCard.tsx 3 KB
  • render/src/ui/Vignette.tsx 1 KB
  • render/src/ui/Watermark.tsx 1 KB
  • render/src/ui/YearBadge.tsx 1 KB
  • scripts/build_city.py 16 KB
  • scripts/chengshi.py 9 KB
  • scripts/common.py 2 KB
  • scripts/fetch_dem.py 5 KB
  • scripts/fetch_esri.py 7 KB
  • scripts/fetch_osm.py 16 KB
  • scripts/make_city.py 6 KB
  • scripts/mix_audio.py 7 KB
  • scripts/mix_audio_v2.py 8 KB
  • scripts/prep_satellite.py 2 KB
  • scripts/render_cut.py 11 KB
  • scripts/render_cut_v2.py 12 KB
  • scripts/tts_voice.py 4 KB
  • template/package.json 1 KB
  • template/remotion.config.ts 1 KB
  • template/tsconfig.json 1 KB
  • template/src/Chengshi.tsx 3 KB
  • template/src/Root.tsx 2 KB
  • template/src/camera.ts 11 KB
  • template/src/data.ts 3 KB
  • template/src/index.ts 1 KB
  • template/src/lighting.ts 2 KB
  • template/src/terrain.ts 1 KB
  • template/src/theme.ts 3 KB
  • template/src/types.ts 2 KB
  • template/src/sample/ApertureSample.tsx 3 KB
  • template/src/sample/EraCard.tsx 2 KB
  • template/src/sample/Sample.tsx 3 KB
  • template/src/sample/SampleTags.tsx 7 KB
  • template/src/sample/config.ts 7 KB
  • template/src/sample/openingCamera.ts 4 KB
  • template/src/scene/AncientCity.tsx 24 KB
  • template/src/scene/Aperture.tsx 25 KB
  • template/src/scene/Buildings.tsx 12 KB
  • template/src/scene/CameraRig.tsx 2 KB
  • template/src/scene/CityScene.tsx 9 KB
  • template/src/scene/Dynamics.tsx 7 KB
  • template/src/scene/Ground.tsx 10 KB
  • template/src/scene/LandUse.tsx 3 KB
  • template/src/scene/Landmarks.tsx 14 KB
  • template/src/scene/Lights.tsx 4 KB
  • template/src/scene/Rings.tsx 9 KB
  • template/src/scene/Roads.tsx 2 KB
  • template/src/scene/Settlement.tsx 3 KB
  • template/src/scene/Shantang.tsx 10 KB
  • template/src/scene/Trees.tsx 2 KB
  • template/src/scene/Walls.tsx 3 KB
  • template/src/scene/Water.tsx 6 KB
  • template/src/scene/ancientLayout.ts 20 KB
  • template/src/scene/clouds.ts 5 KB
  • template/src/scene/heights.ts 3 KB
  • template/src/scene/waterMask.ts 2 KB
  • template/src/shot/ShotStill.tsx 4 KB
  • template/src/shot/shots.ts 8 KB
  • template/src/ui/Captions.tsx 2 KB
  • template/src/ui/ChapterCard.tsx 3 KB
  • template/src/ui/EndCard.tsx 3 KB
  • template/src/ui/EraAxis.tsx 5 KB
  • template/src/ui/Fade.tsx 1 KB
  • template/src/ui/Grain.tsx 2 KB
  • template/src/ui/LandmarkApertures.tsx 8 KB
  • template/src/ui/LandmarkTags.tsx 5 KB
  • template/src/ui/TitleCard.tsx 3 KB
  • template/src/ui/Vignette.tsx 1 KB
  • template/src/ui/Watermark.tsx 1 KB

Wersje

W bazie nie ma innych skilli o nazwie chengshi.

Migawka bazy z 13.11.2026 · wersja paczki b2e64e02b4f0 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100storymap-generate-person
    Tworzy profil postaci historycznej z osią czasu, miejscami i wiedzą szkolną, a opcjonalnie stronę HTML z mapą OSM.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.