Multi-model scenes, stages and floor grid #7

Merged
dev merged 4 commits from devin/1795876546-grid-multimodel into main 2026-12-01 00:57:41 -05:00
Owner

Multiple models, stages and a floor grid.

  • Scene list (App::items_, SceneItem): each loaded model has its own ModelNode, motion (MotionPlayer), visibility and placement (Position / Rotation Y, applied in model space on top of the Y-up to Z-up matrix). Selecting a row makes it the active model for the Bones, Morphs and Timeline panels; x removes it. Loading a model now adds it instead of replacing the current one.
  • Motions: a dance .vmd binds to the active model; playback, physics stepping/reset and IK run for every model. Camera and audio stay global.
  • Stages: loadModel(path, stage). Stages have physics off and don't reframe the camera. Auto-detected when the path/name contains "stage"/"ステージ" or the model is over 120 units across; Scene panel checkbox to change it.
  • Floor grid (render/Grid.cpp): 5-unit grid over ±50 on the ground plane, red X, green Y (up), blue Z with screen-space labels (osgText added to the OSG components). View > Floor grid toggles it. Final renders cull it (kGridNodeMask).
  • CLI: --add FILE, --stage FILE (repeatable), --no-grid. Motions and --bone/--morph apply to the first model. Also fixes --pop-out, --physics and --render only taking effect when a motion was given.
  • Scale: per-model SceneItem::scale (Scene panel Scale drag, logarithmic 0.01–100x, Reset restores 1x; App::setModelScale; CLI --scale S for the first model, --stage-scale S for stages). Physics runs in model space, so scaled models simulate the same.
  • DirectX .x stages: enabled Assimp's X importer (ASSIMP_BUILD_X_IMPORTER), the format most classic MMD stages/accessories use. The Assimp loader now keeps the diffuse alpha (.x stores material transparency there), so WinterWorld's ice is translucent instead of black.
Multiple models, stages and a floor grid. - **Scene list** (`App::items_`, `SceneItem`): each loaded model has its own `ModelNode`, motion (`MotionPlayer`), visibility and placement (Position / Rotation Y, applied in model space on top of the Y-up to Z-up matrix). Selecting a row makes it the active model for the Bones, Morphs and Timeline panels; `x` removes it. Loading a model now **adds** it instead of replacing the current one. - **Motions**: a dance `.vmd` binds to the active model; playback, physics stepping/reset and IK run for every model. Camera and audio stay global. - **Stages**: `loadModel(path, stage)`. Stages have physics off and don't reframe the camera. Auto-detected when the path/name contains "stage"/"ステージ" or the model is over 120 units across; Scene panel checkbox to change it. - **Floor grid** (`render/Grid.cpp`): 5-unit grid over ±50 on the ground plane, red X, green Y (up), blue Z with screen-space labels (osgText added to the OSG components). View > Floor grid toggles it. Final renders cull it (`kGridNodeMask`). - **CLI**: `--add FILE`, `--stage FILE` (repeatable), `--no-grid`. Motions and `--bone`/`--morph` apply to the first model. Also fixes `--pop-out`, `--physics` and `--render` only taking effect when a motion was given. - **Scale**: per-model `SceneItem::scale` (Scene panel **Scale** drag, logarithmic 0.01–100x, Reset restores 1x; `App::setModelScale`; CLI `--scale S` for the first model, `--stage-scale S` for stages). Physics runs in model space, so scaled models simulate the same. - **DirectX `.x` stages**: enabled Assimp's X importer (`ASSIMP_BUILD_X_IMPORTER`), the format most classic MMD stages/accessories use. The Assimp loader now keeps the diffuse alpha (`.x` stores material transparency there), so WinterWorld's ice is translucent instead of black.
dev added 1 commit 2026-11-28 09:37:34 -05:00
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
dev added 1 commit 2026-11-29 02:05:18 -05:00
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
dev added 1 commit 2026-11-29 02:12:55 -05:00
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
dev added 1 commit 2026-11-29 02:16:42 -05:00
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
dev merged commit 6a1c1e409f into main 2026-12-01 00:57:41 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/3d-model-renderer#7