Repository navigation
feat(spot)!: assemble spots and rooms from the exported objects - #73
Merged
Merged
Conversation
Two product stages make a spot from the unity.export results of the objects its prefabs reach, never from a bundle: - room.gltf (subject a background key Spot/<place>/Background/<place>, manifest rooms/<place>.json) writes room.glb and room.json: every mesh the background prefab draws, baked into the prefab's space from the Mesh objects' local glTF, with materials translated from each Material's document and its Shader's parsed form, and textures from the Texture2D images and settings. What draws nothing is listed in room.json: nullMaterialSubmeshes, nullMeshFilters and emptyMeshes (a mesh without vertices or triangles). - spot.files (subject a situation key Spot/<place>/<situation>/<situation>, manifest spots/<situation>.json) writes spot.json and the Spine files under spine/. Its input `master` is the spot's record of MasterHomeSpot, MasterText and MasterStoryHomeSpotTapTalkEpisode, made at planning. A product stage that reads master tables names them in MASTER; the planning fact "master" is set when one is in the pipeline, and `export assets --layout product` gives such a stage no subjects without master data. content.prefabs reads a prefab document as a hierarchy (parents, world matrices, activity, in-prefab references) for the Live2D, room and spot assemblers. The story host keeps its bundle reader of a spot in content.hostspot. `export spot SPOT_ID -o OUT` and `export room KEY -o OUT` run the pipeline for the spot's two products, or the one room, and write their files; they take the options of `export live2d`. BREAKING CHANGE: `export room` writes OUT/room.glb and OUT/room.json and draws only the meshes of the background prefab's hierarchy; `export spot` writes no shaders/ and spot.json has no `resources`; room.json lists empty meshes as emptyMeshes; the spine.skeleton stage is removed. 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.
Spots and rooms become products assembled from the exported objects, as Live2D models are.
Products
Spot/<place>/Background/<place>) →room.glbandroom.json, manifestrooms/<place>.json. The meshes the background prefab draws are baked into the prefab's space from each Mesh's local glTF; materials are translated from the Material document and its Shader's parsed form; textures come from the Texture2D images and settings.room.jsonlists what draws nothing (nullMaterialSubmeshes,nullMeshFilters,emptyMeshes).Spot/<place>/<situation>/<situation>) →spot.jsonandspine/*, manifestspots/<situation>.json. Itsmasterinput is the spot's record of the three master tables, made at planning.Neither keeps objects; their files are all they hold.
Pipeline and commands
ProductStage.MASTERnames the master tables a product stage reads; the planning factmasteris set when such a stage is in the pipeline, andexport assets --layout productgives it no subjects without master data.export spot SPOT_ID -o OUTandexport room KEY -o OUTrun the depot pipeline for their products and write the products' files, with the options ofexport live2d.content.prefabsreads a prefab document as a hierarchy (parents, world matrices, activity, in-prefab references); the Live2D, room and spot assemblers use it.content.hostspot.spine.skeletonstage is removed.Breaking changes
export roomwritesOUT/room.glbandOUT/room.jsonand draws only the meshes of the background prefab's hierarchy.export spotwrites noshaders/, andspot.jsonhas noresources.room.jsonlists empty meshes asemptyMeshes.Tests
tests/helpers/spotobjects.py) cover:room(): baking, winding, uv, inactive nodes, shared materials and textures, texture transforms, and what draws nothing;spot(): matrices, null references, skeleton files, a shared atlas, and the master record;tests/content/test_hostspot.py.