Yotsuba Games
Back to Guide
Workflows

Exporting a Chest to GLB and a Sprite Sheet

Using rigid-part pivots and the existing animation nodes, bake the same open/close motion into both a glTF animation and an HD-2D sprite sheet. The sample is model_chest_animation_c7.ppl.

The graph in brief

Time Source.progress -> Sawtooth Wave.output -> Model Transform.rx

Chest Base --+
             +-> Model Group -> Model Set Material -> Model GLB Export
Chest Lid  --+                                  |
                                                +-> Model Render -> Animation Render

On the lid's model_transform, place the pivot at the hinge edge. The sample uses the x axis as the hinge, with py = 0.65 and rx = 0..-100° for the opening motion. The Model IR stores rotations as quaternions, so the same rotation lands in the glTF.

The animated GLB

Configure model_gltf_export like this:

Parameter Example
GLB Path chest_open.glb
Save Mode Overwrite
Animation Frames 6
Animation FPS 12
Animation Name Open

Normal evaluations never write the animated GLB. The upstream graph is evaluated for every frame, and only after all samples succeed is the file saved once, atomically. If a cancel, an error, or a change in geometry/material/hierarchy/ pivot occurs midway, no partial GLB is published. Only the TRS of stable PartIds can be animated.

The sprite sheet

Set model_render to frame_mode = FixedCanvas and give it a world range that contains every angle and pose. Match animation_render's frame count and FPS to the GLB side. The sample packs 64×64 px frames into 6 columns.

Checklist

  1. Open the sample and check the 6 frames in Animation Render
  2. Inspect the lid part and its pivot on the Model 3D stage
  3. Set the GLB destination and enable Save Mode
  4. Verify the Open clip and part names in Blender or your game engine
  5. Return Save Mode to Disabled afterwards to avoid accidental overwrites

The glTF side interpolates LINEAR-ly. For stepped, frame-by-frame motion, shape the wave, frame count, and snapping so the same TRS value holds across several frames.

Exporting a Chest to GLB and a Sprite Sheet — PixPipeline User Guide