Skip to content

feat(live2d)!: assemble Live2D models from the exported objects - #70

Merged
nichinichisou0609 merged 1 commit into
redesign/depotfrom
redesign/live2d-product
Oct 15, 2026
Merged

nichinichisou0609 merged 1 commit into
redesign/depotfrom
redesign/live2d-product

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Collaborator

Summary

  • nnnotes.content.live2d assembles a Live2D model from a product's object table:
    • model(): the player's model.json (format 3: prefab, moc, canvas, atlas pages, shaders, mask materials, MotionSync, clip bindings named in the model's hierarchy), the objects the player reads (no MonoScripts) and, per shader, the files kept (parsed form, variant index, the GLSL ES 3.00 programs of the drawn materials' keywords).
    • cubism(): the Cubism SDK files (moc3, atlas pages, physics3, exp3, motion3, model3).
  • Product stages live2d.model (version 2) and live2d.cubism in nnnotes.pipeline.live2d; the model also starts from the two mask materials loaded by Resources.Load path.
  • export assets --layout product: each product stage makes the products of the catalog keys the selected bundles hold (ProductStage.select); the layout writes each manifest with its files and its objects' files. Without original or cas, the run exports only what the products reach.
  • export live2d MODEL -o OUT runs that pipeline for one model and writes the Cubism SDK files (the files placement); --player writes the player's model in the product layout.
  • formats.cubism (moc3 canvas, physics3, exp3), formats.shader.player_program and the model ids in content.live2d are shared with the site's model export. formats.shader and unity.bindings import UnityPy only when used.
  • Removed: the bundle-based live2d.model stage with its task catalog and closures, unity.live2d.extract_model, formats.motion.extract_motions.

Tests

  • content: model document, program choice with and without masks, MotionSync, missing programs, roots, Cubism files and page names, model ids (moved from the site tests)
  • stages: keys, resources, manifests, a run of each product on a synthetic table, kinds, planning without UnityPy
  • CLI: held keys, --layout product exporting only what the product reaches (alone and with original), export live2d writing one model's files

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Two product stages make a Live2D model from the unity.export results of the
objects its prefab reaches, never from a bundle:

- live2d.model (version 2) is the model the player reads: model.json
  (format 3) names the prefab, the moc, the canvas, the atlas pages, the
  shaders, the mask materials loaded by Resources.Load path, MotionSync and
  the bindings of every clip named in the model's hierarchy. Its object table
  drops the MonoScripts and keeps, of a shader, the parsed form, the variant
  index and the GLSL ES 3.00 programs the drawn materials use.
- live2d.cubism is the model as Cubism SDK files: moc3, atlas pages,
  physics3, exp3, motion3 and model3.

`export assets --layout product` places the products of the selection: each
product stage makes the products of the keys the selected bundles hold, and
without an object layout the run exports only what the products reach.
`export live2d MODEL -o OUT` runs the same pipeline for one model and writes
its Cubism SDK files, or with `--player` the player's model in the product
layout.

The Cubism format conversions live in nnnotes.formats.cubism, the choice of
the player's shader program in formats.shader.player_program, and the model
ids in content.live2d; the site's model export uses them from there.

BREAKING CHANGE: `export live2d` writes the Cubism SDK files only (no prefab
JSON, no motions/_fades.json) and runs through the depot; live2d.model tasks
take the object table of the model instead of its bundles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit 18d407c into redesign/depot Oct 15, 2026
8 checks passed
@nichinichisou0609
nichinichisou0609 deleted the redesign/live2d-product branch October 15, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant