Repository navigation
feat(live2d)!: assemble Live2D models from the exported objects - #70
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nnnotes.content.live2dassembles a Live2D model from a product's object table:model(): the player'smodel.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).live2d.model(version 2) andlive2d.cubisminnnnotes.pipeline.live2d; the model also starts from the two mask materials loaded byResources.Loadpath.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. Withoutoriginalorcas, the run exports only what the products reach.export live2d MODEL -o OUTruns that pipeline for one model and writes the Cubism SDK files (thefilesplacement);--playerwrites the player's model in the product layout.formats.cubism(moc3 canvas, physics3, exp3),formats.shader.player_programand the model ids incontent.live2dare shared with the site's model export.formats.shaderandunity.bindingsimport UnityPy only when used.live2d.modelstage with its task catalog and closures,unity.live2d.extract_model,formats.motion.extract_motions.Tests
--layout productexporting only what the product reaches (alone and withoriginal),export live2dwriting one model's filesCo-Authored-By: Claude Opus 5.5 noreply@anthropic.com