Repository navigation
feat(unity): write a mesh's vertex channels and submeshes as its arrays artifact - #79
Merged
Merged
Conversation
…ys artifact Each converted Mesh gets an `arrays` artifact: canon/1 JSON in the mesh's local space with the positions, the normal, tangent, colour and uv0-uv7 channels as floats, the submeshes (topology and absolute vertex indices), and the joints and weights of a skin. The mesh converter is version 3. Live products keep only the json and arrays artifacts of their meshes. 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
Each converted Mesh gets an
arraysartifact next to its glTF: a canon/1 JSON document in the mesh's local space withpositions(per vertex, as stored),normals,tangents,colors,uv0–uv7(per vertex, the channel's components as floats with their own dimension; null when the mesh stores no such channel),submeshes(per primitive:topologyand absolute vertexindices; triangles as triples),jointsandweightsof a skin (four per vertex; null without a skin).A reader can draw a mesh from it without decoding glTF or undoing a change of axes. The mesh converter is
mesh.glb/3. The live products (live.scene,live.notes,live.noteskin,live.noteeffect) keep only thejsonandarraysfiles of their meshes (prefabs.mesh_roles).Tests
test_objexport.test_meshchecks thearraysdocument of a synthetic mesh;test_atoms_meshcovers a skinned line mesh and an empty mesh; the live scene test checks the kept roles of a Mesh.mesh.glb/3under the pinned constraints.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com